summaryrefslogtreecommitdiff
path: root/dev-python/automat
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /dev-python/automat
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'dev-python/automat')
-rw-r--r--dev-python/automat/Manifest5
-rw-r--r--dev-python/automat/automat-20.2.0-r1.ebuild (renamed from dev-python/automat/automat-20.2.0.ebuild)36
-rw-r--r--dev-python/automat/files/automat-0.8.0-no-setup-py-m2r-import.patch27
-rw-r--r--dev-python/automat/files/automat-20.2.0-ignore-m2r.patch25
-rw-r--r--dev-python/automat/files/automat-20.2.0-py311.patch23
5 files changed, 68 insertions, 48 deletions
diff --git a/dev-python/automat/Manifest b/dev-python/automat/Manifest
index 00ae7f8e73b0..c7a112ae4d98 100644
--- a/dev-python/automat/Manifest
+++ b/dev-python/automat/Manifest
@@ -1,5 +1,6 @@
-AUX automat-0.8.0-no-setup-py-m2r-import.patch 826 BLAKE2B 835956b8e3ab657d09d683a173c43626f0af59056ccd25e3a7bc9167da4d5d081e095e91e96ee943e7329d28c3a70b9e001e8977d64bb85581ef19f73a9ecf93 SHA512 b89fd865e8b95283efdc96614b1230d3e8e6d70cdb0ba07842cdf07e1a546a5a89b7c88a0cd774ec47148579981d41cd7261cdd7069e2736807b64422b3ca56f
+AUX automat-20.2.0-ignore-m2r.patch 835 BLAKE2B 5ea7ced5d5dc65c0439ef3ada83359177f0625ef9b463148a63545784c0842cf2cfc24d04c58415ecb3071d88acf490aff4f774c163d3ca8e2e3bbdf0efa4e5d SHA512 f03ae46feb1d6e10b07168de5bf86cfbc07703e326c66606fca76bb077b9c547ad3356143e06842423255da72b191793734d5173fbb0d19b8a0c640cfad9f4af
+AUX automat-20.2.0-py311.patch 777 BLAKE2B fe26ab800644d6930a17690aa033c9b60ac9c50802c6fcab52bb13222dad34a356a1df03996e4b60c0b5af0d7a71668d8597c045bc7ea47129e25a1bef69b096 SHA512 0b06cee66e4193da7aed7caa007b2d89e1ab4bf6f29b22de5d85ada7e001f467847375a93a38a394d64d0dd716c696b403c5bafc4e84a1d7f0c75e4e8a7c8d6a
AUX test_visualize-twisted-import-errors.patch 1999 BLAKE2B e551520aeb24b3df293eeda358fa3b9b3e33934af54ff6a7a205a0e1b5b7e916e34f8c81c103fa0fee93a22e7d0bc6ca3f7b8a17dedadeaccb02131ac23f94e4 SHA512 67f14d0b64333b872c0057eba32f77132a4bbf61c8867ec475c87552b3b553162c3e2a668ffeda0c75d85906273d50e4d80231213a3f46d1855316bb229fb6cb
DIST Automat-20.2.0.tar.gz 61679 BLAKE2B 9dfb93a0bf0a348d8f7de0796b3e5715947eb84cc0aa507a453f438d2027ae877280ed6d7896192cee46f31c7d1c0eb6cb3dee36e1f13a315071513920c5b6d0 SHA512 715cb5dc087288492e6465a29e7d8502a84fadf451bc3d29da86335ea1c20f8efd9549f0c1eaac8800559dd8001dd73736c3bfacdc6321c83a35d2288d69632c
-EBUILD automat-20.2.0.ebuild 1596 BLAKE2B 7de9091c2bfb442fac9992b87c8b3bd864445aee6ce1b3b53669c49c6225ebf01148dcbb268e5e5fa22bdd195d60a48ed86c6b60a1458e0ff83d65e81e1fb668 SHA512 04f83feef538da6f357d355d9093cc1a1257f2b4ea7ec4870cae124598805fecac34f25553ffb436cc1a760ef26b284e2526864df7301cf83af054b20169638d
+EBUILD automat-20.2.0-r1.ebuild 1411 BLAKE2B f88e012d28b2f22c178002b406b7b06301d3bb6c4a11f8a90981c5a1a6821ca30f8018a119eb8d9a02885688b5aa67e7515bdab52aa7eb0290f53d59003eda9e SHA512 8b0b6c4e3c7bee28bddfa2dcc2e9bc5bca455eb2f9a48a0aab16f53de35c47ccabc9f567940fbd3d82bf2887e62886c7a4104b8f4ee65210066491e7eafb5a05
MISC metadata.xml 670 BLAKE2B a71e9da919b5a2d171c96df7f1de0f5ad0431fa6227d90fdf3a0ac47e5d0f9f56a4dbf7b247708c9f47a50756c5dfc78c90691ec38a6fbe543d4ce840c8c1ea6 SHA512 06362e4e337d503492b51d21164c858b071374cf8fe5a974bcf4b2f8bc870bfae21b1aa6e630f8b4c44ec5f900659b082b36a408e143e8d0e83916eb53f3ffd8
diff --git a/dev-python/automat/automat-20.2.0.ebuild b/dev-python/automat/automat-20.2.0-r1.ebuild
index 465e6cabec42..b80987fef5ec 100644
--- a/dev-python/automat/automat-20.2.0.ebuild
+++ b/dev-python/automat/automat-20.2.0-r1.ebuild
@@ -1,18 +1,18 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{7..10} pypy3 )
-inherit distutils-r1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
-MY_PN="A${PN:1}"
-MY_P="${MY_PN}-${PV}"
+inherit distutils-r1
+MY_P=${P^}
DESCRIPTION="Self-service finite-state machines for the programmer on the go"
HOMEPAGE="https://github.com/glyph/automat https://pypi.org/project/Automat/"
-SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
-S="${WORKDIR}/${MY_P}"
+SRC_URI="mirror://pypi/${MY_P::1}/${PN^}/${MY_P}.tar.gz"
+S=${WORKDIR}/${MY_P}
LICENSE="MIT"
SLOT="0"
@@ -24,27 +24,25 @@ RDEPEND="
dev-python/six[${PYTHON_USEDEP}]
"
BDEPEND="
- dev-python/m2r[${PYTHON_USEDEP}]
+ dev-python/setuptools_scm[${PYTHON_USEDEP}]
"
PATCHES=(
- "${FILESDIR}/automat-0.8.0-no-setup-py-m2r-import.patch"
"${FILESDIR}/test_visualize-twisted-import-errors.patch"
+ "${FILESDIR}/${P}-py311.patch"
+ "${FILESDIR}/${PN}-20.2.0-ignore-m2r.patch"
)
distutils_enable_tests pytest
-python_prepare_all() {
- if use test ; then
- # Remove since this is upstream benchmarking tests
- rm -r benchmark || die "FAILED to remove benchmark tests"
- fi
-
- # avoid a setuptools_scm dependency
- sed -r -i "s:use_scm_version=True:version='${PV}': ;
- s:[\"']setuptools[_-]scm[\"'](,|)::" setup.py || die
+EPYTEST_IGNORE=(
+ benchmark
+)
- distutils-r1_python_prepare_all
+src_prepare() {
+ # strip m2r dep
+ sed -i -e "/'m2r'/d" setup.py || die
+ distutils-r1_src_prepare
}
python_install_all() {
diff --git a/dev-python/automat/files/automat-0.8.0-no-setup-py-m2r-import.patch b/dev-python/automat/files/automat-0.8.0-no-setup-py-m2r-import.patch
deleted file mode 100644
index 161b219626da..000000000000
--- a/dev-python/automat/files/automat-0.8.0-no-setup-py-m2r-import.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git a/setup.py b/setup.py
-index d0dec04..7a85a6e 100644
---- a/setup.py
-+++ b/setup.py
-@@ -4,14 +4,6 @@ Setup file for automat
-
- from setuptools import setup, find_packages
-
--try:
-- from m2r import parse_from_file
-- long_description = parse_from_file('README.md')
--except(IOError, ImportError):
-- print("\n\n!!! m2r not found, long_description is bad, don't upload this to PyPI !!!\n\n")
-- import io
-- long_description = io.open('README.md', encoding="utf-8").read()
--
- setup(
- name='Automat',
- use_scm_version=True,
-@@ -19,7 +11,6 @@ setup(
- description="""
- Self-service finite-state machines for the programmer on the go.
- """.strip(),
-- long_description=long_description,
- packages=find_packages(exclude=[]),
- package_dir={'automat': 'automat'},
- setup_requires=[
diff --git a/dev-python/automat/files/automat-20.2.0-ignore-m2r.patch b/dev-python/automat/files/automat-20.2.0-ignore-m2r.patch
new file mode 100644
index 000000000000..5e3ef39f33e1
--- /dev/null
+++ b/dev-python/automat/files/automat-20.2.0-ignore-m2r.patch
@@ -0,0 +1,25 @@
+Completely ignore m2r (which is now last-rited) so we can drop the hard-blocker
+which makes world upgrades a pain (installed m2r would break b/c of newer
+mistune, and would break automat build).
+
+https://github.com/miyakogi/m2r/issues/66
+https://bugs.gentoo.org/848900
+https://bugs.gentoo.org/847532
+--- a/setup.py
++++ b/setup.py
+@@ -4,13 +4,8 @@ Setup file for automat
+
+ from setuptools import setup, find_packages
+
+-try:
+- from m2r import parse_from_file
+- long_description = parse_from_file('README.md')
+-except(IOError, ImportError):
+- print("\n\n!!! m2r not found, long_description is bad, don't upload this to PyPI !!!\n\n")
+- import io
+- long_description = io.open('README.md', encoding="utf-8").read()
++import io
++long_description = io.open('README.md', encoding="utf-8").read()
+
+ setup(
+ name='Automat',
diff --git a/dev-python/automat/files/automat-20.2.0-py311.patch b/dev-python/automat/files/automat-20.2.0-py311.patch
new file mode 100644
index 000000000000..14ca69e7235d
--- /dev/null
+++ b/dev-python/automat/files/automat-20.2.0-py311.patch
@@ -0,0 +1,23 @@
+https://github.com/glyph/automat/commit/d0c2845ead9b8f576042d42134bfb5c63086be39
+
+diff --git a/automat/_introspection.py b/automat/_introspection.py
+index 3f7307d..403cddb 100644
+--- a/automat/_introspection.py
++++ b/automat/_introspection.py
+@@ -6,6 +6,8 @@
+
+
+ def copycode(template, changes):
++ if hasattr(code, "replace"):
++ return template.replace(**{"co_" + k : v for k, v in changes.items()})
+ names = [
+ "argcount", "nlocals", "stacksize", "flags", "code", "consts",
+ "names", "varnames", "filename", "name", "firstlineno", "lnotab",
+@@ -23,7 +25,6 @@ def copycode(template, changes):
+ return code(*values)
+
+
+-
+ def copyfunction(template, funcchanges, codechanges):
+ names = [
+ "globals", "name", "defaults", "closure",