1 |
commit: 3e0779ef01cda614df7313fecbad343475b32746 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 27 05:57:26 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 27 06:10:34 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e0779ef |
7 |
|
8 |
dev-python/lockfile: Use PEP517 build |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
.../lockfile/files/lockfile-0.12.2-pytest.patch | 20 ++++++++++++++ |
13 |
dev-python/lockfile/lockfile-0.12.2-r3.ebuild | 31 ++++++++++++++++++++++ |
14 |
2 files changed, 51 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/lockfile/files/lockfile-0.12.2-pytest.patch b/dev-python/lockfile/files/lockfile-0.12.2-pytest.patch |
17 |
new file mode 100644 |
18 |
index 000000000000..47362a4de6a0 |
19 |
--- /dev/null |
20 |
+++ b/dev-python/lockfile/files/lockfile-0.12.2-pytest.patch |
21 |
@@ -0,0 +1,20 @@ |
22 |
+diff -dup -r lockfile-0.12.2/test/compliancetest.py lockfile-0.12.2.new/test/compliancetest.py |
23 |
+--- lockfile-0.12.2/test/compliancetest.py 2015-11-25 19:29:13.000000000 +0100 |
24 |
++++ lockfile-0.12.2.new/test/compliancetest.py 2022-05-27 07:55:43.720523461 +0200 |
25 |
+@@ -6,15 +6,13 @@ import lockfile |
26 |
+ |
27 |
+ |
28 |
+ class ComplianceTest(object): |
29 |
+- def __init__(self): |
30 |
+- self.saved_class = lockfile.LockFile |
31 |
+- |
32 |
+ def _testfile(self): |
33 |
+ """Return platform-appropriate file. Helper for tests.""" |
34 |
+ import tempfile |
35 |
+ return os.path.join(tempfile.gettempdir(), 'trash-%s' % os.getpid()) |
36 |
+ |
37 |
+ def setup(self): |
38 |
++ self.saved_class = lockfile.LockFile |
39 |
+ lockfile.LockFile = self.class_to_test |
40 |
+ |
41 |
+ def teardown(self): |
42 |
|
43 |
diff --git a/dev-python/lockfile/lockfile-0.12.2-r3.ebuild b/dev-python/lockfile/lockfile-0.12.2-r3.ebuild |
44 |
new file mode 100644 |
45 |
index 000000000000..3eee1e70ca38 |
46 |
--- /dev/null |
47 |
+++ b/dev-python/lockfile/lockfile-0.12.2-r3.ebuild |
48 |
@@ -0,0 +1,31 @@ |
49 |
+# Copyright 1999-2022 Gentoo Authors |
50 |
+# Distributed under the terms of the GNU General Public License v2 |
51 |
+ |
52 |
+EAPI=8 |
53 |
+ |
54 |
+DISTUTILS_USE_PEP517=setuptools |
55 |
+PYTHON_COMPAT=( python3_{8..10} pypy3 ) |
56 |
+ |
57 |
+inherit distutils-r1 |
58 |
+ |
59 |
+DESCRIPTION="Platform-independent file locking module" |
60 |
+HOMEPAGE=" |
61 |
+ https://launchpad.net/pylockfile/ |
62 |
+ https://pypi.org/project/lockfile/ |
63 |
+" |
64 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
65 |
+ |
66 |
+LICENSE="MIT" |
67 |
+SLOT="0" |
68 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
69 |
+ |
70 |
+BDEPEND=" |
71 |
+ >dev-python/pbr-1.8[${PYTHON_USEDEP}] |
72 |
+" |
73 |
+ |
74 |
+PATCHES=( |
75 |
+ "${FILESDIR}"/${P}-pytest.patch |
76 |
+) |
77 |
+ |
78 |
+distutils_enable_tests pytest |
79 |
+distutils_enable_sphinx doc/source --no-autodoc |