Gentoo Archives: gentoo-commits

From: "Cédric Krier" <cedk@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-vcs/mercurial/, dev-vcs/mercurial/files/
Date: Sun, 26 Jan 2020 11:55:30
Message-Id: 1580039721.63a6ef31f0b29dc5ba2469f2844c91301d75f202.cedk@gentoo
1 commit: 63a6ef31f0b29dc5ba2469f2844c91301d75f202
2 Author: Cédric Krier <cedk <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 26 11:55:06 2020 +0000
4 Commit: Cédric Krier <cedk <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 26 11:55:21 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63a6ef31
7
8 dev-vcs/mercurial: Use absolute import for zstd
9
10 Fake zstd.py does not work on Python 2.7
11 And synchronize mercurial-9999
12
13 Package-Manager: Portage-2.3.84, Repoman-2.3.20
14 Signed-off-by: Cédric Krier <cedk <AT> gentoo.org>
15
16 dev-vcs/mercurial/files/zstd.py | 2 --
17 .../{mercurial-5.2.2.ebuild => mercurial-5.2.2-r1.ebuild} | 5 ++++-
18 dev-vcs/mercurial/mercurial-9999.ebuild | 7 +++++--
19 3 files changed, 9 insertions(+), 5 deletions(-)
20
21 diff --git a/dev-vcs/mercurial/files/zstd.py b/dev-vcs/mercurial/files/zstd.py
22 deleted file mode 100644
23 index 29ae5eacd0c..00000000000
24 --- a/dev-vcs/mercurial/files/zstd.py
25 +++ /dev/null
26 @@ -1,2 +0,0 @@
27 -from zstd import *
28 -from zstd import __version__
29
30 diff --git a/dev-vcs/mercurial/mercurial-5.2.2.ebuild b/dev-vcs/mercurial/mercurial-5.2.2-r1.ebuild
31 similarity index 96%
32 rename from dev-vcs/mercurial/mercurial-5.2.2.ebuild
33 rename to dev-vcs/mercurial/mercurial-5.2.2-r1.ebuild
34 index e189226b04d..7d67135fc8a 100644
35 --- a/dev-vcs/mercurial/mercurial-5.2.2.ebuild
36 +++ b/dev-vcs/mercurial/mercurial-5.2.2-r1.ebuild
37 @@ -46,7 +46,10 @@ python_prepare_all() {
38 # fix up logic that won't work in Gentoo Prefix (also won't outside in
39 # certain cases), bug #362891
40 sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die
41 - cp "${FILESDIR}/zstd.py" mercurial/
42 + # Use absolute import for zstd
43 + sed -i -e 's/from \.* import zstd/import zstd/' \
44 + mercurial/utils/compression.py \
45 + mercurial/wireprotoframing.py || die
46
47 distutils-r1_python_prepare_all
48 }
49
50 diff --git a/dev-vcs/mercurial/mercurial-9999.ebuild b/dev-vcs/mercurial/mercurial-9999.ebuild
51 index 9c47a383e79..8c12d545eb8 100644
52 --- a/dev-vcs/mercurial/mercurial-9999.ebuild
53 +++ b/dev-vcs/mercurial/mercurial-9999.ebuild
54 @@ -48,14 +48,17 @@ python_prepare_all() {
55 # certain cases), bug #362891
56 sed -i -e 's:xcodebuild:nocodebuild:' setup.py || die
57 sed -i -e '/ hgenv =/a\' -e ' hgenv.pop("PYTHONPATH", None)' setup.py || die
58 - cp "${FILESDIR}/zstd.py" mercurial/
59 + # Use absolute import for zstd
60 + sed -i -e 's/from \.* import zstd/import zstd/' \
61 + mercurial/utils/compression.py \
62 + mercurial/wireprotoframing.py || die
63
64 distutils-r1_python_prepare_all
65 }
66
67 python_compile() {
68 strip-flags -ftracer -ftree-vectorize
69 - python_is_python3 || append-flags -fno-strict-aliasing
70 + python_is_python3 || local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
71 distutils-r1_python_compile build_ext --no-zstd
72 }