diff options
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | LICENSE | 1 | ||||
-rw-r--r-- | PKGBUILD | 122 | ||||
-rw-r--r-- | PKGBUILD_EXTRAS | 0 |
4 files changed, 37 insertions, 109 deletions
@@ -1,21 +1,20 @@ pkgbase = python-sep pkgdesc = Astronomical source extraction and photometry library - pkgver = 1.0.3 - pkgrel = 00 + pkgver = 1.2.1 + pkgrel = 1 url = https://github.com/kbarbary/sep arch = x86_64 + license = MIT license = LGPL3 - makedepends = python-pip + checkdepends = python-pytest + checkdepends = python-astropy + makedepends = python-build + makedepends = python-installer + makedepends = python-setuptools makedepends = python-wheel - makedepends = swig - depends = python + makedepends = cython depends = python-numpy - source = PKGBUILD_EXTRAS - source = https://files.pythonhosted.org/packages/e1/a5/ee7e82c7e32eb74ec86048c2f9007b169c66d7eb4a3593bfca40a566aacc/sep-1.0.3.tar.gz - source = LICENSE - md5sums = SKIP - md5sums = 9b899ce70b1f050a937efbdb4fbd3356 - md5sums = 27f314f169c690b73a55106a4f40e7f5 + source = sep-1.2.1.tar.gz::https://github.com/kbarbary/sep/archive/v1.2.1.tar.gz + sha512sums = 2f5815363a11bfff67093e80a3fd5ba8b790e52226d1df39eee18a6a4195caaf82317712668c64ba2bc108b29a60dca2bdda87e920291aa28cde9633b73ff1b6 pkgname = python-sep - diff --git a/LICENSE b/LICENSE deleted file mode 100644 index ccd26a312783..000000000000 --- a/LICENSE +++ /dev/null @@ -1 +0,0 @@ -LICENSE: LGPL3 @@ -1,102 +1,32 @@ -# Maintainer: Gabriel "ArcturusB" Perouze" <arcturus@openmailbox.org> - -export PIP_CONFIG_FILE=/dev/null -export PIP_DISABLE_PIP_VERSION_CHECK=true - -pkgname=python-sep -epoch= -pkgver=1.0.3 -pkgrel=00 -pkgdesc='Astronomical source extraction and photometry library' +# Maintainer: Carlos Aznarán <caznaranl@uni.pe> +# Contributor: Gabriel "ArcturusB" Perouze" <arcturus@openmailbox.org> +_base=sep +pkgname=python-${_base} +pkgver=1.2.1 +pkgrel=1 +pkgdesc="Astronomical source extraction and photometry library" arch=(x86_64) -url=https://github.com/kbarbary/sep -license=(LGPL3) -depends=(python python-numpy) -depends+=() -makedepends=(python-pip python-wheel swig) -checkdepends=() -provides=() -conflicts=(${provides%=*}) # No quotes, to avoid an empty entry. -source=(PKGBUILD_EXTRAS) -md5sums=(SKIP) -source+=(https://files.pythonhosted.org/packages/e1/a5/ee7e82c7e32eb74ec86048c2f9007b169c66d7eb4a3593bfca40a566aacc/sep-1.0.3.tar.gz) -md5sums+=(9b899ce70b1f050a937efbdb4fbd3356) -source+=(LICENSE) -md5sums+=(27f314f169c690b73a55106a4f40e7f5) -_first_source() { - echo " ${source_i686[@]} ${source_x86_64[@]} ${source[@]}" | - tr ' ' '\n' | grep -Pv '^(PKGBUILD_EXTRAS)?$' | head -1 -} - -if [[ $(_first_source) =~ ^git+ ]]; then - provides+=("${pkgname%-git}") - conflicts+=("${pkgname%-git}") -fi - -_is_wheel() { - [[ $(_first_source) =~ \.whl$ ]] -} - -_dist_name() { - basename "$(_first_source)" | - sed 's/\(\.tar\.gz\|\.tgz\|\.tar\.bz2\|\.zip\|\.git\)$//' +url="https://github.com/kbarbary/${_base}" +license=(MIT LGPL3) +depends=(python-numpy) +makedepends=(python-build python-installer python-setuptools python-wheel cython) # swig +checkdepends=(python-pytest python-astropy) +source=(${_base}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz) +sha512sums=('2f5815363a11bfff67093e80a3fd5ba8b790e52226d1df39eee18a6a4195caaf82317712668c64ba2bc108b29a60dca2bdda87e920291aa28cde9633b73ff1b6') + +build() { + cd ${_base}-${pkgver} + python -m build --wheel --skip-dependency-check --no-isolation } -if [[ $(_first_source) =~ ^git+ ]]; then - _pkgver() { - ( set -o pipefail - cd "$srcdir/$(_dist_name)" - git describe --long --tags 2>/dev/null | - sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' || - printf "r%s.%s" \ - "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" - ) - } - - pkgver() { _pkgver; } -fi - -_build() { - if _is_wheel; then return; fi - cd "$srcdir/$(_dist_name)" - # See Arch Wiki/PKGBUILD/license. - # Get the first filename that matches. - local test_name - if [[ ${license[0]} =~ ^(BSD|MIT|ZLIB|Python)$ ]]; then - for test_name in LICENSE LICENSE.txt license.txt COPYING COPYING.md COPYING.rst COPYING.txt COPYRIGHT; do - if cp "$srcdir/$(_dist_name)/$test_name" "$srcdir/LICENSE" 2>/dev/null; then - break - fi - done - fi - # Build the wheel (which we allow to fail) only after fetching the license. - /usr/bin/pip wheel -v --no-deps --wheel-dir="$srcdir" \ - --global-option=--no-user-cfg \ - --global-option=build --global-option=-j"$(nproc)" . || - true +check() { + cd ${_base}-${pkgver} + python -m venv --system-site-packages test-env + test-env/bin/python -m installer dist/*.whl + test-env/bin/python -m pytest test.py } -build() { _build; } - -_check() { - # Define check(), possibly using _check as a helper, to run the tests. - # You may need to call `python setup.py build_ext -i` first. - if _is_wheel; then return; fi - cd "$srcdir/$(_dist_name)" - /usr/bin/python setup.py -q test +package() { + cd ${_base}-${pkgver} + PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl } - -_package() { - cd "$srcdir" - # pypa/pip#3063: pip always checks for a globally installed version. - /usr/bin/pip --quiet install --root="$pkgdir" \ - --no-deps --ignore-installed --no-warn-script-location \ - "$(ls ./*.whl 2>/dev/null || echo ./"$(_dist_name)")" - if [[ -f LICENSE ]]; then - install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - fi -} - -package() { _package; } - -. "$(dirname "$BASH_SOURCE")/PKGBUILD_EXTRAS" diff --git a/PKGBUILD_EXTRAS b/PKGBUILD_EXTRAS deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/PKGBUILD_EXTRAS +++ /dev/null |