diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 43 |
1 files changed, 23 insertions, 20 deletions
@@ -2,54 +2,57 @@ pkgbase=python-pydl _pyname=${pkgbase#python-} pkgname=("python-${_pyname}" "python-${_pyname}-doc") -pkgver=0.7.0 -pkgrel=2 -pkgdesc="Python replacements for functions that are part of the IDL built-in library or part of astronomical IDL libraries" +pkgver=1.0.0 +pkgrel=1 +pkgdesc="Library of IDL astronomy routines converted to Python" arch=('any') url="http://pydl.readthedocs.io/" license=('BSD') -makedepends=('python-setuptools' 'python-setuptools' 'python-scipy' 'python-astropy' 'python-astropy-helpers' 'python-sphinx-astropy') -checkdepends=('python-pytest-astropy') +makedepends=('python-setuptools-scm' + 'python-wheel' + 'python-build' + 'python-installer' + 'python-sphinx-astropy' + 'python-astropy' + 'python-scipy' + 'graphviz') +checkdepends=('python-pytest-doctestplus' + 'python-pytest-mock') # astropy scipy already in makedepends source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz") #source=("https://files.pythonhosted.org/packages/73/87/397a0d22112f48b794b39613ee3bddd315e64a38b33f24898962c4def5e4/pydl-0.7.0.tar.gz") -md5sums=('0bf0921aef8f5acbf192ac5c49f0d46c') - -prepare() { - cd ${srcdir}/${_pyname}-${pkgver} - - sed -i -e '/auto_use/s/True/False/' setup.cfg -} +md5sums=('8bf313aeb530669ab6ba364a38b020ab') build() { cd ${srcdir}/${_pyname}-${pkgver} - python setup.py build --use-system-libraries --offline + python -m build --wheel --no-isolation msg "Building Docs" - python setup.py build_docs + PYTHONPATH="../build/lib" make -C docs html } check() { cd ${srcdir}/${_pyname}-${pkgver} - python setup.py test + pytest || warning "Tests failed" # -vv -ra --color=yes -o console_output_style=count } package_python-pydl() { - depends=('python-scipy' 'python-astropy' 'python-matplotlib') - optdepends=('python-pytest-astropy: For testing' + depends=('python-astropy' 'python-scipy') + optdepends=('python-matplotlib: all' + 'python-pytest-astropy: For testing' 'python-pydl-doc: Documentation for PyDL') cd ${srcdir}/${_pyname}-${pkgver} - install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" licenses/* + install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE.rst install -Dm644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}" - python setup.py install --root=${pkgdir} --prefix=/usr --optimize=1 --use-system-libraries --offline + python -m installer --destdir="${pkgdir}" dist/*.whl } package_python-pydl-doc() { pkgdesc="Documentation for PyDL" cd ${srcdir}/${_pyname}-${pkgver}/docs/_build - install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" ../../licenses/* + install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" ../../LICENSE.rst install -dm755 "${pkgdir}/usr/share/doc/${pkgbase}" cp -a html "${pkgdir}/usr/share/doc/${pkgbase}" } |