~alpine/aports

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
3

[PATCH v2] testing/py3-pyclipper: new aport

Sascha Brawer <sascha@brawer.ch>
Details
Message ID
<20200305160057.4767-1-sascha@brawer.ch>
DKIM signature
missing
Download raw message
Patch: +68 -0
---
Changes v1 -> v2:
 - Fixed location of source in APKBUILD

 testing/py3-pyclipper/10-system-libs.patch | 30 +++++++++++++++++
 testing/py3-pyclipper/APKBUILD             | 38 ++++++++++++++++++++++
 2 files changed, 68 insertions(+)
 create mode 100644 testing/py3-pyclipper/10-system-libs.patch
 create mode 100644 testing/py3-pyclipper/APKBUILD

diff --git a/testing/py3-pyclipper/10-system-libs.patch b/testing/py3-pyclipper/10-system-libs.patch
new file mode 100644
index 0000000000..cc1c738856
--- /dev/null
+++ b/testing/py3-pyclipper/10-system-libs.patch
@@ -0,0 +1,30 @@
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@
     from Cython.Distutils import build_ext
 
     print('Development mode: Compiling Cython modules from .pyx sources.')
-    sources = ["pyclipper/pyclipper.pyx", "pyclipper/clipper.cpp"]
+    sources = ["pyclipper/pyclipper.pyx"]
 
     from setuptools.command.sdist import sdist as _sdist
 
@@ -40,7 +40,7 @@
 
 else:
     print('Distribution mode: Compiling Cython generated .cpp sources.')
-    sources = ["pyclipper/pyclipper.cpp", "pyclipper/clipper.cpp"]
+    sources = ["pyclipper/pyclipper.cpp"]
     cmdclass = {}
 
 
@@ -51,6 +51,9 @@
 ext = Extension("pyclipper",
                 sources=sources,
                 language="c++",
+                include_dirs=['/usr/include/polyclipping'],
+                libraries=['polyclipping'],
+                library_dirs=['/usr/lib'],
                 # define extra macro definitions that are used by clipper
                 # Available definitions that can be used with pyclipper:
                 # use_lines, use_int32
diff --git a/testing/py3-pyclipper/APKBUILD b/testing/py3-pyclipper/APKBUILD
new file mode 100644
index 0000000000..4b00496c7a
--- /dev/null
+++ b/testing/py3-pyclipper/APKBUILD
@@ -0,0 +1,38 @@
# Contributor: Sascha Brawer <sascha@brawer.ch>
pkgname=py3-pyclipper
_pyname=pyclipper
pkgver=1.1.0
pkgrel=0
pkgdesc="Cython wrapper for clipper"
url="https://github.com/fonttools/pyclipper"
arch="all"
license="MIT"
depends="python3"
makedepends="cython py3-setuptools python3-dev"
checkdepends="py3-pytest"
_pypiprefix="${_pyname%${_pyname#?}}"
source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.zip
	10-system-libs.patch
	"
builddir="$srcdir/$_pyname-$pkgver"

prepare() {
	default_prepare
	rm pyclipper/clipper.cpp pyclipper/clipper.hpp
}

build() {
	git init
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="d9deadb776a5a5a3bea707beac8d21f50774c8440b8059e16cc051f35957f5e2c5720b3d90117bb9848e44c41bd503f9e6d5214fb0f467ccc471085a4e4ad928  pyclipper-1.1.0.zip
f15b927ce6b40413fa3f44b8e3a4bebc8799a981babaa7e69b73b525c155dbe60c46a373509df886709daaa8c15169a9f38239f34da9d1f886f90ca61247a034  10-system-libs.patch"
-- 
2.24.1
Details
Message ID
<20200305165643.GC1323425@alpha>
In-Reply-To
<20200305160057.4767-1-sascha@brawer.ch> (view parent)
DKIM signature
missing
Download raw message
On Thu, Mar 05, 2020 at 04:00:57PM +0000, Sascha Brawer wrote:
> ---
> Changes v1 -> v2:
>  - Fixed location of source in APKBUILD
> 
>  testing/py3-pyclipper/10-system-libs.patch | 30 +++++++++++++++++
>  testing/py3-pyclipper/APKBUILD             | 38 ++++++++++++++++++++++
>  2 files changed, 68 insertions(+)
>  create mode 100644 testing/py3-pyclipper/10-system-libs.patch
>  create mode 100644 testing/py3-pyclipper/APKBUILD
> 
> diff --git a/testing/py3-pyclipper/10-system-libs.patch b/testing/py3-pyclipper/10-system-libs.patch

Please include here a short description as to why the patch is
necessary.

> new file mode 100644
> index 0000000000..cc1c738856
> --- /dev/null
> +++ b/testing/py3-pyclipper/10-system-libs.patch
> @@ -0,0 +1,30 @@
> +--- a/setup.py
> ++++ b/setup.py
> +@@ -23,7 +23,7 @@
> +     from Cython.Distutils import build_ext
> + 
> +     print('Development mode: Compiling Cython modules from .pyx sources.')
> +-    sources = ["pyclipper/pyclipper.pyx", "pyclipper/clipper.cpp"]
> ++    sources = ["pyclipper/pyclipper.pyx"]
> + 
> +     from setuptools.command.sdist import sdist as _sdist
> + 
> +@@ -40,7 +40,7 @@
> + 
> + else:
> +     print('Distribution mode: Compiling Cython generated .cpp sources.')
> +-    sources = ["pyclipper/pyclipper.cpp", "pyclipper/clipper.cpp"]
> ++    sources = ["pyclipper/pyclipper.cpp"]
> +     cmdclass = {}
> + 
> + 
> +@@ -51,6 +51,9 @@
> + ext = Extension("pyclipper",
> +                 sources=sources,
> +                 language="c++",
> ++                include_dirs=['/usr/include/polyclipping'],
> ++                libraries=['polyclipping'],
> ++                library_dirs=['/usr/lib'],
> +                 # define extra macro definitions that are used by clipper
> +                 # Available definitions that can be used with pyclipper:
> +                 # use_lines, use_int32
> diff --git a/testing/py3-pyclipper/APKBUILD b/testing/py3-pyclipper/APKBUILD
> new file mode 100644
> index 0000000000..4b00496c7a
> --- /dev/null
> +++ b/testing/py3-pyclipper/APKBUILD
> @@ -0,0 +1,38 @@
> +# Contributor: Sascha Brawer <sascha@brawer.ch>
> +pkgname=py3-pyclipper
> +_pyname=pyclipper
> +pkgver=1.1.0
> +pkgrel=0
> +pkgdesc="Cython wrapper for clipper"
> +url="https://github.com/fonttools/pyclipper"
> +arch="all"
> +license="MIT"
> +depends="python3"
> +makedepends="cython py3-setuptools python3-dev"

clipper-dev seems to be missing a dependency:

    In file included from pyclipper/pyclipper.cpp:564:
    pyclipper/extra_defines.hpp:4:10: fatal error: clipper.hpp: No such
    file or directory
        4 | #include "clipper.hpp"


> +checkdepends="py3-pytest"
> +_pypiprefix="${_pyname%${_pyname#?}}"
> +source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.zip
> +	10-system-libs.patch
> +	"
> +builddir="$srcdir/$_pyname-$pkgver"
> +
> +prepare() {
> +	default_prepare
> +	rm pyclipper/clipper.cpp pyclipper/clipper.hpp
> +}
> +
> +build() {
> +	git init

Not sure why this is here, but it appears to be unnecessary.

> +	python3 setup.py build
> +}
> +
> +check() {
> +	python3 setup.py test
> +}
> +
> +package() {
> +	python3 setup.py install --prefix=/usr --root="$pkgdir"
> +}
> +
> +sha512sums="d9deadb776a5a5a3bea707beac8d21f50774c8440b8059e16cc051f35957f5e2c5720b3d90117bb9848e44c41bd503f9e6d5214fb0f467ccc471085a4e4ad928  pyclipper-1.1.0.zip
> +f15b927ce6b40413fa3f44b8e3a4bebc8799a981babaa7e69b73b525c155dbe60c46a373509df886709daaa8c15169a9f38239f34da9d1f886f90ca61247a034  10-system-libs.patch"
> -- 
> 2.24.1


Thanks for your contribution. I've included some inline feedback.
Details
Message ID
<20200305170806.GD1323425@alpha>
In-Reply-To
<20200305160057.4767-1-sascha@brawer.ch> (view parent)
DKIM signature
missing
Download raw message
On Thu, Mar 05, 2020 at 04:00:57PM +0000, Sascha Brawer wrote:
> ---
> Changes v1 -> v2:
>  - Fixed location of source in APKBUILD
> 
>  testing/py3-pyclipper/10-system-libs.patch | 30 +++++++++++++++++
>  testing/py3-pyclipper/APKBUILD             | 38 ++++++++++++++++++++++
>  2 files changed, 68 insertions(+)
>  create mode 100644 testing/py3-pyclipper/10-system-libs.patch
>  create mode 100644 testing/py3-pyclipper/APKBUILD
> 
> diff --git a/testing/py3-pyclipper/10-system-libs.patch b/testing/py3-pyclipper/10-system-libs.patch
> new file mode 100644
> index 0000000000..cc1c738856
> --- /dev/null
> +++ b/testing/py3-pyclipper/10-system-libs.patch
> @@ -0,0 +1,30 @@
> +--- a/setup.py
> ++++ b/setup.py
> +@@ -23,7 +23,7 @@
> +     from Cython.Distutils import build_ext
> + 
> +     print('Development mode: Compiling Cython modules from .pyx sources.')
> +-    sources = ["pyclipper/pyclipper.pyx", "pyclipper/clipper.cpp"]
> ++    sources = ["pyclipper/pyclipper.pyx"]
> + 
> +     from setuptools.command.sdist import sdist as _sdist
> + 
> +@@ -40,7 +40,7 @@
> + 
> + else:
> +     print('Distribution mode: Compiling Cython generated .cpp sources.')
> +-    sources = ["pyclipper/pyclipper.cpp", "pyclipper/clipper.cpp"]
> ++    sources = ["pyclipper/pyclipper.cpp"]
> +     cmdclass = {}
> + 
> + 
> +@@ -51,6 +51,9 @@
> + ext = Extension("pyclipper",
> +                 sources=sources,
> +                 language="c++",
> ++                include_dirs=['/usr/include/polyclipping'],
> ++                libraries=['polyclipping'],
> ++                library_dirs=['/usr/lib'],
> +                 # define extra macro definitions that are used by clipper
> +                 # Available definitions that can be used with pyclipper:
> +                 # use_lines, use_int32
> diff --git a/testing/py3-pyclipper/APKBUILD b/testing/py3-pyclipper/APKBUILD
> new file mode 100644
> index 0000000000..4b00496c7a
> --- /dev/null
> +++ b/testing/py3-pyclipper/APKBUILD
> @@ -0,0 +1,38 @@
> +# Contributor: Sascha Brawer <sascha@brawer.ch>

Any reason you are not maintaining this package?

> +pkgname=py3-pyclipper
> +_pyname=pyclipper
> +pkgver=1.1.0
> +pkgrel=0
> +pkgdesc="Cython wrapper for clipper"
> +url="https://github.com/fonttools/pyclipper"
> +arch="all"
> +license="MIT"
> +depends="python3"
> +makedepends="cython py3-setuptools python3-dev"
> +checkdepends="py3-pytest"
> +_pypiprefix="${_pyname%${_pyname#?}}"
> +source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.zip
> +	10-system-libs.patch
> +	"
> +builddir="$srcdir/$_pyname-$pkgver"
> +
> +prepare() {
> +	default_prepare
> +	rm pyclipper/clipper.cpp pyclipper/clipper.hpp
> +}
> +
> +build() {
> +	git init
> +	python3 setup.py build
> +}
> +
> +check() {
> +	python3 setup.py test
> +}
> +
> +package() {
> +	python3 setup.py install --prefix=/usr --root="$pkgdir"
> +}
> +
> +sha512sums="d9deadb776a5a5a3bea707beac8d21f50774c8440b8059e16cc051f35957f5e2c5720b3d90117bb9848e44c41bd503f9e6d5214fb0f467ccc471085a4e4ad928  pyclipper-1.1.0.zip
> +f15b927ce6b40413fa3f44b8e3a4bebc8799a981babaa7e69b73b525c155dbe60c46a373509df886709daaa8c15169a9f38239f34da9d1f886f90ca61247a034  10-system-libs.patch"
> -- 
> 2.24.1
Details
Message ID
<20200305171009.GE1323425@alpha>
In-Reply-To
<20200305160057.4767-1-sascha@brawer.ch> (view parent)
DKIM signature
missing
Download raw message
On Thu, Mar 05, 2020 at 04:00:57PM +0000, Sascha Brawer wrote:
> ---
> Changes v1 -> v2:
>  - Fixed location of source in APKBUILD
> 
>  testing/py3-pyclipper/10-system-libs.patch | 30 +++++++++++++++++
>  testing/py3-pyclipper/APKBUILD             | 38 ++++++++++++++++++++++
>  2 files changed, 68 insertions(+)
>  create mode 100644 testing/py3-pyclipper/10-system-libs.patch
>  create mode 100644 testing/py3-pyclipper/APKBUILD
> 
> diff --git a/testing/py3-pyclipper/10-system-libs.patch b/testing/py3-pyclipper/10-system-libs.patch
> new file mode 100644
> index 0000000000..cc1c738856
> --- /dev/null
> +++ b/testing/py3-pyclipper/10-system-libs.patch
> @@ -0,0 +1,30 @@
> +--- a/setup.py
> ++++ b/setup.py
> +@@ -23,7 +23,7 @@
> +     from Cython.Distutils import build_ext
> + 
> +     print('Development mode: Compiling Cython modules from .pyx sources.')
> +-    sources = ["pyclipper/pyclipper.pyx", "pyclipper/clipper.cpp"]
> ++    sources = ["pyclipper/pyclipper.pyx"]
> + 
> +     from setuptools.command.sdist import sdist as _sdist
> + 
> +@@ -40,7 +40,7 @@
> + 
> + else:
> +     print('Distribution mode: Compiling Cython generated .cpp sources.')
> +-    sources = ["pyclipper/pyclipper.cpp", "pyclipper/clipper.cpp"]
> ++    sources = ["pyclipper/pyclipper.cpp"]
> +     cmdclass = {}
> + 
> + 
> +@@ -51,6 +51,9 @@
> + ext = Extension("pyclipper",
> +                 sources=sources,
> +                 language="c++",
> ++                include_dirs=['/usr/include/polyclipping'],
> ++                libraries=['polyclipping'],
> ++                library_dirs=['/usr/lib'],
> +                 # define extra macro definitions that are used by clipper
> +                 # Available definitions that can be used with pyclipper:
> +                 # use_lines, use_int32
> diff --git a/testing/py3-pyclipper/APKBUILD b/testing/py3-pyclipper/APKBUILD
> new file mode 100644
> index 0000000000..4b00496c7a
> --- /dev/null
> +++ b/testing/py3-pyclipper/APKBUILD
> @@ -0,0 +1,38 @@
> +# Contributor: Sascha Brawer <sascha@brawer.ch>
> +pkgname=py3-pyclipper
> +_pyname=pyclipper
> +pkgver=1.1.0
> +pkgrel=0
> +pkgdesc="Cython wrapper for clipper"
> +url="https://github.com/fonttools/pyclipper"
> +arch="all"
> +license="MIT"
> +depends="python3"
> +makedepends="cython py3-setuptools python3-dev"
> +checkdepends="py3-pytest"
> +_pypiprefix="${_pyname%${_pyname#?}}"
> +source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.zip
> +	10-system-libs.patch
> +	"
> +builddir="$srcdir/$_pyname-$pkgver"
> +
> +prepare() {
> +	default_prepare
> +	rm pyclipper/clipper.cpp pyclipper/clipper.hpp
> +}
> +
> +build() {
> +	git init
> +	python3 setup.py build
> +}
> +
> +check() {
> +	python3 setup.py test
> +}
> +
> +package() {
> +	python3 setup.py install --prefix=/usr --root="$pkgdir"
> +}
> +
> +sha512sums="d9deadb776a5a5a3bea707beac8d21f50774c8440b8059e16cc051f35957f5e2c5720b3d90117bb9848e44c41bd503f9e6d5214fb0f467ccc471085a4e4ad928  pyclipper-1.1.0.zip
> +f15b927ce6b40413fa3f44b8e3a4bebc8799a981babaa7e69b73b525c155dbe60c46a373509df886709daaa8c15169a9f38239f34da9d1f886f90ca61247a034  10-system-libs.patch"
> -- 
> 2.24.1

This package already exists[0] in aports. If you want to contribute to
it, please update that package instead of sending a new one.

[0]:
https://pkgs.alpinelinux.org/package/edge/community/x86_64/py3-pyclipper
Reply to thread Export thread (mbox)