blob: 50c7fb9644c54be8ced196899124a86e86cdfaf1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# Maintainer: Eric Berquist <eric dot berquist at gmail dot com>
_name="iodata"
pkgname="python-${_name}-git"
pkgver=1.0.0a4.r1532.0ca750f
pkgrel=1
pkgdesc="Python library for reading, writing, and converting computational chemistry file formats and generating input files. (git version)"
arch=("any")
url="https://iodata.readthedocs.io/en/latest/index.html"
license=("LGPL-3.0")
makedepends=(
"git"
"python-build"
"python-installer"
"python-setuptools"
"python-setuptools-scm"
"python-wheel"
)
checkdepends=("python-pytest" "python-pytest-xdist")
depends=("python-attrs" "python-numpy" "python-scipy")
provides=("python-${_name}")
conflicts=("python-${_name}")
source=("git+https://github.com/theochem/${_name}")
sha256sums=('SKIP')
prepare() {
git -C "${srcdir}/${_name}" clean -dfx
}
build() {
cd "${srcdir}/${_name}"
python -m build --wheel --no-isolation
}
package() {
cd "${srcdir}/${_name}"
python -m installer --destdir="${pkgdir}" dist/*.whl
}
check() {
cd "${srcdir}/${_name}"
# these require the package to be installed
python -m pytest -k 'not test_scripts'
}
pkgver() {
cd "${srcdir}/${_name}"
_parent_ver=$(git describe --tags --abbrev=0 | tr -d 'v')
_parent_major_ver=$(echo "${_parent_ver}" | cut -d "." -f 1)
_parent_minor_ver=$(echo "${_parent_ver}" | cut -d "." -f 2)
_parent_patch_ver=$(echo "${_parent_ver}" | cut -d "." -f 3)
printf "%s.%s.%s.r%s.%s" \
"${_parent_major_ver}" \
"${_parent_minor_ver}" \
"${_parent_patch_ver}" \
"$(git rev-list --count HEAD)" \
"$(git rev-parse --short HEAD)"
}
|