python-periodictable: fix the build

This commit is contained in:
Guoyi Zhang 2025-02-08 15:28:17 +11:00
parent 21f64c1bca
commit 5fd8819572
3 changed files with 18 additions and 19 deletions

View file

@ -1,18 +1,23 @@
# Maintainer: Ross Whitfield <whitfieldre@ornl.gov>
# Maintainer: Michał Wojdyła < micwoj9292 at gmail dot com >
# Contributor: Ross Whitfield <whitfieldre@ornl.gov>
pkgname='python-periodictable'
_pkgname='periodictable'
pkgver=1.7.1
pkgrel=1
pkgver=2.0.2
pkgrel=0
pkgdesc="Extensible periodic table of the elements"
url="http://periodictable.readthedocs.org"
arch=("any")
license=('public domain')
makedepends=('python-setuptools')
source=("https://github.com/pkienzle/periodictable/archive/v$pkgver.tar.gz")
md5sums=('e1a246ef913d841d1deb106c9ba63894')
makedepends=('python-build' 'python-installer' 'python-setuptools')
source=("$pkgname-$pkgver.tar.gz::https://github.com/pkienzle/periodictable/archive/v$pkgver.tar.gz")
md5sums=('cafa51731c6693e1f85a6f7a7bcff393')
package() {
depends=('python-numpy' 'python-pyparsing')
build() {
cd "$srcdir/${_pkgname}-$pkgver"
python setup.py install --root="$pkgdir/" --optimize=1
python -m build --wheel --no-isolation
}
package() {
depends=('python' 'python-matplotlib' 'python-numpy' 'python-pyparsing' 'python-uncertainties')
cd "$srcdir/${_pkgname}-$pkgver"
python -m installer --destdir="$pkgdir" dist/*.whl
}

View file

@ -1,10 +0,0 @@
#!/usr/bin/env python3
from lilaclib import *
def pre_build():
update_pkgver_and_pkgrel(_G.newver.lstrip('v'))
run_cmd(['updpkgsums'])
def post_build():
git_add_files('PKGBUILD')
git_commit()

View file

@ -2,6 +2,10 @@ build_prefix: extra-x86_64
maintainers:
- github: starsareintherose
email: kuoi@bioarchlinux.org
pre_build_script: |
update_pkgver_and_pkgrel(_G.newver)
post_build_script: |
git_pkgbuild_commit()
update_on:
- source: github
github: pkienzle/periodictable