Date: Monday, January 9, 2023 @ 19:39:01
Author: dvzrv
Revision: 1382174
archrelease: copy trunk to community-any
Added:
python-solidpython/repos/community-any/0001-Switch-to-correct-PEP517-build-system.patch
(from rev 1382173,
python-solidpython/trunk/0001-Switch-to-correct-PEP517-build-system.patch)
python-solidpython/repos/community-any/0002-Add-setuptools-to-dependencies.patch
(from rev 1382173,
python-solidpython/trunk/0002-Add-setuptools-to-dependencies.patch)
python-solidpython/repos/community-any/PKGBUILD
(from rev 1382173, python-solidpython/trunk/PKGBUILD)
Deleted:
python-solidpython/repos/community-any/PKGBUILD
--------------------------------------------------+
0001-Switch-to-correct-PEP517-build-system.patch | 39 +++++++++
0002-Add-setuptools-to-dependencies.patch | 28 ++++++
PKGBUILD | 91 +++++++++++----------
3 files changed, 118 insertions(+), 40 deletions(-)
Copied:
python-solidpython/repos/community-any/0001-Switch-to-correct-PEP517-build-system.patch
(from rev 1382173,
python-solidpython/trunk/0001-Switch-to-correct-PEP517-build-system.patch)
===================================================================
--- 0001-Switch-to-correct-PEP517-build-system.patch
(rev 0)
+++ 0001-Switch-to-correct-PEP517-build-system.patch 2023-01-09 19:39:01 UTC
(rev 1382174)
@@ -0,0 +1,39 @@
+From d6568ee7e1f85025725597d1cdcb62b3d0a1ded1 Mon Sep 17 00:00:00 2001
+From: David Runge <[email protected]>
+Date: Mon, 9 Jan 2023 20:09:25 +0100
+Subject: [PATCH 1/2] Switch to correct PEP517 build-system
+
+pyproject.toml:
+Since poetry is used, switch to the build-system setup as documented
+upstream (https://python-poetry.org/docs/pyproject#poetry-and-pep-517).
+---
+ pyproject.toml | 16 ++--------------
+ 1 file changed, 2 insertions(+), 14 deletions(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index 6554128..1ab7617 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -44,17 +44,5 @@ tox = "^tox 3.11"
+
+
+ [build-system]
+-requires = [
+- "poetry>=0.12",
+- # See
https://github.com/pypa/setuptools/issues/2353#issuecomment-683781498
+- # for the rest of these requirements,
+- # -ETJ 31 December 2020
+- "setuptools>=30.3.0,<50",
+- "wheel",
+- "pytest-runner",
+- "setuptools_scm>=3.3.1",
+-
+-]
+-
+-build-backend = "poetry.masonry.api"
+-
++requires = ["poetry-core>=1.0.0"]
++build-backend = "poetry.core.masonry.api"
+--
+2.39.0
+
Copied:
python-solidpython/repos/community-any/0002-Add-setuptools-to-dependencies.patch
(from rev 1382173,
python-solidpython/trunk/0002-Add-setuptools-to-dependencies.patch)
===================================================================
--- 0002-Add-setuptools-to-dependencies.patch (rev 0)
+++ 0002-Add-setuptools-to-dependencies.patch 2023-01-09 19:39:01 UTC (rev
1382174)
@@ -0,0 +1,28 @@
+From 025ca1c1bd9848bf12bff72b80b8d05d8e24968d Mon Sep 17 00:00:00 2001
+From: David Runge <[email protected]>
+Date: Mon, 9 Jan 2023 20:25:43 +0100
+Subject: [PATCH 2/2] Add setuptools to dependencies
+
+pyproject.toml:
+Pkg_resources is used in solid/solidpython.py, hence this project
+depends on setuptools until the use of pkg_resources is replaced with
+something else.
+---
+ pyproject.toml | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index 1ab7617..8b31bb7 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -38,6 +38,7 @@ euclid3 = "^0.1.0"
+ pypng = "^0.0.19"
+ PrettyTable = "=0.7.2"
+ ply = "^3.11"
++setuptools = ">=65.6.3"
+
+ [tool.poetry.dev-dependencies]
+ tox = "^tox 3.11"
+--
+2.39.0
+
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2023-01-09 19:38:34 UTC (rev 1382173)
+++ PKGBUILD 2023-01-09 19:39:01 UTC (rev 1382174)
@@ -1,40 +0,0 @@
-# Maintainer: Filipe Laíns (FFY00) <[email protected]>
-
-_pkgname=SolidPython
-pkgname=python-solidpython
-pkgver=1.1.3
-pkgrel=1
-_commit=0a4f539c31a25df52a42bab2ceeffafd45596f73 # missing tag for 1.1.3
-pkgdesc='Python frontend for solid modelling that compiles to OpenSCAD'
-arch=('any')
-url='https://github.com/SolidCode/SolidPython'
-license=('LGPL')
-depends=('python-euclid3' 'python-pypng' 'python-prettytable')
-makedepends=('python-build' 'python-installer' 'python-poetry'
'python-setuptools-scm' 'python-wheel')
-checkdepends=('python-pytest-runner')
-source=("https://github.com/SolidCode/SolidPython/archive/$_commit.tar.gz")
-sha512sums=('d0f701e9508721e3f7f5a2b65dfe5692cac425374f3b0136a5792c5fa93ba7c3295288149cc07ad9c902df7b973e1c80f1023d44ec6919c33f52590a15573f6d')
-
-prepare() {
- cd $_pkgname-*
-
- sed -i -e '/tox/d' -e 's|setuptools>=.*|setuptools\",|' pyproject.toml
-}
-
-build() {
- cd $_pkgname-*
-
- python -m build --wheel --no-isolation
-}
-
-check() {
- cd $_pkgname-*
-
- PYTHONPATH=$(pwd) solid/test/run_all_tests.sh
-}
-
-package() {
- cd $_pkgname-*
-
- python -m installer --destdir="$pkgdir" dist/*.whl
-}
Copied: python-solidpython/repos/community-any/PKGBUILD (from rev 1382173,
python-solidpython/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2023-01-09 19:39:01 UTC (rev 1382174)
@@ -0,0 +1,51 @@
+# Maintainer: Filipe Laíns (FFY00) <[email protected]>
+
+_pkgname=SolidPython
+pkgname=python-solidpython
+pkgver=1.1.3
+pkgrel=2
+# missing tag for 1.1.3: https://github.com/SolidCode/SolidPython/issues/202
+_commit=0a4f539c31a25df52a42bab2ceeffafd45596f73
+pkgdesc='Python frontend for solid modelling that compiles to OpenSCAD'
+arch=('any')
+url='https://github.com/SolidCode/SolidPython'
+license=('LGPL2.1')
+depends=('python-euclid3' 'python-prettytable' 'python-ply' 'python-pypng'
'python-setuptools')
+makedepends=('git' 'python-build' 'python-installer' 'python-poetry-core'
'python-wheel')
+source=(
+ "git+https://github.com/SolidCode/SolidPython#commit=$_commit"
+ 0001-Switch-to-correct-PEP517-build-system.patch
+ 0002-Add-setuptools-to-dependencies.patch
+)
+sha512sums=('SKIP'
+
'696a2ff91c898a46072d1f766f5be98ba98024d87095c535cec8488cf78a1e629d2311c80e34f095bb2f7d36396bd834c149c2a107f09023362c505b568b8b27'
+
'b16fec04ec3c28d7f2f83fb956c7a042ee749df5c1977b079a1bd162c8c644449c5a1f50b83fd2a1a1debe77adaff01511cf0915e0e3c46d2b08cc17a1f140a0')
+
+prepare() {
+ # switch to proper PEP517 build-system and fix direct dependencies:
+ # https://github.com/SolidCode/SolidPython/pull/203
+ patch -Np1 -d $_pkgname -i
../0001-Switch-to-correct-PEP517-build-system.patch
+ patch -Np1 -d $_pkgname -i ../0002-Add-setuptools-to-dependencies.patch
+}
+
+build() {
+ cd $_pkgname
+
+ python -m build --wheel --no-isolation
+}
+
+check() {
+ local site_packages=$(python -c "import site;
print(site.getsitepackages()[0])")
+
+ cd $_pkgname
+ python -m installer --destdir=test_dir dist/*.whl
+ export PYTHONPATH="test_dir/$site_packages:$PYTHONPATH"
+
+ python -m unittest discover -vs solid/test/
+}
+
+package() {
+ cd $_pkgname
+
+ python -m installer --destdir="$pkgdir" dist/*.whl
+}