summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Ho2023-09-13 02:09:25 +0800
committerSean Ho2023-09-13 02:09:25 +0800
commit75a499231f777eed2d510dda82866dd8b3d648fb (patch)
tree937bebd0557105816020582f8dfcdd265b97b46a
parentecd13c542586dd19b88ff1bf8e28e35a50b162d9 (diff)
downloadaur-75a499231f777eed2d510dda82866dd8b3d648fb.tar.gz
Switch packaging workflow to PEP 517 standards to fit what project needs
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD10
2 files changed, 8 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4bfd0712a190..44ae52a285f9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,14 @@
pkgbase = python-pygmt
pkgdesc = Python interface to the Generic Mapping Tools C library
pkgver = 0.10.0
- pkgrel = 1
+ pkgrel = 2
url = https://www.pygmt.org
arch = x86_64
license = 3-BSD
makedepends = python-pip
makedepends = cython
makedepends = python-setuptools
+ makedepends = python-setuptools-scm
depends = python-numpy
depends = python-pandas
depends = python-xarray
diff --git a/PKGBUILD b/PKGBUILD
index dfe284616394..faf6e2249445 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,13 +4,13 @@ _pkg=pygmt
pkgbase=python-${_pkg}
pkgname=("python-${_pkg}")
pkgver=0.10.0
-pkgrel=1
+pkgrel=2
pkgdesc="Python interface to the Generic Mapping Tools C library"
arch=('x86_64')
url="https://www.pygmt.org"
license=('3-BSD')
depends=('python-numpy' 'python-pandas' 'python-xarray' 'python-netcdf4' 'python-packaging' 'gmt')
-makedepends=('python-pip' 'cython' 'python-setuptools')
+makedepends=('python-pip' 'cython' 'python-setuptools' 'python-setuptools-scm')
#'gmt-coast' 'gmt-dcw'
#'ipython' 'python-matplotlib' 'jupyter' 'python-pytest'
#'python-pytest-cov' 'python-pytest-mpl' 'python-coverage'
@@ -25,7 +25,8 @@ sha256sums=('95346786a0a51c03bec1d6ace81a6c5ce98706cc9ffb05c7d77b966a5b85ff79')
build() {
cd ${_pkg}-${pkgver}
- USE_NCCONFIG=1 python setup.py build
+ export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
+ python -m build -nw
}
#check() {
@@ -40,5 +41,6 @@ build() {
package() {
cd ${_pkg}-${pkgver}
- USE_NCCONFIG=1 python setup.py install --prefix=/usr --root="${pkgdir}" --skip-build --optimize=2
+ export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
+ python -m installer --destdir="$pkgdir" dist/*.whl
}