partially backout an upstream commit which breaks packaging with python 2

(math/prover9 still uses python 2.7).
This commit is contained in:
sthen 2022-10-04 19:15:31 +00:00
parent 506a1d1e03
commit 2056364e21
2 changed files with 27 additions and 10 deletions

View File

@ -1,24 +1,27 @@
COMMENT= Python module dependency analysis tool
COMMENT= Python module dependency analysis tool
MODPY_EGG_VERSION= 0.19.3
DISTNAME= modulegraph-${MODPY_EGG_VERSION}
PKGNAME= py-${DISTNAME}
DISTNAME= modulegraph-${MODPY_EGG_VERSION}
PKGNAME= py-${DISTNAME}
REVISION= 0
CATEGORIES= devel
CATEGORIES= devel
# MIT
PERMIT_PACKAGE= Yes
PERMIT_PACKAGE= Yes
MODULES= lang/python
MODULES= lang/python
MODPY_PI = Yes
MODPY_SETUPTOOLS= Yes
MODPY_PI= Yes
# math/prover9/p9m4 still uses py2
FLAVORS = python3
MODPY_SETUPTOOLS= Yes
FLAVORS = python3
FLAVOR ?=
RUN_DEPENDS= devel/py-altgraph${MODPY_FLAVOR}
RUN_DEPENDS= devel/py-altgraph${MODPY_FLAVOR}
TEST_DEPENDS= ${RUN_DEPENDS} \
lang/python/${MODPY_VERSION},-idle
post-install:
mv ${PREFIX}/bin/modulegraph{,${MODPY_BIN_SUFFIX}}

View File

@ -0,0 +1,14 @@
Revert part of 415bc766401122 which breaks packaging with py2
Index: modulegraph/util.py
--- modulegraph/util.py.orig
+++ modulegraph/util.py
@@ -105,7 +105,7 @@ def imp_walk(name):
raise ImportError("No module named %s" % (name,))
-cookie_re = re.compile(rb"coding[:=]\s*([-\w.]+)")
+cookie_re = re.compile(br"coding[:=]\s*([-\w.]+)")
if sys.version_info[0] == 2:
default_encoding = "ascii"
else: