summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8ac3605f9e20f23ad22cb81566f5aef217d8dce8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Maintainer: Astro Benzene <universebenzene at sina dot com>
pkgbase=python-pysynphot
_pyname=${pkgbase#python-}
pkgname=("python-${_pyname}" "python-${_pyname}-doc")
pkgver=2.0.0
pkgrel=1
pkgdesc="Python Synthetic Photometry Utilities"
arch=('i686' 'x86_64')
url="http://pysynphot.readthedocs.io"
license=('BSD')
makedepends=('python-setuptools-scm' 'python-astropy' 'python-sphinx' 'python-sphinx_rtd_theme' 'python-beautifulsoup4' 'graphviz')
checkdepends=('python-pytest-astropy-header')
source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
#       "http://ssb.stsci.edu/trds/tarfiles/synphot1.tar.gz"
#       "http://ssb.stsci.edu/trds/tarfiles/synphot2.tar.gz"
#       "http://ssb.stsci.edu/trds/tarfiles/synphot3.tar.gz"
#       "http://ssb.stsci.edu/trds/tarfiles/synphot4.tar.gz"
#       "http://ssb.stsci.edu/trds/tarfiles/synphot5.tar.gz"
#       "http://ssb.stsci.edu/trds/tarfiles/synphot6.tar.gz"
#       "https://ssb.stsci.edu/trds/mtab/OLD_FILES/0661429jm_tmc.fits"
#       "https://ssb.stsci.edu/trds/mtab/OLD_FILES/0661437lm_tmg.fits"
#       "https://ssb.stsci.edu/trds/mtab/OLD_FILES/14l1632sm_tmg.fits"
#       "https://ssb.stsci.edu/trds/mtab/OLD_FILES/16n1832tm_tmc.fits"
#       "https://ssb.stsci.edu/trds/mtab/OLD_FILES/39h19082m_tmc.fits"
#       "https://ssb.stsci.edu/trds/mtab/OLD_FILES/n9i1408hm_tmg.fits"
#       "https://ssb.stsci.edu/trds/mtab/OLD_FILES/r1j2146sm_tmc.fits"
#       "https://ssb.stsci.edu/trds/mtab/OLD_FILES/rbg2236im_tmg.fits"
#       "https://ssb.stsci.edu/trds/mtab/OLD_FILES/rcb1833hm_tmc.fits"
#       "https://ssb.stsci.edu/trds/mtab/OLD_FILES/t260548pm_tmc.fits"
#       "https://ssb.stsci.edu/trds/mtab/OLD_FILES/t2605492m_tmg.fits"
#       "https://ssb.stsci.edu/trds/mtab/OLD_FILES/t921857im_tmc.fits"
#       "https://ssb.stsci.edu/trds/mtab/OLD_FILES/tae17277m_tmt.fits"
#       "https://ssb.stsci.edu/trds/mtab/OLD_FILES/u4c18498m_tmc.fits"
#       "https://ssb.stsci.edu/trds/mtab/OLD_FILES/u921351jm_tmg.fits"
#       "https://ssb.stsci.edu/trds/mtab/OLD_FILES/ub31649mm_tmc.fits"
#       "https://ssb.stsci.edu/trds/mtab/OLD_FILES/v8h1925fm_tmc.fits"
#       "https://ssb.stsci.edu/trds/etc/source/qso_fos_001.dat"
#       "https://ssb.stsci.edu/trds/calobs/alpha_lyr_006.fits")
md5sums=('967a07ffa027ad5684d626a531e7164f')
#        '95f73eb96b7d3fba63f97ff66a6fec8c'
#        'a36769b70725d7a49adfe302442667ad'
#        'dd6d78e0e265c0b35bf3dec941f525f2'
#        '97e7c7107db0e3400d123c11804aa6b6'
#        '2bc1ff740c7edf2f0dec4828af1bc359'
#        'b27c421f98c89c1f494a4def956c1e3a'
#        '7847dc342c24de579ea2f423798bf873'
#        '6267b243634104d02575eb0762ed0dc1'
#        '56a46709366897150e0fa5fe17b50dfb'
#        '28598fda5094b83eaf9febe13bec6d94'
#        '051bd0e84b8e0dd5a57d0c6f982129a0'
#        '02691b456f6d1d1378d3d70317b40b0d'
#        'af535bc6d2d01fa3c0f4054325a3014c'
#        'f9f7482455252170dc7d859c0fd9538c'
#        '28945f32aa7e454559769bc0af8ab8af'
#        'b004f51ffbefab0d9e3c28e9c5a6f17f'
#        'b960a20bf0328ee4ce561ded1d30989f'
#        '360a53e4ddf34ce558d92a64db0680a3'
#        '95731f9dd60d768e3f25a99b0b2d5620'
#        '27481dae0ca63828f1307dd3b1a9041a'
#        '6d3b85d2b7eb366a79fff0ca497f36ae'
#        '5f68d7398d522b4811d5ba8b8319cd26'
#        '46742a5b57b55baf236f4db88078263b'
#        'b8d9a22da03fe281cdf5ced04878e71b'
#        '208011793bc36d4f6878b84bc289ed70')

build() {
    cd ${srcdir}/${_pyname}-${pkgver}
    python setup.py build

    msg "Building Docs"
    python setup.py build_sphinx
}

#check() {
#    cd ${srcdir}/${_pyname}-${pkgver}
#    mkdir -p ${srcdir}/grp/redcat/trds/{calobs,etc/source,mtab/OLD_FILES}
#    ln -rs ${srcdir}/*.fits ${srcdir}/grp/redcat/trds/mtab/OLD_FILES
#    ln -rs ${srcdir}/*.dat ${srcdir}/grp/redcat/trds/etc/source
#    ln -rs ${srcdir}/alpha_lyr_006.fits ${srcdir}/grp/redcat/trds/calobs
#    PYSYN_CDBS="${srcdir}/grp/redcat/trds" pytest #|| warning "Tests failed"
#}

package_python-pysynphot() {
    depends=('python-astropy' 'python-beautifulsoup4' 'python-six')
    optdepends=('python-matplotlib: Plotting support'
                'python-pysynphot-doc: Documentation for PySynphot')
    cd ${srcdir}/${_pyname}-${pkgver}

    install -D -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE.md
    install -D -m644 -t "${pkgdir}/usr/share/doc/${pkgname}" README.rst
    python setup.py install --root=${pkgdir} --prefix=/usr --optimize=1
}

package_python-pysynphot-doc() {
    pkgdesc="Documentation for pysynphot"
    cd ${srcdir}/${_pyname}-${pkgver}/build/sphinx

    install -D -m644 -t "${pkgdir}/usr/share/licenses/${pkgname}" ../../LICENSE.md
    install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}"
    cp -a html "${pkgdir}/usr/share/doc/${pkgbase}"
}