diff options
| author | Sam James <sam@gentoo.org> | 2022-03-18 19:31:21 +0000 |
|---|---|---|
| committer | Sam James <sam@gentoo.org> | 2022-03-19 00:05:46 +0000 |
| commit | d5d4b491db81d7cfc47093f66dfbd097fc4a2dc2 (patch) | |
| tree | 72c6d5882a35d913635bdbaba9393dac4be8b280 /dev-lang/python/python-3.9.11.ebuild | |
| parent | bf8943cc14a09d405cc24c9c57060029d10ed196 (diff) | |
| download | gentoo-d5d4b491db81d7cfc47093f66dfbd097fc4a2dc2.tar.gz gentoo-d5d4b491db81d7cfc47093f66dfbd097fc4a2dc2.tar.bz2 gentoo-d5d4b491db81d7cfc47093f66dfbd097fc4a2dc2.zip | |
dev-lang/python: save/restore PYTHONDONTWRITEBYTECODE for USE=pgo
This avoids writing bytecode when we call has_version (or make
any other calls). But we do need it on for the 'emake' call
when building w/ USE=pgo.
Save & restore the value from the environment before/after
emake if building with PGO.
Closes: https://bugs.gentoo.org/831897
Signed-off-by: Sam James <sam@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/24642
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang/python/python-3.9.11.ebuild')
| -rw-r--r-- | dev-lang/python/python-3.9.11.ebuild | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dev-lang/python/python-3.9.11.ebuild b/dev-lang/python/python-3.9.11.ebuild index a71a3caa791d..418a21b762a8 100644 --- a/dev-lang/python/python-3.9.11.ebuild +++ b/dev-lang/python/python-3.9.11.ebuild @@ -221,6 +221,11 @@ src_compile() { # https://bugs.gentoo.org/823728 export SETUPTOOLS_USE_DISTUTILS=stdlib + # Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't + # end up writing bytecode & violating sandbox. + # bug #831897 + local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE} + if use pgo ; then # bug 660358 local -x COLUMNS=80 @@ -233,6 +238,9 @@ src_compile() { # in _sysconfigdata* emake CPPFLAGS= CFLAGS= LDFLAGS= + # Restore saved value from above. + local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE} + # Work around bug 329499. See also bug 413751 and 457194. if has_version dev-libs/libffi[pax-kernel]; then pax-mark E python |
