From 5a7d1e37e0993270b02d953686df93dc36dbfba4 Mon Sep 17 00:00:00 2001 From: Guoyi Zhang Date: Thu, 6 Feb 2025 16:46:23 +1100 Subject: [PATCH] python-future: init for ipyrad --- BioArchLinux/ipyrad/PKGBUILD | 4 +-- BioArchLinux/ipyrad/lilac.yaml | 1 + BioArchLinux/python-future/PKGBUILD | 42 +++++++++++++++++++++++ BioArchLinux/python-future/future.install | 27 +++++++++++++++ BioArchLinux/python-future/lilac.yaml | 14 ++++++++ 5 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 BioArchLinux/python-future/PKGBUILD create mode 100644 BioArchLinux/python-future/future.install create mode 100644 BioArchLinux/python-future/lilac.yaml diff --git a/BioArchLinux/ipyrad/PKGBUILD b/BioArchLinux/ipyrad/PKGBUILD index 294faa7a21..2cb8f3b947 100644 --- a/BioArchLinux/ipyrad/PKGBUILD +++ b/BioArchLinux/ipyrad/PKGBUILD @@ -5,8 +5,8 @@ pkgdesc="Interactive assembly and analysis of RAD-seq data sets." arch=('any') url="https://github.com/dereneaton/ipyrad" license=('GPL-3.0-or-later') -depends=('python' 'python-pandas' 'python-scipy' 'python-numpy' 'python-numba' 'python-future' 'python-h5py' 'python-ipyparallel' 'python-requests' 'python-mpi4py' - 'cutadapt' 'python-pysam' 'bedtools' 'vsearch' 'bwa' 'samtools' 'python-toyplot') +depends=('python' 'python-pandas' 'python-scipy' 'python-numpy' 'python-numba' 'python-h5py' 'python-ipyparallel' 'python-requests' 'python-mpi4py' + 'python-future' 'cutadapt' 'python-pysam' 'bedtools' 'vsearch' 'bwa' 'samtools' 'python-toyplot') optdepends=('jupyter-notebook: for interactive') makedepends=('python-build' 'python-installer' 'python-wheel' 'gcc' 'make') source=("https://github.com/dereneaton/ipyrad/archive/${pkgver}.tar.gz" diff --git a/BioArchLinux/ipyrad/lilac.yaml b/BioArchLinux/ipyrad/lilac.yaml index 51e69c8e84..9af2243405 100644 --- a/BioArchLinux/ipyrad/lilac.yaml +++ b/BioArchLinux/ipyrad/lilac.yaml @@ -15,6 +15,7 @@ repo_depends: - bwa - samtools - python-toyplot + - python-future update_on: - source: github github: dereneaton/ipyrad diff --git a/BioArchLinux/python-future/PKGBUILD b/BioArchLinux/python-future/PKGBUILD new file mode 100644 index 0000000000..9a65199d29 --- /dev/null +++ b/BioArchLinux/python-future/PKGBUILD @@ -0,0 +1,42 @@ +# Contributor: Michał Wojdyła < micwoj9292 at gmail dot com > +# Contributor: Felix Yan +# Contributor: Christopher Arndt +# Contributor: Gaute Hope +# Contributor: Melissa Padilla + +pkgname=python-future +pkgver=1.0.0 +pkgrel=4 +pkgdesc="Clean single-source support for Python 3 and 2" +url="https://python-future.org/" +arch=('any') +license=('MIT') +depends=('python') +provides=('futurize' 'pasteurize') +checkdepends=('python-requests' 'python-pytest') +makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel') +optdepends=('python-setuptools: futurize and pasteurize scripts') +options=('!emptydirs') +source=("https://pypi.io/packages/source/f/future/future-$pkgver.tar.gz") +sha512sums=('8e28d53172e3ae7b3b27c424a48fb698a6e86bf1c648cdf74e7fd57d34901a9bda18429fe4e176d70be67fc6c80b7f961b3021356594e38b5f294406af40bc61') +install=future.install +build() { + cd "$srcdir"/future-$pkgver + python -m build --wheel +} +# https://github.com/PythonCharmers/python-future/issues/640 +# https://python-future.org/overview.html#status +check() { + cd "$srcdir"/future-$pkgver + # test_future needs python2 so it is disabled here + #PYTHONPATH="$PWD/build/lib:$PYTHONPATH" pytest -v tests/test_future + PYTHONPATH="$PWD/build/lib:$PYTHONPATH" pytest -v tests/test_past +} + +package() { + cd future-$pkgver + + python -m installer --destdir="$pkgdir" dist/*.whl + install -D -m644 LICENSE.txt \ + "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt +} diff --git a/BioArchLinux/python-future/future.install b/BioArchLinux/python-future/future.install new file mode 100644 index 0000000000..1605565442 --- /dev/null +++ b/BioArchLinux/python-future/future.install @@ -0,0 +1,27 @@ +python_version_warning() { + echo "" + echo "" + echo "" + echo "WARNING: python-future package is not compatible with Python 3.13" + echo "" + echo "" + echo "" + echo "The python-future project was created in 2013 to attempt to save Python from the schism of version incompatibility that was threatening to tear apart the language (as Perl 6 contributed to the death of Perl)." + echo "" + echo "That time is now past. Thanks to a huge porting effort across the Python community, Python 3 eventually thrived. Python 2 reached its end of life in 2020 and the python-future package should no longer be necessary. Use it to help with porting legacy code to Python 3 but don’t depend on it for new code." + echo "" + echo "" + echo "" + echo "If you use packages that depend on it, please contact maintainers and/or upstream of these packages and try to work out whether this dependency is really needed." + echo "" + echo "" + echo "" +} + +post_install() { + python_version_warning +} + +post_upgrade() { + python_version_warning +} diff --git a/BioArchLinux/python-future/lilac.yaml b/BioArchLinux/python-future/lilac.yaml new file mode 100644 index 0000000000..8db28ddb1a --- /dev/null +++ b/BioArchLinux/python-future/lilac.yaml @@ -0,0 +1,14 @@ +build_prefix: extra-x86_64 +maintainers: + - github: starsareintherose + email: kuoi@bioarchlinux.org +pre_build_script: | + update_pkgver_and_pkgrel(_G.newver.lstrip('v')) + run_cmd(['updpkgsums']) +post_build_script: | + git_pkgbuild_commit() +update_on: + - source: pypi + pypi: future + prefix: 'v' + - alias: python