summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2022-05-07 12:57:06 -0400
committerMichael Orlitzky <mjo@gentoo.org>2022-05-07 12:57:19 -0400
commit4c9d7f507594da6c0b3d0f598ece26e1cd477351 (patch)
tree844479f9ed01417665a873cba178a4848c77ab41
parentsci-mathematics/easycrypt: add Why3 constraints for older EC versions (diff)
downloadgentoo-4c9d7f507594da6c0b3d0f598ece26e1cd477351.tar.gz
gentoo-4c9d7f507594da6c0b3d0f598ece26e1cd477351.tar.bz2
gentoo-4c9d7f507594da6c0b3d0f598ece26e1cd477351.zip
dev-python/cvxopt: patch versioneer.py to fix the build.
Michał Górny fixed this upstream in versioneer itself, I just backported his commit to cvxopt's copy of versioneer.py. Closes: https://bugs.gentoo.org/840999 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
-rw-r--r--dev-python/cvxopt/cvxopt-1.3.0.ebuild2
-rw-r--r--dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch33
2 files changed, 35 insertions, 0 deletions
diff --git a/dev-python/cvxopt/cvxopt-1.3.0.ebuild b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
index cef2dfd526c7..c9d48eb76775 100644
--- a/dev-python/cvxopt/cvxopt-1.3.0.ebuild
+++ b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
@@ -31,6 +31,8 @@ DEPEND="
RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"
+PATCHES=( "${FILESDIR}/cvxopt-1.3.0-versioneer-buildfix.patch" )
+
distutils_enable_sphinx doc/source --no-autodoc
distutils_enable_tests pytest
diff --git a/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
new file mode 100644
index 000000000000..2cc28bc7f781
--- /dev/null
+++ b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
@@ -0,0 +1,33 @@
+From 764665fb080e5aec235a64029246cb58becf5591 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 7 May 2022 12:44:31 -0400
+Subject: [PATCH 1/1] FIX: skip version update on `build_ext` if .py does not
+ exist
+
+Upstream versioneer commit 280fb6ce89af73ac6ced3c66354a16506a57fc6c
+ported to cvxopt's bundled copy. See also:
+
+ https://github.com/python-versioneer/python-versioneer/issues/296
+---
+ versioneer.py | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/versioneer.py b/versioneer.py
+index 414cb9d..47bdd40 100644
+--- a/versioneer.py
++++ b/versioneer.py
+@@ -1847,6 +1847,11 @@ def get_cmdclass(cmdclass=None):
+ # it with an updated value
+ target_versionfile = os.path.join(self.build_lib,
+ cfg.versionfile_build)
++ if not os.path.exists(target_versionfile):
++ print(f"Warning: {target_versionfile} does not exist, skipping "
++ "version update. This can happen if you are running build_ext "
++ "without first running build_py.")
++ return
+ print("UPDATING %s" % target_versionfile)
+ write_to_version_file(target_versionfile, versions)
+ cmds["build_ext"] = cmd_build_ext
+--
+2.35.1
+