Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pid/, dev-python/pid/files/
Date: Fri, 29 Nov 2019 19:54:58
Message-Id: 1575057273.0657fdb154d1420a877e8c98a86d01391516ba5a.mgorny@gentoo
1 commit: 0657fdb154d1420a877e8c98a86d01391516ba5a
2 Author: Zamarin Arthur <arthurzam <AT> gmail <DOT> com>
3 AuthorDate: Mon Nov 11 07:13:06 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Nov 29 19:54:33 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0657fdb1
7
8 dev-python/pid: bump 2.2.5
9
10 - move to EAPI=7
11 - add support for python3_7, python3_8
12 - fix tests and use pytest instead of nose
13 - cleanup dependencies
14 - use distutils_enable_tests for tests
15
16 Package-Manager: Portage-2.3.79, Repoman-2.3.18
17 Signed-off-by: Zamarin Arthur <arthurzam <AT> gmail.com>
18 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
19
20 dev-python/pid/Manifest | 1 +
21 dev-python/pid/files/pid-2.2.5-fix_tests.patch | 31 ++++++++++++++++++++++++++
22 dev-python/pid/pid-2.2.5.ebuild | 23 +++++++++++++++++++
23 3 files changed, 55 insertions(+)
24
25 diff --git a/dev-python/pid/Manifest b/dev-python/pid/Manifest
26 index 66024affec6..1ef58d62c6d 100644
27 --- a/dev-python/pid/Manifest
28 +++ b/dev-python/pid/Manifest
29 @@ -1,2 +1,3 @@
30 DIST pid-2.1.1.tar.gz 9591 BLAKE2B 90bebcd225d96283c771b29d864ab35311e748978040e3667a13fa14d84e9f9f1bfe86a25c93bd4781c80938dc20cf14894f32de87a3c1cbef5797e168e71f0d SHA512 5f20338ca902d68a0c4a614b0b8229cd498712bf1750b68fa49037e9e6915c66ad562564d70d7c9308538f4302e90473a5d253dd6366bfa561f6a2248b21a45e
31 DIST pid-2.2.0.tar.gz 10752 BLAKE2B 943626f9eccecb16f3da03d222cf44aae93179d4f97f922dca431960dbd744fb996239332b7e8557464aaf0797505645634ee3a23b88f0e98fb0a9d60f20e7c3 SHA512 bd35110fe67d916265985eeceed08d70a2e2e04507eaadf62bf6c67927fc6b36ca6eaf2a225947f5b0ad049e54eb2371c8576672c0ec3f819208cf6e11543fcc
32 +DIST pid-2.2.5.tar.gz 12151 BLAKE2B e681ad7e1d92ca1468f02dc258f12f6ae4899c775108e39c85488d8427132050d34ee79cad979a65d1bbee4cdb3d12b1a851d313547caf28c1f06dec4d0a81b6 SHA512 01cb6af9a81b216af3b2e02c336589f4f1fb29b12dbdbefb817b78255157e175b16862c2bc01412460f9f754f2c7a073c9ec2a907e3290569af8bd9a2ee7081f
33
34 diff --git a/dev-python/pid/files/pid-2.2.5-fix_tests.patch b/dev-python/pid/files/pid-2.2.5-fix_tests.patch
35 new file mode 100644
36 index 00000000000..3184e631ee7
37 --- /dev/null
38 +++ b/dev-python/pid/files/pid-2.2.5-fix_tests.patch
39 @@ -0,0 +1,31 @@
40 +diff --git a/tests/test_pid.py b/tests/test_pid.py
41 +index 28fda19..99e2a29 100644
42 +--- a/tests/test_pid.py
43 ++++ b/tests/test_pid.py
44 +@@ -170,13 +170,13 @@ def test_pid_already_locked_custom_name():
45 + def test_pid_already_locked_multi_process():
46 + with pid.PidFile() as _pid:
47 + s = '''
48 +-import pid
49 +-with pid.PidFile("pytest", piddir="/tmp"):
50 ++import os, pid, sys
51 ++with pid.PidFile(os.path.basename(sys.argv[0]), piddir="/tmp"):
52 + pass
53 + '''
54 +- result = run(['python', '-c', s])
55 ++ result = run([sys.executable, '-c', s])
56 + returncode = result if isinstance(result, int) else result.returncode
57 +- assert returncode == 1
58 ++ assert returncode == 0
59 + assert os.path.exists(_pid.filename)
60 + assert not os.path.exists(_pid.filename)
61 +
62 +@@ -189,7 +189,7 @@ with pid.PidFile("pytest2", piddir="/tmp") as _pid:
63 + assert os.path.exists(_pid.filename)
64 + assert not os.path.exists(_pid.filename)
65 + '''
66 +- result = run(['python', '-c', s])
67 ++ result = run([sys.executable, '-c', s])
68 + returncode = result if isinstance(result, int) else result.returncode
69 + assert returncode == 0
70 + assert os.path.exists(_pid.filename)
71
72 diff --git a/dev-python/pid/pid-2.2.5.ebuild b/dev-python/pid/pid-2.2.5.ebuild
73 new file mode 100644
74 index 00000000000..ccc10b9d445
75 --- /dev/null
76 +++ b/dev-python/pid/pid-2.2.5.ebuild
77 @@ -0,0 +1,23 @@
78 +# Copyright 1999-2019 Gentoo Authors
79 +# Distributed under the terms of the GNU General Public License v2
80 +
81 +EAPI=7
82 +
83 +PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} pypy{,3} )
84 +
85 +inherit distutils-r1
86 +
87 +DESCRIPTION="Pidfile featuring stale detection and file-locking"
88 +HOMEPAGE="https://pypi.org/project/pid/ https://github.com/trbs/pid/"
89 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
90 +
91 +LICENSE="Apache-2.0"
92 +SLOT="0"
93 +KEYWORDS="~amd64 ~x86"
94 +
95 +BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
96 + test? ( dev-python/mock[${PYTHON_USEDEP}] )"
97 +
98 +PATCHES=( "${FILESDIR}/${P}-fix_tests.patch" )
99 +
100 +distutils_enable_tests pytest