From 32429a0291dcd974e41d0337c03830fb1027e8fe Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Fri, 24 Sep 2021 23:16:21 -0400 Subject: [PATCH] python-dateutil: rebuild for Python 3.10, update to 2.8.2. --- .../patches/setuptools_scm.patch | 28 +++++++++++++++++++ srcpkgs/python-dateutil/template | 14 +++++----- 2 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 srcpkgs/python-dateutil/patches/setuptools_scm.patch diff --git a/srcpkgs/python-dateutil/patches/setuptools_scm.patch b/srcpkgs/python-dateutil/patches/setuptools_scm.patch new file mode 100644 index 00000000000..9e5103ce4d4 --- /dev/null +++ b/srcpkgs/python-dateutil/patches/setuptools_scm.patch @@ -0,0 +1,28 @@ +Void doesn't package setuptools_scm for Python 2, so remove the dependency. +Leave a placeholder for version number that can be substituted at build. + +diff -ur a/setup.cfg b/setup.cfg +--- a/setup.cfg ++++ b/setup.cfg +@@ -35,7 +35,6 @@ + + [options] + zip_safe = True +-setup_requires = setuptools_scm + install_requires = six >= 1.5 + python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.* + packages = find: +diff -ur a/setup.py b/setup.py +--- a/setup.py ++++ b/setup.py +@@ -47,9 +47,7 @@ + + + setup( +- use_scm_version={ +- 'write_to': 'dateutil/_version.py', +- }, ++ version=%PKGVERSION%, + ## Needed since doctest not supported by PyPA. + long_description = README, + cmdclass={ diff --git a/srcpkgs/python-dateutil/template b/srcpkgs/python-dateutil/template index a2dd2430d4d..51c0a4521f6 100644 --- a/srcpkgs/python-dateutil/template +++ b/srcpkgs/python-dateutil/template @@ -1,21 +1,21 @@ # Template file for 'python-dateutil' pkgname=python-dateutil -version=2.8.1 -revision=2 +version=2.8.2 +revision=1 build_style=python-module -hostmakedepends="python-setuptools python3-setuptools_scm" +hostmakedepends="python-setuptools python3-setuptools" depends="python-six tzdata" short_desc="Extensions to the standard Python2 datetime module" maintainer="Alessio Sergi " license="Apache-2.0, BSD-3-Clause" homepage="https://github.com/dateutil/dateutil" distfiles="${PYPI_SITE}/p/${pkgname}/${pkgname}-${version}.tar.gz" -checksum=73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c +checksum=0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86 -pre_build() { - # don't install zoneinfo tarball - sed -i '/package_data=/d' setup.py +post_patch() { + vsed -i setup.py -e "s/%PKGVERSION%/'${version}'/" } + post_install() { vlicense LICENSE }