summaryrefslogtreecommitdiff
path: root/dev-python/doit
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-05-30 11:44:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-05-30 11:44:06 +0100
commitf516638b7fe9592837389826a6152a7e1b251c54 (patch)
tree8bfecb640b7b6403d7a3d662d923eed630033da7 /dev-python/doit
parent1a61119f9f7b057830e2ce0563f913ec86f282ad (diff)
gentoo resync : 30.05.2020
Diffstat (limited to 'dev-python/doit')
-rw-r--r--dev-python/doit/Manifest5
-rw-r--r--dev-python/doit/doit-0.32.0-r1.ebuild53
-rw-r--r--dev-python/doit/files/doit-0.32.0_pytest5.4.patch81
-rw-r--r--dev-python/doit/files/doit-0.32.0_unpickable.patch39
-rw-r--r--dev-python/doit/metadata.xml11
5 files changed, 186 insertions, 3 deletions
diff --git a/dev-python/doit/Manifest b/dev-python/doit/Manifest
index a7d6fd0afc9a..ddbb99ff3724 100644
--- a/dev-python/doit/Manifest
+++ b/dev-python/doit/Manifest
@@ -1,5 +1,8 @@
+AUX doit-0.32.0_pytest5.4.patch 2862 BLAKE2B 3a3859fc2a5a2c0f533a3c4a300744d5c4b73edc9b255f54267c6018218c393478e2feb6f43874250ba931effeaa576cfb38cec5cb7f934031071744c0d3b2f0 SHA512 2f4d251970e042adc631a9912705a0f97bd693f5cdba3e89fcb912c91f881c2c57665bd32a28630053fb1e9c2ebce022b40974a303c5e808ae0d2008f07c3e8e
+AUX doit-0.32.0_unpickable.patch 1371 BLAKE2B c03d757a99e44bbf7c7dbcac84295e7514055921d2c3a12bb3fca2fbc7e8320c8be450a5c101d39b51b8f0bb7fa1b1faa3c58a455ab5c27a68f6e03a70ea9763 SHA512 2d17f32876897a6b73ba7936eade594a0a40f38a27d08e14603f3aceb9b36426d810e0dc0b13b385c8e4cab830976637ed4462014dab7202226d3bb3f745cc8a
DIST doit-0.29.0.tar.gz 222341 BLAKE2B 8489568fe9236af04f87debfb4889840aa162d17d20f82ac0a9a22d1034b4c58976cd6829486a15b941ac1f50e7137c052fe332657c2b3f529fe2345bbcba2fc SHA512 a686457df31b414d0c3797789e0ae1ae5cdfa3674025236419cb59b254f342cd2db07911ef18b2cb576d8d817b44035b9372265b34b786b2779fb7074b394de1
DIST doit-0.32.0.tar.gz 1437939 BLAKE2B 39134341582cd964630a1667c78b0e44eeb32406a06e3567123b820fb61cbee0f6a7c8879a84eed750860a365aa4c792e461bb1534c66e4f20a6289522dc8183 SHA512 d5c28a0c6a38648aeef58027b2246fc26360e133e91933f2244bd484f70d6d26110acbfec19c74d53c796e0bbae07a4bf6d76542d45e8b1a6b503c186bf2a68a
EBUILD doit-0.29.0.ebuild 1861 BLAKE2B a1756f901009f5e277bcd5099fa63888b160b90d30e41425e3cae126c60af62f7ebaedb5378c2b4461c7f5a7e1057e8697d4c47e374f607fbf938da512f52453 SHA512 a0a45c33271e4dce0a7cfca52c80a2d4371fd384288249c3abfcd130d9b98256c01f1c2456be1923f592d3a10550eaaba8e578c05a5170cbe695bbbc3fc9a5fb
+EBUILD doit-0.32.0-r1.ebuild 1351 BLAKE2B db41e031fecf039f5302225c08cbe955079d77228e093ef9e771c78c91458d62a4c8cd87bd608085fff46c09629b671083fbc186fefdbb9c642135bc84dc38d9 SHA512 5909bfcd746685ca6f7c68a6aa3331c111c0dc37ffd3ee9fd9fac52d98c4a44f7ff459d28363cf319986d40e71858eb2810b1868d063f37fcf5b45e8325d775e
EBUILD doit-0.32.0.ebuild 1846 BLAKE2B b0f30a44db4d6337bd878076c2d20c7923afa690a5f5a5af4be9f3b0c86fa77c3c9e80cfae17e5d963e372239420bd5d8ab67c91fca7163499d2db995e71635e SHA512 351036ff1b7f2a1689308e23a5506c145b98b23a0dbd13c195d19dbc571dde816e2c0e83869e981a9033a1cd2c7191c650131449ba46823b3a2a4c1150de15d7
-MISC metadata.xml 295 BLAKE2B 3613e0bcfa3a5b2d21fa4eeaf8eb44475f01a98462879581f558f1c7c9cf9ea9a8b39bcfbf0ded02f964d7d4060726c1bc4dc622ea19cf75b35afd1e1560a408 SHA512 67b65f9a4adc57efe3c9846e3088737b28b74d80025bf2647aac3becf7cf542f0dee0f32e4a5d05299c768a8eb65729373fbe4af2c72ab073df1f43040b0c393
+MISC metadata.xml 512 BLAKE2B 2d3624f36a7a3919fc3c7afbb459f811234b52f8e83c025d3211c4160c78151616bf1545ea4157dee5742a0267f23879a777b470d4c38746fa512ea3e2decf02 SHA512 52e3181b83ec7fda098ee42d3c61270a32b2170bf48d711d52d277b4448ea1d2672ff8017735cd90ca410fb6996a6547489f873ee20ca35b0246bb6a5a8b82da
diff --git a/dev-python/doit/doit-0.32.0-r1.ebuild b/dev-python/doit/doit-0.32.0-r1.ebuild
new file mode 100644
index 000000000000..e73b597bd0ed
--- /dev/null
+++ b/dev-python/doit/doit-0.32.0-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7} )
+DISTUTILS_USE_SETUPTOOLS=rdepend
+
+inherit bash-completion-r1 distutils-r1
+
+DESCRIPTION="Automation tool"
+HOMEPAGE="https://pydoit.org/ https://pypi.org/project/doit/"
+SRC_URI="mirror://pypi/${PN::1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-python/cloudpickle[${PYTHON_USEDEP}]
+ dev-python/pyinotify[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]"
+DEPEND="
+ test? (
+ ${RDEPEND}
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/pyflakes[${PYTHON_USEDEP}]
+ >=dev-python/pytest-5.4[${PYTHON_USEDEP}]
+ )"
+PDEPEND=">=dev-python/doit-py-0.4.0[${PYTHON_USEDEP}]"
+
+distutils_enable_tests pytest
+distutils_enable_sphinx doc dev-python/sphinx_rtd_theme
+
+PATCHES=(
+ "${FILESDIR}/${P}_pytest5.4.patch"
+ "${FILESDIR}/${P}_unpickable.patch"
+)
+
+src_prepare() {
+ default
+ # Replace custom theme with builtin for documentation
+ sed -i -e "s:'press':'sphinx_rtd_theme':" doc/conf.py || die
+ # Disable test failing due to impact on PATH run in a sandbox
+ sed -i -e "s:test_target:_&:" tests/test_cmd_strace.py || die
+}
+
+src_install() {
+ distutils-r1_src_install
+ newbashcomp bash_completion_doit ${PN}
+ insinto /usr/share/zsh/site-functions
+ newins zsh_completion_doit _${PN}
+}
diff --git a/dev-python/doit/files/doit-0.32.0_pytest5.4.patch b/dev-python/doit/files/doit-0.32.0_pytest5.4.patch
new file mode 100644
index 000000000000..58dd154859cb
--- /dev/null
+++ b/dev-python/doit/files/doit-0.32.0_pytest5.4.patch
@@ -0,0 +1,81 @@
+From 159b7baebfefeacb443f55f2d12cbf0876628cbc Mon Sep 17 00:00:00 2001
+From: Eduardo Schettino <schettino72@gmail.com>
+Date: Wed, 22 Apr 2020 04:48:36 +0800
+Subject: [PATCH] fix tests for pytest 5.4
+
+---
+ dev_requirements.txt | 2 +-
+ tests/conftest.py | 22 +++++++---------------
+ tests/test_dependency.py | 4 ++--
+ 3 files changed, 10 insertions(+), 18 deletions(-)
+
+diff --git a/dev_requirements.txt b/dev_requirements.txt
+index 1e31e4f..f16ba86 100644
+--- a/dev_requirements.txt
++++ b/dev_requirements.txt
+@@ -2,6 +2,6 @@
+ # $ pip install --requirement dev_requirements.txt
+
+ pyflakes
+-pytest>=4.0
++pytest>=5.4.1
+ coverage>=4.0
+ doit-py>=0.4.0
+diff --git a/tests/conftest.py b/tests/conftest.py
+index 5c4da9f..9eab396 100644
+--- a/tests/conftest.py
++++ b/tests/conftest.py
+@@ -78,12 +78,9 @@ def remove_db(filename):
+ 'dbm.ndbm': ['.db'],
+ }
+
+-def dep_manager_fixture(request, dep_class):
+- # copied from tempdir plugin
+- name = request._pyfuncitem.name
+- name = py.std.re.sub("[\W]", "_", name)
+- my_tmpdir = request.config._tmpdirhandler.mktemp(name, numbered=True)
+- dep_file = Dependency(dep_class, os.path.join(my_tmpdir.strpath, "testdb"))
++def dep_manager_fixture(request, dep_class, tmp_path_factory):
++ filename = str(tmp_path_factory.mktemp('x', True) / 'testdb')
++ dep_file = Dependency(dep_class, filename)
+ dep_file.whichdb = whichdb(dep_file.name) if dep_class is DbmDB else 'XXX'
+ dep_file.name_ext = db_ext.get(dep_file.whichdb, [''])
+
+@@ -97,18 +94,13 @@ def remove_depfile():
+
+
+ @pytest.fixture
+-def dep_manager(request):
+- return dep_manager_fixture(request, DbmDB)
++def dep_manager(request, tmp_path_factory):
++ return dep_manager_fixture(request, DbmDB, tmp_path_factory)
+
+
+ @pytest.fixture
+-def depfile_name(request):
+- # copied from tempdir plugin
+- name = request._pyfuncitem.name
+- name = py.std.re.sub("[\W]", "_", name)
+- my_tmpdir = request.config._tmpdirhandler.mktemp(name, numbered=True)
+- depfile_name = (os.path.join(my_tmpdir.strpath, "testdb"))
+-
++def depfile_name(request, tmp_path_factory):
++ depfile_name = str(tmp_path_factory.mktemp('x', True) / 'testdb')
+ def remove_depfile():
+ remove_db(depfile_name)
+ request.addfinalizer(remove_depfile)
+diff --git a/tests/test_dependency.py b/tests/test_dependency.py
+index 3fc2a14..f84e002 100644
+--- a/tests/test_dependency.py
++++ b/tests/test_dependency.py
+@@ -68,8 +68,8 @@ def test_sqlite_import():
+ # create a separate fixture to be used only by this module
+ # because only here it is required to test with all backends
+ @pytest.fixture(params=[JsonDB, DbmDB, SqliteDB])
+-def pdep_manager(request):
+- return dep_manager_fixture(request, request.param)
++def pdep_manager(request, tmp_path_factory):
++ return dep_manager_fixture(request, request.param, tmp_path_factory)
+
+
+
diff --git a/dev-python/doit/files/doit-0.32.0_unpickable.patch b/dev-python/doit/files/doit-0.32.0_unpickable.patch
new file mode 100644
index 000000000000..d96da6cd73c6
--- /dev/null
+++ b/dev-python/doit/files/doit-0.32.0_unpickable.patch
@@ -0,0 +1,39 @@
+From df4dc1c6a92d9f50cfe7f56d9507eca5bc56870e Mon Sep 17 00:00:00 2001
+From: Stefano Rivera <stefano@rivera.za.net>
+Date: Sun, 2 Feb 2020 13:02:58 +0100
+Subject: [PATCH] Replace recursive knot with explicitly unpicklable object
+
+Python 3.8 was able to pickle the previously unpicklable. Instead of
+relying on limits, let's raise an explicit error.
+
+Fixes: #341
+---
+ tests/test_runner.py | 13 ++++---------
+ 1 file changed, 4 insertions(+), 9 deletions(-)
+
+diff --git a/tests/test_runner.py b/tests/test_runner.py
+index 51c8a61..a9029e8 100644
+--- a/tests/test_runner.py
++++ b/tests/test_runner.py
+@@ -577,17 +577,12 @@ def non_top_function(): return 4
+ t2 = pickle.loads(t1p)
+ assert 4 == t2.actions[0].py_callable()
+
+- @pytest.mark.xfail('PLAT_IMPL == "PyPy"') # pypy can handle it :)
+ def test_not_picklable_raises_InvalidTask(self):
+- # create a large enough recursive obj so pickle fails
+- d1 = {}
+- last = d1
+- for x in range(400):
+- dn = {'p': last}
+- last = dn
+- d1['p'] = last
+-
+ def non_top_function(): pass
++ class Unpicklable:
++ def __getstate__(self):
++ raise pickle.PicklingError("DO NOT PICKLE")
++ d1 = Unpicklable()
+ t1 = Task('t1', [non_top_function, (d1,)])
+ pytest.raises(InvalidTask, runner.JobTask, t1)
+
diff --git a/dev-python/doit/metadata.xml b/dev-python/doit/metadata.xml
index d1235f896cae..6627bab29b61 100644
--- a/dev-python/doit/metadata.xml
+++ b/dev-python/doit/metadata.xml
@@ -1,9 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!--maintainer-needed-->
+ <maintainer type="person">
+ <email>azamat.hackimov@gmail.com</email>
+ <name>Azamat H. Hackimov</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<upstream>
+ <remote-id type="github">pydoit/doit</remote-id>
<remote-id type="pypi">doit</remote-id>
- <remote-id type="sourceforge">python-doit</remote-id>
</upstream>
</pkgmetadata>