Created
September 27, 2019 14:57
-
-
Save bnavigator/f304f7b52eab8d445516dad2c5cbf16a to your computer and use it in GitHub Desktop.
Patch AUR python-scikit-build to provide Python2 package
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 83ae1c018b80a69ca060b5a596e6c0bdcd2f987a Mon Sep 17 00:00:00 2001 | |
From: bnavigator <[email protected]> | |
Date: Fri, 27 Sep 2019 16:46:40 +0200 | |
Subject: [PATCH] Split package to provide python2-scikit-build Add | |
dependencies | |
--- | |
.SRCINFO | 45 ++++++++++++++++++++++++++++++++++++++---- | |
PKGBUILD | 60 +++++++++++++++++++++++++++++++++++++++++++++++--------- | |
2 files changed, 92 insertions(+), 13 deletions(-) | |
diff --git a/.SRCINFO b/.SRCINFO | |
index fb0fc26..ee56fe5 100644 | |
--- a/.SRCINFO | |
+++ b/.SRCINFO | |
@@ -1,14 +1,51 @@ | |
pkgbase = python-scikit-build | |
pkgdesc = Improved build system generator for CPython C, C++, Cython and Fortran extensions | |
pkgver = 0.10.0 | |
- pkgrel = 1 | |
+ pkgrel = 2 | |
url = https://github.com/scikit-build/scikit-build | |
arch = any | |
license = MIT | |
+ checkdepends = git | |
+ checkdepends = ninja | |
+ checkdepends = gcc-fortran | |
+ checkdepends = cython>=0.25.1 | |
+ checkdepends = cython2>=0.25.1 | |
+ checkdepends = flake8>=3.0.4 | |
+ checkdepends = python2-flake8>=3.0.4 | |
+ checkdepends = python2-pathlib2 | |
+ checkdepends = python-path.py>=11.5.0 | |
+ checkdepends = python2-path.py>=11.5.0 | |
+ checkdepends = python-pytest>=4.5.0 | |
+ checkdepends = python2-pytest>=4.5.0 | |
+ checkdepends = python-pytest-cov>=2.7.1 | |
+ checkdepends = python2-pytest-cov>=2.7.1 | |
+ checkdepends = python-pytest-mock>=1.10.4 | |
+ checkdepends = python2-pytest-mock>=1.10.4 | |
+ checkdepends = python-pytest-runner>=5.1 | |
+ checkdepends = python2-pytest-runner>=5.1 | |
+ checkdepends = python-pytest-virtualenv>=1.2.5 | |
+ checkdepends = python2-pytest-virtualenv>=1.2.5 | |
+ checkdepends = python-requests | |
+ checkdepends = python2-requests | |
+ checkdepends = python-six>=1.10.0 | |
+ checkdepends = python2-six>=1.10.0 | |
+ checkdepends = python-virtualenv | |
+ checkdepends = python2-virtualenv | |
+ depends = cmake | |
+ depends = python-setuptools>=28.0.0 | |
+ depends = python2-setuptools>=28.0.0 | |
+ depends = python-wheel>=0.29.0 | |
+ depends = python2-wheel>=0.29.0 | |
+ depends = python-packaging | |
+ depends = python2-packaging | |
+ source = https://files.pythonhosted.org/packages/source/s/scikit-build/scikit-build-0.10.0.tar.gz | |
+ sha256sums = 7342017cc82dd6178e3b19377389b8a8d1f8b429d9cdb315cfb1094e34a0f526 | |
+ | |
+pkgname = python-scikit-build | |
depends = python-setuptools | |
depends = python-wheel | |
- source = https://github.com/scikit-build/scikit-build/archive/0.10.0.tar.gz | |
- sha256sums = 2beec252813b20327072c15e9d997f15972aedcc6a130d0154979ff0fdb1b010 | |
-pkgname = python-scikit-build | |
+pkgname = python2-scikit-build | |
+ depends = python2-setuptools | |
+ depends = python2-wheel | |
diff --git a/PKGBUILD b/PKGBUILD | |
index 1c8752b..2ec17b0 100644 | |
--- a/PKGBUILD | |
+++ b/PKGBUILD | |
@@ -1,22 +1,64 @@ | |
# Maintainer of this PKBGUILD file: Martino Pilia <[email protected]> | |
+# Contributor: Ben Greiner <[email protected]> | |
_name=scikit-build | |
-pkgname=python-${_name} | |
+pkgname=("python-${_name}" "python2-${_name}") | |
pkgver=0.10.0 | |
-pkgrel=1 | |
+pkgrel=2 | |
pkgdesc='Improved build system generator for CPython C, C++, Cython and Fortran extensions' | |
arch=('any') | |
url='https://github.com/scikit-build/scikit-build' | |
license=('MIT') | |
-depends=('python-setuptools' 'python-wheel') | |
-makedepends=() | |
-source=("https://github.com/scikit-build/scikit-build/archive/${pkgver}.tar.gz") | |
-sha256sums=('2beec252813b20327072c15e9d997f15972aedcc6a130d0154979ff0fdb1b010') | |
+depends=('cmake' | |
+ 'python-setuptools>=28.0.0' 'python2-setuptools>=28.0.0' | |
+ 'python-wheel>=0.29.0' 'python2-wheel>=0.29.0' | |
+ 'python-packaging' 'python2-packaging') | |
+checkdepends=('git' 'ninja' 'gcc-fortran' | |
+ 'cython>=0.25.1' 'cython2>=0.25.1' | |
+ 'flake8>=3.0.4' 'python2-flake8>=3.0.4' | |
+ 'python2-pathlib2' | |
+ 'python-path.py>=11.5.0' 'python2-path.py>=11.5.0' | |
+ 'python-pytest>=4.5.0' 'python2-pytest>=4.5.0' | |
+ 'python-pytest-cov>=2.7.1' 'python2-pytest-cov>=2.7.1' | |
+ 'python-pytest-mock>=1.10.4' 'python2-pytest-mock>=1.10.4' | |
+ 'python-pytest-runner>=5.1' 'python2-pytest-runner>=5.1' | |
+ 'python-pytest-virtualenv>=1.2.5' 'python2-pytest-virtualenv>=1.2.5' | |
+ 'python-requests' 'python2-requests' | |
+ 'python-six>=1.10.0' 'python2-six>=1.10.0' | |
+ 'python-virtualenv' 'python2-virtualenv') | |
+source=("https://files.pythonhosted.org/packages/source/s/${_name}/${_name}-${pkgver}.tar.gz") | |
+sha256sums=('7342017cc82dd6178e3b19377389b8a8d1f8b429d9cdb315cfb1094e34a0f526') | |
-package() { | |
- cd "$srcdir/$_name-$pkgver" | |
+prepare() { | |
+ cp -a $_name-$pkgver{,-py2} | |
+} | |
- python setup.py install --optimize=1 --root=$pkgdir | |
+build() { | |
+ cd "$srcdir/${_name}-${pkgver}" | |
+ python setup.py build | |
+ | |
+ cd "$srcdir/${_name}-${pkgver}-py2" | |
+ python2 setup.py build | |
+} | |
+ | |
+check () { | |
+ cd $srcdir/$_name-$pkgver | |
+ pytest -k 'not (test_install_command or test_develop_command or test_test_command or test_hello_develop)' | |
+ cd $srcdir/$_name-$pkgver-py2 | |
+ pytest2 -k 'not (test_install_command or test_develop_command or test_test_command or test_hello_develop)' | |
+} | |
+ | |
+package_python-scikit-build() { | |
+depends=('python-setuptools' 'python-wheel') | |
+ cd "$srcdir/$_name-$pkgver" | |
+ python setup.py install --optimize=1 --root=$pkgdir | |
install -D -m644 ${srcdir}/$_name-$pkgver/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" | |
} | |
+package_python2-scikit-build() { | |
+depends=('python2-setuptools' 'python2-wheel') | |
+ cd "$srcdir/$_name-$pkgver-py2" | |
+ python2 setup.py install --optimize=1 --root=$pkgdir | |
+ install -D -m644 ${srcdir}/$_name-$pkgver-py2/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" | |
+} | |
+ | |
-- | |
2.23.0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment