Gentoo Archives: gentoo-commits

From: Michael Orlitzky <mjo@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/cvxopt/files/, dev-python/cvxopt/
Date: Sat, 07 May 2022 16:58:37
Message-Id: 1651942639.4c9d7f507594da6c0b3d0f598ece26e1cd477351.mjo@gentoo
1 commit: 4c9d7f507594da6c0b3d0f598ece26e1cd477351
2 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 7 16:57:06 2022 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Sat May 7 16:57:19 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c9d7f50
7
8 dev-python/cvxopt: patch versioneer.py to fix the build.
9
10 Michał Górny fixed this upstream in versioneer itself, I just
11 backported his commit to cvxopt's copy of versioneer.py.
12
13 Closes: https://bugs.gentoo.org/840999
14 Package-Manager: Portage-3.0.30, Repoman-3.0.3
15 Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
16
17 dev-python/cvxopt/cvxopt-1.3.0.ebuild | 2 ++
18 .../files/cvxopt-1.3.0-versioneer-buildfix.patch | 33 ++++++++++++++++++++++
19 2 files changed, 35 insertions(+)
20
21 diff --git a/dev-python/cvxopt/cvxopt-1.3.0.ebuild b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
22 index cef2dfd526c7..c9d48eb76775 100644
23 --- a/dev-python/cvxopt/cvxopt-1.3.0.ebuild
24 +++ b/dev-python/cvxopt/cvxopt-1.3.0.ebuild
25 @@ -31,6 +31,8 @@ DEPEND="
26 RDEPEND="${DEPEND}"
27 BDEPEND="virtual/pkgconfig"
28
29 +PATCHES=( "${FILESDIR}/cvxopt-1.3.0-versioneer-buildfix.patch" )
30 +
31 distutils_enable_sphinx doc/source --no-autodoc
32 distutils_enable_tests pytest
33
34
35 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
36 new file mode 100644
37 index 000000000000..2cc28bc7f781
38 --- /dev/null
39 +++ b/dev-python/cvxopt/files/cvxopt-1.3.0-versioneer-buildfix.patch
40 @@ -0,0 +1,33 @@
41 +From 764665fb080e5aec235a64029246cb58becf5591 Mon Sep 17 00:00:00 2001
42 +From: Michael Orlitzky <michael@××××××××.com>
43 +Date: Sat, 7 May 2022 12:44:31 -0400
44 +Subject: [PATCH 1/1] FIX: skip version update on `build_ext` if .py does not
45 + exist
46 +
47 +Upstream versioneer commit 280fb6ce89af73ac6ced3c66354a16506a57fc6c
48 +ported to cvxopt's bundled copy. See also:
49 +
50 + https://github.com/python-versioneer/python-versioneer/issues/296
51 +---
52 + versioneer.py | 5 +++++
53 + 1 file changed, 5 insertions(+)
54 +
55 +diff --git a/versioneer.py b/versioneer.py
56 +index 414cb9d..47bdd40 100644
57 +--- a/versioneer.py
58 ++++ b/versioneer.py
59 +@@ -1847,6 +1847,11 @@ def get_cmdclass(cmdclass=None):
60 + # it with an updated value
61 + target_versionfile = os.path.join(self.build_lib,
62 + cfg.versionfile_build)
63 ++ if not os.path.exists(target_versionfile):
64 ++ print(f"Warning: {target_versionfile} does not exist, skipping "
65 ++ "version update. This can happen if you are running build_ext "
66 ++ "without first running build_py.")
67 ++ return
68 + print("UPDATING %s" % target_versionfile)
69 + write_to_version_file(target_versionfile, versions)
70 + cmds["build_ext"] = cmd_build_ext
71 +--
72 +2.35.1
73 +