diff options
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 53 | ||||
-rw-r--r-- | setup.py.patch | 14 |
3 files changed, 61 insertions, 27 deletions
@@ -1,15 +1,20 @@ pkgbase = python-seqlearn-git - pkgdesc = A sequence classification toolkit for Python + pkgdesc = Sequence classification toolkit for Python pkgver = r89.32d4bfa - pkgrel = 1 + pkgrel = 2 url = https://github.com/larsmans/seqlearn - arch = any - license = custom + arch = x86_64 + license = MIT makedepends = cython - makedepends = python-setuptools makedepends = git - depends = python-scipy - source = git+https://github.com/larsmans/seqlearn.git - sha512sums = SKIP + makedepends = python-build + makedepends = python-installer + makedepends = python-setuptools + makedepends = python-wheel + depends = python-scikit-learn + source = seqlearn::git+https://github.com/larsmans/seqlearn + source = setup.py.patch + sha256sums = SKIP + sha256sums = bf5d8bff54489ccd71a427a1a136527b7d913ca386c770bf2de7683d6bae9f16 pkgname = python-seqlearn-git @@ -1,31 +1,46 @@ +# Maintainer: Luis Martinez <luis dot martinez at disroot dot org> # Contributor: Michal Wojdyla < micwoj9292 at gmail dot com > # Contributor: Ashley Whetter <(firstname) @ awhetter.co.uk> -_base=seqlearn -pkgname=python-${_base}-git + +pkgname=python-seqlearn-git +_pkg=seqlearn pkgver=r89.32d4bfa -pkgrel=1 -pkgdesc="A sequence classification toolkit for Python" -arch=(any) -url="https://github.com/larsmans/${_base}" -license=('custom') -depends=(python-scipy) -makedepends=(cython python-setuptools git) -source=(git+${url}.git) -sha512sums=('SKIP') +pkgrel=2 +pkgdesc="Sequence classification toolkit for Python" +arch=('x86_64') +url='https://github.com/larsmans/seqlearn' +license=('MIT') +depends=('python-scikit-learn') +makedepends=( + 'cython' + 'git' + 'python-build' + 'python-installer' + 'python-setuptools' + 'python-wheel') +source=("$_pkg::git+$url" + 'setup.py.patch') +sha256sums=('SKIP' + 'bf5d8bff54489ccd71a427a1a136527b7d913ca386c770bf2de7683d6bae9f16') pkgver() { - cd ${_base} - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + cd "$_pkg" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + patch -p1 -d "$_pkg" < setup.py.patch } build() { - cd ${_base} - export PYTHONHASHSEED=0 - python setup.py build_ext --inplace + cd "$_pkg" + python -m build --wheel --no-isolation } package() { - cd ${_base} - PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 - install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}" + cd "$_pkg" + python -m installer --destdir="$pkgdir" dist/*.whl + local _site="$(python -c 'import site; print(site.getsitepackages()[0])')" + install -dv "$pkgdir/usr/share/licenses/$pkgname/" + ln -sv "$_site/$_pkg-0.2.dist-info/COPYING" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } diff --git a/setup.py.patch b/setup.py.patch new file mode 100644 index 000000000000..e539419026f0 --- /dev/null +++ b/setup.py.patch @@ -0,0 +1,14 @@ +diff --git a/setup.py b/setup.py +index 301e4c7..ee9b540 100644 +--- a/setup.py ++++ b/setup.py +@@ -27,8 +27,7 @@ setup_options = dict( + maintainer_email="larsmans@gmail.com", + license="MIT", + url="https://github.com/larsmans/seqlearn", +- packages=["seqlearn", "seqlearn._utils", "seqlearn._decode", +- "seqlearn/tests"], ++ packages=["seqlearn", "seqlearn._utils", "seqlearn._decode"], + classifiers=[ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", |