Date: Friday, March 18, 2022 @ 16:44:48 Author: archange Revision: 1158645
FS#74129 Backport PR#678 And actually revamp the PKGBUILD entirely Added: python-scikit-build/trunk/fix-byte-compilation.patch Modified: python-scikit-build/trunk/PKGBUILD Deleted: python-scikit-build/trunk/issue458.patch ----------------------------+ PKGBUILD | 64 +++++++++++++++++++++++++++++++++---------- fix-byte-compilation.patch | 8 +++++ issue458.patch | 29 ------------------- 3 files changed, 58 insertions(+), 43 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-03-18 16:44:02 UTC (rev 1158644) +++ PKGBUILD 2022-03-18 16:44:48 UTC (rev 1158645) @@ -1,31 +1,67 @@ # Maintainer: Andrzej Giniewicz <[email protected]> +# Maintainer: Bruno Pagani <[email protected]> # Contributor: Martino Pilia <[email protected]> # Contributor: Ben Greiner <[email protected]> -# TODO: think about including check() after #460 and #469 are fixed upstream - pkgname=python-scikit-build pkgver=0.13.1 -pkgrel=1 +pkgrel=2 pkgdesc="Improved build system generator for CPython C, C++, Cython and Fortran extensions" -arch=('any') +arch=(any) url="https://scikit-build.org" -license=('MIT') -depends=('cmake' 'python-distro' 'python-wheel') -source=("${pkgname}-${pkgver}.tar.gz::https://github.com/scikit-build/scikit-build/archive/${pkgver}.tar.gz") -sha256sums=('d7e16ba91ea68b8c349a455793dbad39df79539da7cd3afaa0c90feaa1f791f9') +license=(MIT) +depends=(cmake python-distro python-packaging python-setuptools python-wheel) +makedepends=(git python-setuptools-scm) +checkdepends=( + cython + gcc + gcc-fortran + ninja + python-build + python-path + python-pytest + python-pytest-mock + python-pytest-runner + python-pytest-virtualenv + python-requests + python-six + python-virtualenv +) +_tag=9295c828189c3d7a813b2faf04f535f777d33254 # git rev-parse ${pkgver} +source=(git+https://github.com/scikit-build/scikit-build.git#tag=${_tag}?signed + ${pkgname}-use-setuptools-scm.patch::https://github.com/scikit-build/scikit-build/commit/22b96b747c5276d0e6c3673f350267d6177e9310.patch + fix-byte-compilation.patch) +sha256sums=('SKIP' + '928670f003cf94ee1612702a03bd341338bd1a7a63222d30ca3efb8601d70bca' + '4300d021991de1537ee746e3a7006a0b286a86295f0f7cf41d4aab72e4e14f89') +validpgpkeys=(2FDEC9863E5E14C7BC429F27B9D0E45146A241E8) # Henry Schreiner <[email protected]> +prepare() { + cd scikit-build + # Fix SCM detected version + patch -p1 < ../${pkgname}-use-setuptools-scm.patch + rm -r .git + echo "Version: ${pkgver}" > PKG-INFO + # Backport of https://github.com/scikit-build/scikit-build/pull/678 + patch -p1 < ../fix-byte-compilation.patch +} + build() { - cd "${srcdir}/scikit-build-${pkgver}" - + cd scikit-build python setup.py build_ext --inplace python setup.py build } +check() { + cd scikit-build + # Disable coverage + sed -i 's|--cov --cov-report xml ||' setup.cfg + python -m venv --system-site-packages test-env + test-env/bin/python /usr/bin/pytest -x -vv --color=yes +} + package() { - cd "${srcdir}/scikit-build-${pkgver}" - + cd scikit-build python setup.py install --skip-build --root="$pkgdir" --optimize=1 - - install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}/ } Added: fix-byte-compilation.patch =================================================================== --- fix-byte-compilation.patch (rev 0) +++ fix-byte-compilation.patch 2022-03-18 16:44:48 UTC (rev 1158645) @@ -0,0 +1,8 @@ +diff --git a/skbuild/command/install_lib.py b/skbuild/command/install_lib.py +--- a/skbuild/command/install_lib.py ++++ b/skbuild/command/install_lib.py +@@ -16,3 +16,4 @@ def install(self): + outfiles = super(install_lib, self).install() + if outfiles is not None: + distutils_log.info("copied %d files" % len(outfiles)) ++ return outfiles Deleted: issue458.patch =================================================================== --- issue458.patch 2022-03-18 16:44:02 UTC (rev 1158644) +++ issue458.patch 2022-03-18 16:44:48 UTC (rev 1158645) @@ -1,29 +0,0 @@ -diff -urN scikit-build-0.10.0.orig/requirements.txt scikit-build-0.10.0/requirements.txt ---- scikit-build-0.10.0.orig/requirements.txt 2020-02-04 13:44:07.340306400 +0100 -+++ scikit-build-0.10.0/requirements.txt 2020-02-04 13:45:00.054455198 +0100 -@@ -1,3 +1,4 @@ - wheel>=0.29.0 - setuptools>=28.0.0 --packaging -\ Brak znaku nowej linii na końcu pliku -+packaging -+distro -diff -urN scikit-build-0.10.0.orig/skbuild/platform_specifics/linux.py scikit-build-0.10.0/skbuild/platform_specifics/linux.py ---- scikit-build-0.10.0.orig/skbuild/platform_specifics/linux.py 2020-02-04 13:44:07.343639785 +0100 -+++ scikit-build-0.10.0/skbuild/platform_specifics/linux.py 2020-02-04 13:45:35.738340612 +0100 -@@ -1,5 +1,6 @@ - """This module defines object specific to Linux platform.""" - -+import distro - import platform - import sys - import textwrap -@@ -24,7 +25,7 @@ - """ - # gentoo, slackware: Compiler is available by default. - -- distribution_name = platform.linux_distribution()[0] -+ distribution_name = distro.id() - cmd = "" - if distribution_name in [ - 'debian', 'Ubuntu', 'mandrake', 'mandriva']:
