* [gentoo-commits] repo/gentoo:master commit in: dev-python/automat/files/, dev-python/automat/
@ 2019-11-27 22:50 Patrick McLean
0 siblings, 0 replies; 3+ messages in thread
From: Patrick McLean @ 2019-11-27 22:50 UTC (permalink / raw
To: gentoo-commits
commit: d77d2d0183c01f91ebbade3bae3adc673da99240
Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Wed Nov 27 22:45:04 2019 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed Nov 27 22:50:13 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d77d2d01
dev-python/automat-0.8.0: bump, add py38 and pypy3
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
dev-python/automat/Manifest | 1 +
dev-python/automat/automat-0.8.0.ebuild | 64 ++++++++++++++++++++++
.../automat-0.8.0-no-setup-py-m2r-import.patch | 27 +++++++++
3 files changed, 92 insertions(+)
diff --git a/dev-python/automat/Manifest b/dev-python/automat/Manifest
index af99aefb7a7..a278fa8c8a9 100644
--- a/dev-python/automat/Manifest
+++ b/dev-python/automat/Manifest
@@ -1,3 +1,4 @@
DIST Automat-0.5.0.tar.gz 32599 BLAKE2B 951da8840c2334fe3cd86804b39beedaad0d344d66742e8bb72e2d2ace2029b037acac8ffccc5643fd37f81020a567374a25ed42f7bc386770a30956464f52eb SHA512 7b4fc64e1b3cc514e3513c4be7387309a9e0c6d59ef091131404642b517a324b4a0eb677bee99da038664bd6713f2d2078c621f056e98b35966caf324741eeeb
DIST Automat-0.6.0.tar.gz 31767 BLAKE2B 28baa9d6cc7497f9c0a4b7f4050b197d3dff871b91f5f3e29bdc47ace443af8de0fbeacf1657dc6565b3ab824365362a42204d6d89a8dfc82eaa6cd92d4e2308 SHA512 94f2fa06b0e0e1c0538bcf4bd9046ea40600a018bdd1da2d5bed479877807ad56e448c4f1d7ec87341f80013ae6c35b01201cbe3c4ecae1105419038ed43024d
DIST Automat-0.7.0.tar.gz 61461 BLAKE2B dd09ce090c7333ee17b701bde2c78e01dacf40cefee847061a2019bb27f0982091e7628737211421ada351937caf9c6734cb445ee6462ce84b381030b013bd05 SHA512 a6f307d312a3ceb721071b5212297c73d2306894b5fafd39265578041a2859bd6f041ac43a654bdda4175a70a4e90e0db1ee35cd43fa620cd5c594b5d1988a74
+DIST Automat-0.8.0.tar.gz 59687 BLAKE2B 56e4ec76564d321ca9a709c484077a4003eea2842160e226728aaaa4ec6ebc2486482f79cd919bef7bbec8baeee7a34ca2a11d48665bb36c79c5a45a3c97e992 SHA512 2dbd4e784f65b02a8c93fc5f15236df3649d667a9792f6cac929dbac5d971495bdab4825df0fcd6817b9a9f79b7a5d8cfbdf8e4d18605f0761546b31b3091ad7
diff --git a/dev-python/automat/automat-0.8.0.ebuild b/dev-python/automat/automat-0.8.0.ebuild
new file mode 100644
index 00000000000..075a0b131e2
--- /dev/null
+++ b/dev-python/automat/automat-0.8.0.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} pypy{,3} )
+
+inherit distutils-r1
+
+MY_PN="A${PN:1}"
+MY_P="${MY_PN}-${PV}"
+
+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"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="examples"
+
+RDEPEND="
+ dev-python/attrs[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ ${RDEPEND}
+ dev-python/m2r[${PYTHON_USEDEP}]
+"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/automat-0.8.0-no-setup-py-m2r-import.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
+
+ distutils-r1_python_prepare_all
+}
+
+python_install_all() {
+ if use examples; then
+ docinto examples
+ dodoc docs/examples/*.py
+ fi
+
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ einfo "For additional visualization functionality install these optional dependencies"
+ einfo " >=dev-python/twisted-16.1.1"
+ einfo " media-gfx/graphviz[python]"
+}
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
new file mode 100644
index 00000000000..161b219626d
--- /dev/null
+++ b/dev-python/automat/files/automat-0.8.0-no-setup-py-m2r-import.patch
@@ -0,0 +1,27 @@
+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=[
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/automat/files/, dev-python/automat/
@ 2020-06-10 16:25 Brian Dolbec
0 siblings, 0 replies; 3+ messages in thread
From: Brian Dolbec @ 2020-06-10 16:25 UTC (permalink / raw
To: gentoo-commits
commit: 9a2c9c7b209a8dbf42b2698181b2bcf5d95dbdf5
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 10 15:57:52 2020 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Jun 10 15:59:02 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a2c9c7b
dev-python/automat: Fix test failures for bug 665554
automat _visualize.py code depends on both twisted and graphiz modules.
This patch fixes the condition where some tests were not skipped due
to twisted not being installed, but graphviz was.
Gentoo-bug: https://bugs.gentoo.org/665554
Upstream-PR: https://github.com/glyph/automat/pull/125
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>
dev-python/automat/automat-0.8.0-r1.ebuild | 3 +-
dev-python/automat/automat-20.2.0.ebuild | 3 +-
.../test_visualize-twisted-import-errors.patch | 52 ++++++++++++++++++++++
3 files changed, 56 insertions(+), 2 deletions(-)
diff --git a/dev-python/automat/automat-0.8.0-r1.ebuild b/dev-python/automat/automat-0.8.0-r1.ebuild
index d31a2e5ccc3..35f0f151aaf 100644
--- a/dev-python/automat/automat-0.8.0-r1.ebuild
+++ b/dev-python/automat/automat-0.8.0-r1.ebuild
@@ -32,6 +32,7 @@ S="${WORKDIR}/${MY_P}"
PATCHES=(
"${FILESDIR}/automat-0.8.0-no-setup-py-m2r-import.patch"
+ "${FILESDIR}/test_visualize-twisted-import-errors.patch"
)
distutils_enable_tests pytest
@@ -59,7 +60,7 @@ python_install_all() {
}
pkg_postinst() {
- einfo "For additional visualization functionality install these optional dependencies"
+ einfo "For additional visualization functionality install both these optional dependencies"
einfo " >=dev-python/twisted-16.1.1"
einfo " media-gfx/graphviz[python]"
}
diff --git a/dev-python/automat/automat-20.2.0.ebuild b/dev-python/automat/automat-20.2.0.ebuild
index d07dff71307..dc4053b4c83 100644
--- a/dev-python/automat/automat-20.2.0.ebuild
+++ b/dev-python/automat/automat-20.2.0.ebuild
@@ -32,6 +32,7 @@ S="${WORKDIR}/${MY_P}"
PATCHES=(
"${FILESDIR}/automat-0.8.0-no-setup-py-m2r-import.patch"
+ "${FILESDIR}/test_visualize-twisted-import-errors.patch"
)
distutils_enable_tests pytest
@@ -59,7 +60,7 @@ python_install_all() {
}
pkg_postinst() {
- einfo "For additional visualization functionality install these optional dependencies"
+ einfo "For additional visualization functionality install both these optional dependencies"
einfo " >=dev-python/twisted-16.1.1"
einfo " media-gfx/graphviz[python]"
}
diff --git a/dev-python/automat/files/test_visualize-twisted-import-errors.patch b/dev-python/automat/files/test_visualize-twisted-import-errors.patch
new file mode 100644
index 00000000000..b3d8938cf7d
--- /dev/null
+++ b/dev-python/automat/files/test_visualize-twisted-import-errors.patch
@@ -0,0 +1,52 @@
+From 9f6312e0c2504c27b72bb228a37ed5ac58776e94 Mon Sep 17 00:00:00 2001
+From: Brian Dolbec <dolsen@gentoo.org>
+Date: Wed, 10 Jun 2020 07:31:45 -0700
+Subject: [PATCH] Fix _test_visualize.py twisted import errors
+
+When graphviz modules are installed but not twisted, this creates test failures
+in _discover.py which hard depends on twisted being installed.
+
+Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
+---
+ automat/_test/test_visualize.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/automat/_test/test_visualize.py b/automat/_test/test_visualize.py
+index 987eb3c..142c4bf 100644
+--- a/automat/_test/test_visualize.py
++++ b/automat/_test/test_visualize.py
+@@ -62,6 +62,7 @@ def sampleMachine():
+
+
+ @skipIf(not isGraphvizModuleInstalled(), "Graphviz module is not installed.")
++@skipIf(not isTwistedInstalled(), "Twisted is not installed.")
+ class ElementMakerTests(TestCase):
+ """
+ L{elementMaker} generates HTML representing the specified element.
+@@ -134,6 +135,7 @@ def isLeaf(element):
+
+
+ @skipIf(not isGraphvizModuleInstalled(), "Graphviz module is not installed.")
++@skipIf(not isTwistedInstalled(), "Twisted is not installed.")
+ class TableMakerTests(TestCase):
+ """
+ Tests that ensure L{tableMaker} generates HTML tables usable as
+@@ -214,6 +216,7 @@ class TableMakerTests(TestCase):
+
+ @skipIf(not isGraphvizModuleInstalled(), "Graphviz module is not installed.")
+ @skipIf(not isGraphvizInstalled(), "Graphviz tools are not installed.")
++@skipIf(not isTwistedInstalled(), "Twisted is not installed.")
+ class IntegrationTests(TestCase):
+ """
+ Tests which make sure Graphviz can understand the output produced by
+@@ -232,6 +235,7 @@ class IntegrationTests(TestCase):
+
+
+ @skipIf(not isGraphvizModuleInstalled(), "Graphviz module is not installed.")
++@skipIf(not isTwistedInstalled(), "Twisted is not installed.")
+ class SpotChecks(TestCase):
+ """
+ Tests to make sure that the output contains salient features of the machine
+--
+libgit2 0.99.0
+
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/automat/files/, dev-python/automat/
@ 2022-05-12 13:36 Michał Górny
0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2022-05-12 13:36 UTC (permalink / raw
To: gentoo-commits
commit: cbaa7e66a529dfe1d33f131cd1385ad6d08a2163
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu May 12 13:29:57 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu May 12 13:36:24 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbaa7e66
dev-python/automat: Enable py3.11
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/automat/automat-20.2.0-r1.ebuild | 3 ++-
.../automat/files/automat-20.2.0-py311.patch | 23 ++++++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/dev-python/automat/automat-20.2.0-r1.ebuild b/dev-python/automat/automat-20.2.0-r1.ebuild
index d7ad5e62e710..d56a5190718a 100644
--- a/dev-python/automat/automat-20.2.0-r1.ebuild
+++ b/dev-python/automat/automat-20.2.0-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
inherit distutils-r1
@@ -30,6 +30,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/automat-0.8.0-no-setup-py-m2r-import.patch"
"${FILESDIR}/test_visualize-twisted-import-errors.patch"
+ "${FILESDIR}/${P}-py311.patch"
)
distutils_enable_tests pytest
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",
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-12 13:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-10 16:25 [gentoo-commits] repo/gentoo:master commit in: dev-python/automat/files/, dev-python/automat/ Brian Dolbec
-- strict thread matches above, loose matches on Subject: below --
2022-05-12 13:36 Michał Górny
2019-11-27 22:50 Patrick McLean
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox