summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorUniversebenzene2022-09-26 00:45:28 +0800
committerUniversebenzene2022-09-26 00:45:28 +0800
commit46e608b72a7042c0544be3d421e458ec23742f76 (patch)
tree0ec94f8a6ac799c9a6348008b1a43014f420cad2
parent2f0ec380f74e9fdd3496e783274d16b1741ab30f (diff)
downloadaur-46e608b72a7042c0544be3d421e458ec23742f76.tar.gz
Update to version 0.2
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD39
2 files changed, 35 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 74954e603215..f6ad180e7982 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = python-casa-formats-io
pkgdesc = Code to handle I/O from/to data in CASA format Resources
- pkgver = 0.1
+ pkgver = 0.2
pkgrel = 1
url = https://casa-formats-io.readthedocs.io
arch = i686
@@ -8,19 +8,21 @@ pkgbase = python-casa-formats-io
license = custom:LGPL2
checkdepends = python-pytest
makedepends = python-setuptools-scm
+ makedepends = python-wheel
+ makedepends = python-build
+ makedepends = python-installer
makedepends = python-numpy
makedepends = python-numpydoc
makedepends = python-sphinx-automodapi
makedepends = python-dask
- makedepends = python-toolz
makedepends = python-astropy
- source = https://files.pythonhosted.org/packages/source/c/casa-formats-io/casa-formats-io-0.1.tar.gz
- md5sums = b37878b461dfe9d2c42a00925cd73acf
+ source = https://files.pythonhosted.org/packages/source/c/casa-formats-io/casa-formats-io-0.2.tar.gz
+ md5sums = fb4d06c549a5711c67a46030771e0eae
pkgname = python-casa-formats-io
- depends = python>=3.6
+ depends = python>=3.8
depends = python-astropy>=4.0
- depends = python-dask
+ depends = python-dask>=2.0
depends = python-toolz
pkgname = python-casa-formats-io-doc
diff --git a/PKGBUILD b/PKGBUILD
index 70fec115baa5..0958a70bd2fe 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,45 +2,60 @@
pkgbase=python-casa-formats-io
_pyname=${pkgbase#python-}
pkgname=("python-${_pyname}" "python-${_pyname}-doc")
-pkgver=0.1
+pkgver=0.2
pkgrel=1
pkgdesc="Code to handle I/O from/to data in CASA format Resources"
arch=('i686' 'x86_64')
url="https://casa-formats-io.readthedocs.io"
license=('custom:LGPL2')
-makedepends=('python-setuptools-scm' 'python-numpy' 'python-numpydoc' 'python-sphinx-automodapi' 'python-dask' 'python-toolz' 'python-astropy')
-checkdepends=('python-pytest')
+makedepends=('python-setuptools-scm'
+ 'python-wheel'
+ 'python-build'
+ 'python-installer'
+ 'python-numpy'
+ 'python-numpydoc'
+ 'python-sphinx-automodapi'
+ 'python-dask'
+# 'python-toolz'
+ 'python-astropy')
+checkdepends=('python-pytest') # astropy and dask already in makedepends. glue-core for pdepend
source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
-md5sums=('b37878b461dfe9d2c42a00925cd73acf')
+md5sums=('fb4d06c549a5711c67a46030771e0eae')
+
+get_pyver() {
+ python -c "import sys; print('$1'.join(map(str, sys.version_info[:2])))"
+}
prepare() {
- export _pyver=$(python -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+ cd ${srcdir}/${_pyname}-${pkgver}
+
+ sed -i "/oldest-supported-numpy/d" pyproject.toml
+ sed -i "/casa_io_formats.image_to_dask/s/_io_formats/_formats_io/" docs/index.rst
}
build() {
cd ${srcdir}/${_pyname}-${pkgver}
- python setup.py build
+ python -m build --wheel --no-isolation
- export _pyver=$(python -c 'import sys; print("%d.%d" % sys.version_info[:2])')
msg "Building Docs"
cd ${srcdir}/${_pyname}-${pkgver}/docs
- mkdir _static
- PYTHONPATH="../build/lib.linux-${CARCH}-${_pyver}" make html
+# mkdir _static
+ PYTHONPATH="../build/lib.linux-${CARCH}-cpython-$(get_pyver)" make html
}
check() {
cd ${srcdir}/${_pyname}-${pkgver}
- PYTHONPATH="build/lib.linux-${CARCH}-${_pyver}" pytest "build/lib.linux-${CARCH}-${_pyver}" || warning "Tests failed"
+ pytest "build/lib.linux-${CARCH}-cpython-$(get_pyver)" || warning "Tests failed" # -vv --color=yes
}
package_python-casa-formats-io() {
- depends=('python>=3.6' 'python-astropy>=4.0' 'python-dask' 'python-toolz')
+ depends=('python>=3.8' 'python-astropy>=4.0' 'python-dask>=2.0' 'python-toolz')
cd ${srcdir}/${_pyname}-${pkgver}
install -D -m644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -D -m644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
- python setup.py install --root=${pkgdir} --prefix=/usr --optimize=1
+ python -m installer --destdir="${pkgdir}" dist/*.whl
}
package_python-casa-formats-io-doc() {