summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Larralde2024-09-02 23:07:24 +0200
committerMartin Larralde2024-09-02 23:11:37 +0200
commit5786479b8899ad9e23ea27c453e009036107199b (patch)
tree38ca31f7fbd598681fe72b08c342fe38275c3047
downloadaur-5786479b8899ad9e23ea27c453e009036107199b.tar.gz
Release v0.9.0
-rw-r--r--.SRCINFO16
-rwxr-xr-xPKGBUILD42
2 files changed, 58 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d400bfb02293
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = python-lightmotif
+ pkgdesc = PyO3 bindings and Python interface to lightmotif, a library for platform-accelerated biological motif scanning using position weight matrices.
+ pkgver = 0.9.0
+ pkgrel = 1
+ url = https://github.com/althonos/lightmotif
+ arch = any
+ license = MIT OR GPL-3.0-or-later
+ makedepends = python-setuptools
+ makedepends = python-build
+ makedepends = python-installer
+ makedepends = cargo
+ depends = python
+ source = https://files.pythonhosted.org/packages/source/l/lightmotif/lightmotif-0.9.0.post2.tar.gz
+ sha256sums = SKIP
+
+pkgname = python-lightmotif
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 000000000000..774334164ae3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Martin Larralde <martin.larralde@embl.de>
+
+_name=lightmotif
+pkgname=python-${_name}
+pkgver=0.9.0
+_version=0.9.0.post2
+pkgrel=1
+pkgdesc="PyO3 bindings and Python interface to lightmotif, a library for platform-accelerated biological motif scanning using position weight matrices."
+url="https://github.com/althonos/lightmotif"
+arch=('any')
+license=("MIT OR GPL-3.0-or-later")
+groups=()
+makedepends=('python-setuptools' 'python-build' 'python-installer' 'cargo')
+depends=('python')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${_version}.tar.gz")
+noextract=()
+sha256sums=('b1702c99b0fdf43df574dedc5a10894d531d7998ec5f914f844181bff2cd4615')
+
+prepare() {
+ cargo fetch --manifest-path "${srcdir}/${_name}-${_version}/lightmotif-py/Cargo.toml" --target "$CARCH-unknown-linux-gnu"
+}
+
+build() {
+ export RUSTUP_TOOLCHAIN=stable
+ cd "${srcdir}/${_name}-${_version}"
+ python -m build --wheel --no-isolation
+}
+
+check() {
+ local pyver=$(python -c 'import sys; print("{}{}".format(*sys.version_info[:2]))')
+ local impl=$(python -c 'import platform; print(platform.python_implementation().lower())')
+ local machine=$(python -c 'import platform; print(platform.machine())')
+ cd "${srcdir}/${_name}-${_version}/build/lib.linux-${machine}-${impl}-${pyver}"
+ python -m unittest ${_name}.tests
+}
+
+package() {
+ local abitag=$(python -c 'import sys; print(*sys.version_info[:2], sep="")')
+ local machine=$(python -c 'import platform; print(platform.machine())')
+ python -m installer --destdir="$pkgdir" "${srcdir}/${_name}-${_version}/dist/${_name}-${_version}-cp${abitag}-cp${abitag}-linux_${machine}.whl"
+ install -Dm644 ${srcdir}/${_name}-${_version}/COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+}