Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Fix versioning in python eggs
@ 2020-10-15  1:53 ahesford
  2020-10-15  2:12 ` [PR PATCH] [Updated] " ahesford
  2020-10-15  2:25 ` [PR PATCH] [Closed]: " ahesford
  0 siblings, 2 replies; 3+ messages in thread
From: ahesford @ 2020-10-15  1:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 792 bytes --]

There is a new pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages setuptools
https://github.com/void-linux/void-packages/pull/25614

Fix versioning in python eggs
Several python packages attempt to determine versioning using the `setuptools_scm` package and its plugin, `setuptools_scm_git_archive`. These dependencies have been packages and added to `hostmakedepends` for packages that previously attempted to either patch out (sometime incorrectly) the requirement or allow `setuptools` to download the egg at build time.

By doing this right, we ensure that the `egg-info` for each of the dependent packages is correctly versioned.

A patch file from https://github.com/void-linux/void-packages/pull/25614.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-setuptools-25614.patch --]
[-- Type: text/x-diff, Size: 13340 bytes --]

From b7b7fe8dd9f0173a50190318486d38f6f5437d33 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 14 Oct 2020 20:55:25 -0400
Subject: [PATCH 1/9] New package: python3-setuptools_scm-4.1.2

---
 srcpkgs/python3-setuptools_scm/template | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 srcpkgs/python3-setuptools_scm/template

diff --git a/srcpkgs/python3-setuptools_scm/template b/srcpkgs/python3-setuptools_scm/template
new file mode 100644
index 00000000000..c20dce402f4
--- /dev/null
+++ b/srcpkgs/python3-setuptools_scm/template
@@ -0,0 +1,18 @@
+# Template file for 'python3-setuptools_scm'
+pkgname=python3-setuptools_scm
+version=4.1.2
+revision=1
+wrksrc="${pkgname#python3-}-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="python3-setuptools python3-wheel"
+short_desc="Manage Python package versions with SCM tags"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://github.com/pypa/setuptools_scm"
+distfiles="${PYPI_SITE}/s/setuptools_scm/setuptools_scm-${version}.tar.gz"
+checksum=a8994582e716ec690f33fec70cca0f85bd23ec974e3f783233e4879090a7faa8
+
+post_install() {
+	vlicense LICENSE
+}

From 4597e73b845323b602c9fceaf2e557b2e907eb01 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 14 Oct 2020 21:21:42 -0400
Subject: [PATCH 2/9] New package: python3-setuptools_scm_git_archive-1.1

---
 .../template                                  | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 srcpkgs/python3-setuptools_scm_git_archive/template

diff --git a/srcpkgs/python3-setuptools_scm_git_archive/template b/srcpkgs/python3-setuptools_scm_git_archive/template
new file mode 100644
index 00000000000..cdb88c0294d
--- /dev/null
+++ b/srcpkgs/python3-setuptools_scm_git_archive/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-setuptools_scm_git_archive'
+pkgname=python3-setuptools_scm_git_archive
+version=1.1
+revision=1
+_pkgname="${pkgname#python3-}"
+wrksrc="${_pkgname}-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools_scm"
+depends="python3-setuptools_scm"
+short_desc="Support for Git archives in setuptools_scm"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://github.com/Changaco/setuptools_scm_git_archive"
+distfiles="${PYPI_SITE}/s/setuptools_scm_git_archive/setuptools_scm_git_archive-${version}.tar.gz"
+checksum=6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062
+
+post_install() {
+	vlicense LICENSE
+}

From 2a8475daad3c73888cb73a5440ccd3da7cecb77c Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 14 Oct 2020 21:07:43 -0400
Subject: [PATCH 3/9] afew: add python3-setuptools_scm to hostmakedepends

---
 srcpkgs/afew/template | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/afew/template b/srcpkgs/afew/template
index e89ee064a6c..a8ca1dac5b1 100644
--- a/srcpkgs/afew/template
+++ b/srcpkgs/afew/template
@@ -1,9 +1,9 @@
 # Template file for 'afew'
 pkgname=afew
 version=3.0.1
-revision=2
+revision=3
 build_style=python3-module
-hostmakedepends="python3-setuptools python3-Sphinx pkg-config"
+hostmakedepends="python3-setuptools_scm python3-Sphinx pkg-config"
 depends="notmuch-python3 python3-dkimpy python3-chardet notmuch"
 checkdepends="python3-pytest python3-freezegun $depends"
 short_desc="Initial tagging script for notmuch mail"
@@ -13,11 +13,6 @@ homepage="https://github.com/afewmail/afew"
 distfiles="${PYPI_SITE}/a/afew/afew-${version}.tar.gz"
 checksum=ce857fe1a3bc0982c1dac81aef66cacc148e4f9db06da720f869392af1c2ee72
 
-post_patch() {
-	# version is pre-generated
-	vsed -i -e "s/'setuptools_scm'//" setup.py
-}
-
 post_build() {
 	python3 setup.py build_sphinx -b man
 }

From 5c087db2f34f44e37dc4c2c26f800ef88f033d33 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 14 Oct 2020 21:22:45 -0400
Subject: [PATCH 4/9] python3-Cheroot: update to 8.4.5.

---
 srcpkgs/python3-Cheroot/template | 23 ++++++++---------------
 1 file changed, 8 insertions(+), 15 deletions(-)

diff --git a/srcpkgs/python3-Cheroot/template b/srcpkgs/python3-Cheroot/template
index 95fb8cd16fd..efd340079f0 100644
--- a/srcpkgs/python3-Cheroot/template
+++ b/srcpkgs/python3-Cheroot/template
@@ -1,29 +1,22 @@
 # Template file for 'python3-Cheroot'
 pkgname=python3-Cheroot
-version=8.3.1
-revision=3
+version=8.4.5
+revision=1
 wrksrc="cheroot-${version}"
 build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-setuptools python3-six python3-more-itertools
- python3-jaraco.functools"
+hostmakedepends="python3-setuptools_scm_git_archive"
+depends="python3-setuptools python3-six
+ python3-more-itertools python3-jaraco.functools"
 short_desc="High-performance, pure-Python HTTP server (Python3)"
 maintainer="bra1nwave <bra1nwave@protonmail.com>"
 license="BSD-3-Clause"
 homepage="https://github.com/cherrypy/cheroot"
 changelog="https://github.com/cherrypy/cheroot/blob/master/CHANGES.rst"
 distfiles="${PYPI_SITE}/c/cheroot/cheroot-${version}.tar.gz"
-checksum=7076d5845f64d729e4155ec2650ad24ee70209340d11b9e619a82e9210a579b8
-conflicts="python-Cheroot>=0"
-
-pre_build() {
-	vsed -i setup.cfg \
-		-e '/setuptools_scm/d' \
-		-e '/use_scm_version/d' \
-		-e "/name = /a\
-		version = ${version}"
-}
+checksum=b6c18caf5f79cdae668c35fc8309fc88ea4a964cce9e2ca8504fab13bcf57301
+alternatives="cheroot:cheroot:/usr/bin/cheroot3"
 
 post_install() {
+	mv "${DESTDIR}/usr/bin/cheroot" "${DESTDIR}/usr/bin/cheroot3"
 	vlicense LICENSE.md
 }

From f3ec4ca69a68a2b4d20cb6868414bc0b18daf70d Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 14 Oct 2020 21:25:08 -0400
Subject: [PATCH 5/9] python3-CherryPy: add python3-setuptools_scm to
 hostmakedepends

---
 srcpkgs/python3-CherryPy/template | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/python3-CherryPy/template b/srcpkgs/python3-CherryPy/template
index c21123b9baf..90b48900c9d 100644
--- a/srcpkgs/python3-CherryPy/template
+++ b/srcpkgs/python3-CherryPy/template
@@ -1,12 +1,12 @@
 # Template file for 'python3-CherryPy'
 pkgname=python3-CherryPy
 version=18.6.0
-revision=2
+revision=3
 wrksrc="CherryPy-${version}"
 build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-setuptools python3-Cheroot python3-portend python3-zc.lockfile
- python3-jaraco.collections"
+hostmakedepends="python3-setuptools_scm"
+depends="python3-setuptools python3-Cheroot python3-portend
+ python3-zc.lockfile python3-jaraco.collections"
 short_desc="Object-oriented HTTP framework (Python3)"
 maintainer="bra1nwave <bra1nwave@protonmail.com>"
 license="BSD-3-Clause"
@@ -16,12 +16,6 @@ distfiles="${PYPI_SITE}/C/CherryPy/CherryPy-${version}.tar.gz"
 checksum=56608edd831ad00991ae585625e0206ed61cf1a0850e4b2cc48489fb2308c499
 alternatives="cherrypy:cherryd:/usr/bin/cherryd3"
 
-pre_build() {
-	vsed -i setup.py \
-		-e '/setuptools_scm/d' \
-		-e "s|use_scm_version=True|version='${version}'|"
-}
-
 post_install() {
 	mv ${DESTDIR}/usr/bin/cherryd{,3}
 	vlicense LICENSE.md

From 4b4dee23de866ea6a8055681f77b8bc8f6b91769 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 14 Oct 2020 21:31:09 -0400
Subject: [PATCH 6/9] python3-ansible-lint: update distfiles

Also add python3-setuptools_scm_git_archive to hostmakedepends.
---
 srcpkgs/python3-ansible-lint/template | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/python3-ansible-lint/template b/srcpkgs/python3-ansible-lint/template
index dfb1a82418d..19eeebcd4e5 100644
--- a/srcpkgs/python3-ansible-lint/template
+++ b/srcpkgs/python3-ansible-lint/template
@@ -1,22 +1,21 @@
 # Template file for 'python3-ansible-lint'
 pkgname=python3-ansible-lint
 version=4.3.5
-revision=1
+revision=2
 wrksrc="ansible-lint-${version}"
 build_style=python3-module
-hostmakedepends="python3-setuptools"
+hostmakedepends="python3-setuptools_scm_git_archive"
 depends="ansible python3-six python3-yaml python3-ruamel.yaml"
 short_desc="Linter for Ansible files"
 maintainer="Joseph LaFreniere <joseph@lafreniere.xyz>"
 license="MIT"
 homepage="https://github.com/willthames/ansible-lint"
 changelog="https://raw.githubusercontent.com/willthames/ansible-lint/master/CHANGELOG.md"
-distfiles="${homepage}/archive/v${version}.tar.gz"
-checksum=df5ffb79cbd76ab02bf6dd4b493502d6ba59fafb669d6f57f487251a6c955adc
+distfiles="${PYPI_SITE}/a/ansible-lint/ansible-lint-${version}.tar.gz"
+checksum=bec230cf5fcc4d976246d4170da3ae289715f99185529ca8bba4b3c173035656
 
 post_patch() {
-	vsed -i pyproject.toml -e '/setuptools_scm/d'
-	vsed -i setup.cfg -e '/setup_requires =/,/setuptools_scm_git_archive/d'
+	vsed -e "/name =/a version = ${version}" -i setup.cfg
 }
 
 post_install() {

From 998cc8b710f8d6639344060bb18d9293d1937566 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 14 Oct 2020 21:33:31 -0400
Subject: [PATCH 7/9] python3-portend: update to 2.6.

---
 srcpkgs/python3-portend/template | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/python3-portend/template b/srcpkgs/python3-portend/template
index 6cf1d03eda6..42bf48ae2ec 100644
--- a/srcpkgs/python3-portend/template
+++ b/srcpkgs/python3-portend/template
@@ -1,24 +1,19 @@
 # Template file for 'python3-portend'
 pkgname=python3-portend
-version=2.5
-revision=4
+version=2.6
+revision=1
 wrksrc="portend-${version}"
 build_style=python3-module
-hostmakedepends="python3-setuptools"
+hostmakedepends="python3-setuptools_scm"
 depends="python3-tempora"
 short_desc="TCP port monitoring utilities (Python3)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://github.com/jaraco/portend"
 changelog="https://github.com/jaraco/portend/blob/master/CHANGES.rst"
-distfiles="https://github.com/jaraco/portend/archive/${version}.tar.gz"
-checksum=69fa3194739142b62bd6e44f0f0cb0828ddee521f4c7b4634abc5b5e9a54f85a
+distfiles="${PYPI_SITE}/p/portend/portend-${version}.tar.gz"
+checksum=600dd54175e17e9347e5f3d4217aa8bcf4bf4fa5ffbc4df034e5ec1ba7cdaff5
 
-pre_build() {
-	sed -i setup.py \
-		-e '/setuptools_scm/d' \
-		-e "s|use_scm_version=True|version='${version}'|"
-}
 post_install() {
 	vlicense LICENSE
 }

From 5826901b880fc90e80da75184f8dd0d5df80516d Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 14 Oct 2020 21:44:01 -0400
Subject: [PATCH 8/9] python3-tempora: update to 4.0.0.

---
 srcpkgs/python3-tempora/template | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/python3-tempora/template b/srcpkgs/python3-tempora/template
index c4dbebd31b3..fac5a88deff 100644
--- a/srcpkgs/python3-tempora/template
+++ b/srcpkgs/python3-tempora/template
@@ -1,25 +1,20 @@
 # Template file for 'python3-tempora'
 pkgname=python3-tempora
-version=2.0.0
-revision=3
+version=4.0.0
+revision=1
 wrksrc="tempora-${version}"
 build_style=python3-module
-hostmakedepends="python3-setuptools"
+hostmakedepends="python3-setuptools_scm python3-toml"
 depends="python3-setuptools python3-six python3-pytz"
 short_desc="Objects and routines pertaining to date and time (Python3)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://github.com/jaraco/tempora"
 distfiles="${PYPI_SITE}/t/tempora/tempora-${version}.tar.gz"
-checksum=f11df59b34b9a87d395cce031274f6ff3d2be2171dd1db32dff9ab1fcb5352fa
-conflicts="python-tempora>=0"
-
-pre_build() {
-	vsed -i setup.py \
-		 -e '/setuptools_scm/d' \
-		 -e "s|use_scm_version=True|version='${version}'|"
-}
+checksum=599a3a910b377f2b544c7b221582ecf4cb049b017c994b37f2b1a9ed1099716e
+alternatives="tempora:calc-prorate:/usr/bin/calc-prorate3"
 
 post_install() {
 	vlicense LICENSE
+	mv "${DESTDIR}/usr/bin/calc-prorate" "${DESTDIR}/usr/bin/calc-prorate3"
 }

From 60c8770c437afe46f203ef239b2aff04b190c86a Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 14 Oct 2020 21:47:08 -0400
Subject: [PATCH 9/9] python3-ultrajson: update to 4.0.1.

---
 srcpkgs/python3-ultrajson/template | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/python3-ultrajson/template b/srcpkgs/python3-ultrajson/template
index faf1e2e7628..6be2b6d92d5 100644
--- a/srcpkgs/python3-ultrajson/template
+++ b/srcpkgs/python3-ultrajson/template
@@ -1,21 +1,17 @@
 # Template file for 'python3-ultrajson'
 pkgname=python3-ultrajson
-version=4.0.0
+version=4.0.1
 revision=1
 wrksrc="ujson-${version}"
 build_style=python3-module
-hostmakedepends="python3-setuptools"
+hostmakedepends="python3-setuptools_scm"
 makedepends="python3-devel"
 short_desc="Ultra fast JSON encoder and decoder for Python"
 maintainer="Andrew J. Hesford <ajh@sideband.org>"
 license="BSD-3-Clause"
 homepage="https://github.com/ultrajson/ultrajson"
 distfiles="${PYPI_SITE}/u/ujson/ujson-${version}.tar.gz"
-checksum=dba37ad41906d7f9ff52deeb729b9add7e305b94673b41979e9a6c5914083aa8
-
-post_patch() {
-	vsed -i setup.py -e 's/"setuptools_scm"//g'
-}
+checksum=26cf6241b36ff5ce4539ae687b6b02673109c5e3efc96148806a7873eaa229d3
 
 post_install() {
 	vlicense LICENSE.txt

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Updated] Fix versioning in python eggs
  2020-10-15  1:53 [PR PATCH] Fix versioning in python eggs ahesford
@ 2020-10-15  2:12 ` ahesford
  2020-10-15  2:25 ` [PR PATCH] [Closed]: " ahesford
  1 sibling, 0 replies; 3+ messages in thread
From: ahesford @ 2020-10-15  2:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 797 bytes --]

There is an updated pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages setuptools
https://github.com/void-linux/void-packages/pull/25614

Fix versioning in python eggs
Several python packages attempt to determine versioning using the `setuptools_scm` package and its plugin, `setuptools_scm_git_archive`. These dependencies have been packages and added to `hostmakedepends` for packages that previously attempted to either patch out (sometime incorrectly) the requirement or allow `setuptools` to download the egg at build time.

By doing this right, we ensure that the `egg-info` for each of the dependent packages is correctly versioned.

A patch file from https://github.com/void-linux/void-packages/pull/25614.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-setuptools-25614.patch --]
[-- Type: text/x-diff, Size: 12011 bytes --]

From e34d88051041bf21dc651d9d0794feaf4345e381 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 14 Oct 2020 20:55:25 -0400
Subject: [PATCH 1/8] New package: python3-setuptools_scm-4.1.2

---
 srcpkgs/python3-setuptools_scm/template | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 srcpkgs/python3-setuptools_scm/template

diff --git a/srcpkgs/python3-setuptools_scm/template b/srcpkgs/python3-setuptools_scm/template
new file mode 100644
index 00000000000..c20dce402f4
--- /dev/null
+++ b/srcpkgs/python3-setuptools_scm/template
@@ -0,0 +1,18 @@
+# Template file for 'python3-setuptools_scm'
+pkgname=python3-setuptools_scm
+version=4.1.2
+revision=1
+wrksrc="${pkgname#python3-}-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+depends="python3-setuptools python3-wheel"
+short_desc="Manage Python package versions with SCM tags"
+maintainer="Andrew J. Hesford <ajh@sideband.org>"
+license="MIT"
+homepage="https://github.com/pypa/setuptools_scm"
+distfiles="${PYPI_SITE}/s/setuptools_scm/setuptools_scm-${version}.tar.gz"
+checksum=a8994582e716ec690f33fec70cca0f85bd23ec974e3f783233e4879090a7faa8
+
+post_install() {
+	vlicense LICENSE
+}

From 007cfac96ac1b1a615d401014c2213a7e74385d1 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 14 Oct 2020 21:07:43 -0400
Subject: [PATCH 2/8] afew: add python3-setuptools_scm to hostmakedepends

---
 srcpkgs/afew/template | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/afew/template b/srcpkgs/afew/template
index e89ee064a6c..a8ca1dac5b1 100644
--- a/srcpkgs/afew/template
+++ b/srcpkgs/afew/template
@@ -1,9 +1,9 @@
 # Template file for 'afew'
 pkgname=afew
 version=3.0.1
-revision=2
+revision=3
 build_style=python3-module
-hostmakedepends="python3-setuptools python3-Sphinx pkg-config"
+hostmakedepends="python3-setuptools_scm python3-Sphinx pkg-config"
 depends="notmuch-python3 python3-dkimpy python3-chardet notmuch"
 checkdepends="python3-pytest python3-freezegun $depends"
 short_desc="Initial tagging script for notmuch mail"
@@ -13,11 +13,6 @@ homepage="https://github.com/afewmail/afew"
 distfiles="${PYPI_SITE}/a/afew/afew-${version}.tar.gz"
 checksum=ce857fe1a3bc0982c1dac81aef66cacc148e4f9db06da720f869392af1c2ee72
 
-post_patch() {
-	# version is pre-generated
-	vsed -i -e "s/'setuptools_scm'//" setup.py
-}
-
 post_build() {
 	python3 setup.py build_sphinx -b man
 }

From 93bd5b359cb973bb8986cc1b0855d473b3a05a84 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 14 Oct 2020 21:22:45 -0400
Subject: [PATCH 3/8] python3-Cheroot: update to 8.4.5.

---
 srcpkgs/python3-Cheroot/template | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/srcpkgs/python3-Cheroot/template b/srcpkgs/python3-Cheroot/template
index 95fb8cd16fd..7dc5e26bf18 100644
--- a/srcpkgs/python3-Cheroot/template
+++ b/srcpkgs/python3-Cheroot/template
@@ -1,29 +1,27 @@
 # Template file for 'python3-Cheroot'
 pkgname=python3-Cheroot
-version=8.3.1
-revision=3
+version=8.4.5
+revision=1
 wrksrc="cheroot-${version}"
 build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-setuptools python3-six python3-more-itertools
- python3-jaraco.functools"
+hostmakedepends="python3-setuptools_scm"
+depends="python3-setuptools python3-six
+ python3-more-itertools python3-jaraco.functools"
 short_desc="High-performance, pure-Python HTTP server (Python3)"
 maintainer="bra1nwave <bra1nwave@protonmail.com>"
 license="BSD-3-Clause"
 homepage="https://github.com/cherrypy/cheroot"
 changelog="https://github.com/cherrypy/cheroot/blob/master/CHANGES.rst"
 distfiles="${PYPI_SITE}/c/cheroot/cheroot-${version}.tar.gz"
-checksum=7076d5845f64d729e4155ec2650ad24ee70209340d11b9e619a82e9210a579b8
-conflicts="python-Cheroot>=0"
+checksum=b6c18caf5f79cdae668c35fc8309fc88ea4a964cce9e2ca8504fab13bcf57301
+alternatives="cheroot:cheroot:/usr/bin/cheroot3"
 
-pre_build() {
-	vsed -i setup.cfg \
-		-e '/setuptools_scm/d' \
-		-e '/use_scm_version/d' \
-		-e "/name = /a\
-		version = ${version}"
+post_patch() {
+	# Don't need setuptools_scm_git_archive for the tarball
+	vsed -e '/setuptools_scm_git_archive/d' -i setup.cfg
 }
 
 post_install() {
+	mv "${DESTDIR}/usr/bin/cheroot" "${DESTDIR}/usr/bin/cheroot3"
 	vlicense LICENSE.md
 }

From f2a4b0db96720dc85a10ee031adab2de6219bff4 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 14 Oct 2020 21:25:08 -0400
Subject: [PATCH 4/8] python3-CherryPy: add python3-setuptools_scm to
 hostmakedepends

---
 srcpkgs/python3-CherryPy/template | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/python3-CherryPy/template b/srcpkgs/python3-CherryPy/template
index c21123b9baf..90b48900c9d 100644
--- a/srcpkgs/python3-CherryPy/template
+++ b/srcpkgs/python3-CherryPy/template
@@ -1,12 +1,12 @@
 # Template file for 'python3-CherryPy'
 pkgname=python3-CherryPy
 version=18.6.0
-revision=2
+revision=3
 wrksrc="CherryPy-${version}"
 build_style=python3-module
-hostmakedepends="python3-setuptools"
-depends="python3-setuptools python3-Cheroot python3-portend python3-zc.lockfile
- python3-jaraco.collections"
+hostmakedepends="python3-setuptools_scm"
+depends="python3-setuptools python3-Cheroot python3-portend
+ python3-zc.lockfile python3-jaraco.collections"
 short_desc="Object-oriented HTTP framework (Python3)"
 maintainer="bra1nwave <bra1nwave@protonmail.com>"
 license="BSD-3-Clause"
@@ -16,12 +16,6 @@ distfiles="${PYPI_SITE}/C/CherryPy/CherryPy-${version}.tar.gz"
 checksum=56608edd831ad00991ae585625e0206ed61cf1a0850e4b2cc48489fb2308c499
 alternatives="cherrypy:cherryd:/usr/bin/cherryd3"
 
-pre_build() {
-	vsed -i setup.py \
-		-e '/setuptools_scm/d' \
-		-e "s|use_scm_version=True|version='${version}'|"
-}
-
 post_install() {
 	mv ${DESTDIR}/usr/bin/cherryd{,3}
 	vlicense LICENSE.md

From 48af43b4217236793a79a0cb4f947e53890001f3 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 14 Oct 2020 21:31:09 -0400
Subject: [PATCH 5/8] python3-ansible-lint: update distfiles

Also add python3-setuptools_scm_git_archive to hostmakedepends.
---
 srcpkgs/python3-ansible-lint/template | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/python3-ansible-lint/template b/srcpkgs/python3-ansible-lint/template
index dfb1a82418d..80fa8dbe130 100644
--- a/srcpkgs/python3-ansible-lint/template
+++ b/srcpkgs/python3-ansible-lint/template
@@ -1,7 +1,7 @@
 # Template file for 'python3-ansible-lint'
 pkgname=python3-ansible-lint
 version=4.3.5
-revision=1
+revision=2
 wrksrc="ansible-lint-${version}"
 build_style=python3-module
 hostmakedepends="python3-setuptools"
@@ -11,12 +11,12 @@ maintainer="Joseph LaFreniere <joseph@lafreniere.xyz>"
 license="MIT"
 homepage="https://github.com/willthames/ansible-lint"
 changelog="https://raw.githubusercontent.com/willthames/ansible-lint/master/CHANGELOG.md"
-distfiles="${homepage}/archive/v${version}.tar.gz"
-checksum=df5ffb79cbd76ab02bf6dd4b493502d6ba59fafb669d6f57f487251a6c955adc
+distfiles="${PYPI_SITE}/a/ansible-lint/ansible-lint-${version}.tar.gz"
+checksum=bec230cf5fcc4d976246d4170da3ae289715f99185529ca8bba4b3c173035656
 
 post_patch() {
-	vsed -i pyproject.toml -e '/setuptools_scm/d'
-	vsed -i setup.cfg -e '/setup_requires =/,/setuptools_scm_git_archive/d'
+	# scm versioning is broken in this release
+	vsed -e "/name =/a version = ${version}" -e "/setuptools_scm/d" -i setup.cfg
 }
 
 post_install() {

From 886fcae78d8ecb1b855b9070359111fe6156208c Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 14 Oct 2020 21:33:31 -0400
Subject: [PATCH 6/8] python3-portend: update to 2.6.

---
 srcpkgs/python3-portend/template | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/python3-portend/template b/srcpkgs/python3-portend/template
index 6cf1d03eda6..42bf48ae2ec 100644
--- a/srcpkgs/python3-portend/template
+++ b/srcpkgs/python3-portend/template
@@ -1,24 +1,19 @@
 # Template file for 'python3-portend'
 pkgname=python3-portend
-version=2.5
-revision=4
+version=2.6
+revision=1
 wrksrc="portend-${version}"
 build_style=python3-module
-hostmakedepends="python3-setuptools"
+hostmakedepends="python3-setuptools_scm"
 depends="python3-tempora"
 short_desc="TCP port monitoring utilities (Python3)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://github.com/jaraco/portend"
 changelog="https://github.com/jaraco/portend/blob/master/CHANGES.rst"
-distfiles="https://github.com/jaraco/portend/archive/${version}.tar.gz"
-checksum=69fa3194739142b62bd6e44f0f0cb0828ddee521f4c7b4634abc5b5e9a54f85a
+distfiles="${PYPI_SITE}/p/portend/portend-${version}.tar.gz"
+checksum=600dd54175e17e9347e5f3d4217aa8bcf4bf4fa5ffbc4df034e5ec1ba7cdaff5
 
-pre_build() {
-	sed -i setup.py \
-		-e '/setuptools_scm/d' \
-		-e "s|use_scm_version=True|version='${version}'|"
-}
 post_install() {
 	vlicense LICENSE
 }

From 655fdf0612b6c34438bc66c0313bccfb445996b3 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 14 Oct 2020 21:44:01 -0400
Subject: [PATCH 7/8] python3-tempora: update to 4.0.0.

---
 srcpkgs/python3-tempora/template | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/python3-tempora/template b/srcpkgs/python3-tempora/template
index c4dbebd31b3..fac5a88deff 100644
--- a/srcpkgs/python3-tempora/template
+++ b/srcpkgs/python3-tempora/template
@@ -1,25 +1,20 @@
 # Template file for 'python3-tempora'
 pkgname=python3-tempora
-version=2.0.0
-revision=3
+version=4.0.0
+revision=1
 wrksrc="tempora-${version}"
 build_style=python3-module
-hostmakedepends="python3-setuptools"
+hostmakedepends="python3-setuptools_scm python3-toml"
 depends="python3-setuptools python3-six python3-pytz"
 short_desc="Objects and routines pertaining to date and time (Python3)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://github.com/jaraco/tempora"
 distfiles="${PYPI_SITE}/t/tempora/tempora-${version}.tar.gz"
-checksum=f11df59b34b9a87d395cce031274f6ff3d2be2171dd1db32dff9ab1fcb5352fa
-conflicts="python-tempora>=0"
-
-pre_build() {
-	vsed -i setup.py \
-		 -e '/setuptools_scm/d' \
-		 -e "s|use_scm_version=True|version='${version}'|"
-}
+checksum=599a3a910b377f2b544c7b221582ecf4cb049b017c994b37f2b1a9ed1099716e
+alternatives="tempora:calc-prorate:/usr/bin/calc-prorate3"
 
 post_install() {
 	vlicense LICENSE
+	mv "${DESTDIR}/usr/bin/calc-prorate" "${DESTDIR}/usr/bin/calc-prorate3"
 }

From 922a67c7444dc679a38a378be49e9b3d8d7791b7 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 14 Oct 2020 21:47:08 -0400
Subject: [PATCH 8/8] python3-ultrajson: update to 4.0.1.

---
 srcpkgs/python3-ultrajson/template | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/python3-ultrajson/template b/srcpkgs/python3-ultrajson/template
index faf1e2e7628..6be2b6d92d5 100644
--- a/srcpkgs/python3-ultrajson/template
+++ b/srcpkgs/python3-ultrajson/template
@@ -1,21 +1,17 @@
 # Template file for 'python3-ultrajson'
 pkgname=python3-ultrajson
-version=4.0.0
+version=4.0.1
 revision=1
 wrksrc="ujson-${version}"
 build_style=python3-module
-hostmakedepends="python3-setuptools"
+hostmakedepends="python3-setuptools_scm"
 makedepends="python3-devel"
 short_desc="Ultra fast JSON encoder and decoder for Python"
 maintainer="Andrew J. Hesford <ajh@sideband.org>"
 license="BSD-3-Clause"
 homepage="https://github.com/ultrajson/ultrajson"
 distfiles="${PYPI_SITE}/u/ujson/ujson-${version}.tar.gz"
-checksum=dba37ad41906d7f9ff52deeb729b9add7e305b94673b41979e9a6c5914083aa8
-
-post_patch() {
-	vsed -i setup.py -e 's/"setuptools_scm"//g'
-}
+checksum=26cf6241b36ff5ce4539ae687b6b02673109c5e3efc96148806a7873eaa229d3
 
 post_install() {
 	vlicense LICENSE.txt

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Closed]: Fix versioning in python eggs
  2020-10-15  1:53 [PR PATCH] Fix versioning in python eggs ahesford
  2020-10-15  2:12 ` [PR PATCH] [Updated] " ahesford
@ 2020-10-15  2:25 ` ahesford
  1 sibling, 0 replies; 3+ messages in thread
From: ahesford @ 2020-10-15  2:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 636 bytes --]

There's a closed pull request on the void-packages repository

Fix versioning in python eggs
https://github.com/void-linux/void-packages/pull/25614

Description:
Several python packages attempt to determine versioning using the `setuptools_scm` package and its plugin, `setuptools_scm_git_archive`. These dependencies have been packages and added to `hostmakedepends` for packages that previously attempted to either patch out (sometime incorrectly) the requirement or allow `setuptools` to download the egg at build time.

By doing this right, we ensure that the `egg-info` for each of the dependent packages is correctly versioned.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-15  2:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15  1:53 [PR PATCH] Fix versioning in python eggs ahesford
2020-10-15  2:12 ` [PR PATCH] [Updated] " ahesford
2020-10-15  2:25 ` [PR PATCH] [Closed]: " ahesford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).