summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Martinez2022-06-20 21:09:28 -0500
committerLuis Martinez2022-06-20 21:09:28 -0500
commitc5f163525591c6442a3d99346250ae4fe178c86f (patch)
tree8675098fc1e5f00a469ae75840f71b456072680d
parent75f58247239072f398c07408339fa927d0bd276d (diff)
downloadaur-c5f163525591c6442a3d99346250ae4fe178c86f.tar.gz
update to 0.6.1
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD55
-rw-r--r--header.patch12
-rw-r--r--setup.py.patch51
4 files changed, 112 insertions, 31 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 97739f5f5331..fe6292c3a7f8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,24 @@
pkgbase = python-ripser
- pkgdesc = A Lean Persistent Homology Library for Python
- pkgver = 0.4.1
- pkgrel = 3
+ pkgdesc = Homology Library for Python
+ pkgver = 0.6.1
+ pkgrel = 1
url = https://github.com/scikit-tda/ripser.py
- arch = any
+ arch = x86_64
license = MIT
- makedepends = python-setuptools
makedepends = cython
- depends = python
- depends = cython
+ makedepends = python-build
+ makedepends = python-installer
+ makedepends = python-setuptools
+ makedepends = python-wheel
depends = python-numpy
depends = python-scipy
depends = python-scikit-learn
depends = python-persim
- options = !emptydirs
- source = https://github.com/scikit-tda/ripser.py/archive/v0.4.1.tar.gz
- sha256sums = ec7f34935f5e6d3430c7f5a27007ccf4f50a21936d4045c0d3aa1e77209ef8fa
+ source = python-ripser-0.6.1.tar.gz::https://files.pythonhosted.org/packages/source/r/ripser/ripser-0.6.1.tar.gz
+ source = setup.py.patch
+ source = header.patch
+ sha256sums = 335112a0f94532ccbe686db7826ee8d0714b32f65891abf92c0a02f3cb0fc5fd
+ sha256sums = 5d6538cf07d897cfead808048682266bcf2a9199f2ddda9becd4919221612195
+ sha256sums = cd5b619ce29859d26890e9256f3e883c463c1196c3e9a172b7de264584990a4a
pkgname = python-ripser
-
diff --git a/PKGBUILD b/PKGBUILD
index 8718d40a3dee..837c18097a36 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,24 +1,39 @@
-# Maintainer: Will Handley <wh260@cam.ac.uk> (aur.archlinux.org/account/wjhandley)
-_modulename=ripser
-pkgname=python-$_modulename
-pkgver=0.4.1
-pkgrel=3
-pkgdesc="A Lean Persistent Homology Library for Python"
-arch=(any)
+# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
+# Contributor: Will Handley <wh260@cam.ac.uk> (aur.archlinux.org/account/wjhandley)
+
+pkgname=python-ripser
+_pkg="${pkgname#python-}"
+pkgver=0.6.1
+pkgrel=1
+pkgdesc="Homology Library for Python"
+arch=('x86_64')
url="https://github.com/scikit-tda/ripser.py"
license=('MIT')
-groups=()
-depends=('python' 'cython' 'python-numpy' 'python-scipy' 'python-scikit-learn' 'python-persim')
-makedepends=('python-setuptools' 'cython')
-provides=()
-conflicts=()
-replaces=()
-backup=()
-options=(!emptydirs)
-install=
-source=("${url}/archive/v${pkgver}.tar.gz")
-sha256sums=('ec7f34935f5e6d3430c7f5a27007ccf4f50a21936d4045c0d3aa1e77209ef8fa')
+depends=('python-numpy' 'python-scipy' 'python-scikit-learn' 'python-persim')
+makedepends=('cython' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel')
+source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/r/$_pkg/$_pkg-$pkgver.tar.gz"
+ 'setup.py.patch'
+ 'header.patch')
+sha256sums=('335112a0f94532ccbe686db7826ee8d0714b32f65891abf92c0a02f3cb0fc5fd'
+ '5d6538cf07d897cfead808048682266bcf2a9199f2ddda9becd4919221612195'
+ 'cd5b619ce29859d26890e9256f3e883c463c1196c3e9a172b7de264584990a4a')
+
+prepare() {
+ patch -p1 -d "$_pkg-$pkgver" < header.patch
+ patch -p1 -d "$_pkg-$pkgver" < setup.py.patch
+}
+
+build() {
+ cd "$_pkg-$pkgver"
+ python -m build --wheel --no-isolation
+}
+
package() {
- cd "$srcdir/${_modulename}.py-$pkgver"
- python setup.py install --root="$pkgdir/" --optimize=1
+ cd "$_pkg-$pkgver"
+ PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" dist/*.whl
+ local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
+ install -d "$pkgdir/usr/share/licenses/$pkgname/"
+ ln -s \
+ "$_site/$_pkg-$pkgver.dist-info/LICENSE.txt" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
diff --git a/header.patch b/header.patch
new file mode 100644
index 000000000000..98c0445c9fc7
--- /dev/null
+++ b/header.patch
@@ -0,0 +1,12 @@
+diff --git a/ripser/ripser.cpp b/ripser/ripser.cpp
+index f2b7531..2c225c5 100644
+--- a/ripser/ripser.cpp
++++ b/ripser/ripser.cpp
+@@ -46,6 +46,7 @@ derivative works thereof, in binary and source code form.
+ #include <iomanip>
+ #include <iostream>
+ #include <iterator>
++#include <limits>
+ #include <numeric>
+ #include <queue>
+ #include <sstream>
diff --git a/setup.py.patch b/setup.py.patch
new file mode 100644
index 000000000000..3a61980ce5a2
--- /dev/null
+++ b/setup.py.patch
@@ -0,0 +1,51 @@
+diff --git a/setup.py b/setup.py
+index 5f44f2f..c43766a 100644
+--- a/setup.py
++++ b/setup.py
+@@ -25,12 +25,12 @@ if mo:
+ else:
+ raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
+
+-# Use README.md as the package long description
++# Use README.md as the package long description
+ with open('README.md') as f:
+ long_description = f.read()
+
+ class CustomBuildExtCommand(build_ext):
+- """ This extension command lets us not require numpy be installed before running pip install ripser
++ """ This extension command lets us not require numpy be installed before running pip install ripser
+ build_ext command for use when numpy headers are needed.
+ """
+
+@@ -52,11 +52,11 @@ if platform.system() == "Windows":
+ ])
+ elif platform.system() == "Darwin":
+ extra_compile_args.extend([
+- '-std=c++11',
++ '-std=c++11',
+ "-mmacosx-version-min=10.9"
+ ])
+ extra_link_args.extend([
+- "-stdlib=libc++",
++ "-stdlib=libc++",
+ "-mmacosx-version-min=10.9"
+ ])
+ else:
+@@ -104,7 +104,7 @@ setup(
+ url="https://ripser.scikit-tda.org",
+ license='MIT',
+ packages=['ripser'],
+- ext_modules=cythonize(ext_modules),
++ ext_modules=cythonize(ext_modules, language_level = '3'),
+ install_requires=[
+ 'Cython',
+ 'numpy',
+@@ -114,7 +114,7 @@ setup(
+ ],
+ extras_require={
+ 'testing': [ # `pip install -e ".[testing]"``
+- 'pytest'
++ 'pytest'
+ ],
+ 'docs': [ # `pip install -e ".[docs]"`
+ 'sktda_docs_config'