diff options
author | Zamarin Arthur <arthurzam@gmail.com> | 2019-11-11 09:13:06 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-11-29 20:54:33 +0100 |
commit | 0657fdb154d1420a877e8c98a86d01391516ba5a (patch) | |
tree | 3825c2ba11a02f4a1f4ce9856a4987ceb005b474 /dev-python/pid | |
parent | dev-python/decorator: bump v4.4.1 (diff) | |
download | gentoo-0657fdb154d1420a877e8c98a86d01391516ba5a.tar.gz gentoo-0657fdb154d1420a877e8c98a86d01391516ba5a.tar.bz2 gentoo-0657fdb154d1420a877e8c98a86d01391516ba5a.zip |
dev-python/pid: bump 2.2.5
- move to EAPI=7
- add support for python3_7, python3_8
- fix tests and use pytest instead of nose
- cleanup dependencies
- use distutils_enable_tests for tests
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Zamarin Arthur <arthurzam@gmail.com>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pid')
-rw-r--r-- | dev-python/pid/Manifest | 1 | ||||
-rw-r--r-- | dev-python/pid/files/pid-2.2.5-fix_tests.patch | 31 | ||||
-rw-r--r-- | dev-python/pid/pid-2.2.5.ebuild | 23 |
3 files changed, 55 insertions, 0 deletions
diff --git a/dev-python/pid/Manifest b/dev-python/pid/Manifest index 66024affec62..1ef58d62c6dd 100644 --- a/dev-python/pid/Manifest +++ b/dev-python/pid/Manifest @@ -1,2 +1,3 @@ DIST pid-2.1.1.tar.gz 9591 BLAKE2B 90bebcd225d96283c771b29d864ab35311e748978040e3667a13fa14d84e9f9f1bfe86a25c93bd4781c80938dc20cf14894f32de87a3c1cbef5797e168e71f0d SHA512 5f20338ca902d68a0c4a614b0b8229cd498712bf1750b68fa49037e9e6915c66ad562564d70d7c9308538f4302e90473a5d253dd6366bfa561f6a2248b21a45e DIST pid-2.2.0.tar.gz 10752 BLAKE2B 943626f9eccecb16f3da03d222cf44aae93179d4f97f922dca431960dbd744fb996239332b7e8557464aaf0797505645634ee3a23b88f0e98fb0a9d60f20e7c3 SHA512 bd35110fe67d916265985eeceed08d70a2e2e04507eaadf62bf6c67927fc6b36ca6eaf2a225947f5b0ad049e54eb2371c8576672c0ec3f819208cf6e11543fcc +DIST pid-2.2.5.tar.gz 12151 BLAKE2B e681ad7e1d92ca1468f02dc258f12f6ae4899c775108e39c85488d8427132050d34ee79cad979a65d1bbee4cdb3d12b1a851d313547caf28c1f06dec4d0a81b6 SHA512 01cb6af9a81b216af3b2e02c336589f4f1fb29b12dbdbefb817b78255157e175b16862c2bc01412460f9f754f2c7a073c9ec2a907e3290569af8bd9a2ee7081f 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 new file mode 100644 index 000000000000..3184e631ee77 --- /dev/null +++ b/dev-python/pid/files/pid-2.2.5-fix_tests.patch @@ -0,0 +1,31 @@ +diff --git a/tests/test_pid.py b/tests/test_pid.py +index 28fda19..99e2a29 100644 +--- a/tests/test_pid.py ++++ b/tests/test_pid.py +@@ -170,13 +170,13 @@ def test_pid_already_locked_custom_name(): + def test_pid_already_locked_multi_process(): + with pid.PidFile() as _pid: + s = ''' +-import pid +-with pid.PidFile("pytest", piddir="/tmp"): ++import os, pid, sys ++with pid.PidFile(os.path.basename(sys.argv[0]), piddir="/tmp"): + pass + ''' +- result = run(['python', '-c', s]) ++ result = run([sys.executable, '-c', s]) + returncode = result if isinstance(result, int) else result.returncode +- assert returncode == 1 ++ assert returncode == 0 + assert os.path.exists(_pid.filename) + assert not os.path.exists(_pid.filename) + +@@ -189,7 +189,7 @@ with pid.PidFile("pytest2", piddir="/tmp") as _pid: + assert os.path.exists(_pid.filename) + assert not os.path.exists(_pid.filename) + ''' +- result = run(['python', '-c', s]) ++ result = run([sys.executable, '-c', s]) + returncode = result if isinstance(result, int) else result.returncode + assert returncode == 0 + assert os.path.exists(_pid.filename) diff --git a/dev-python/pid/pid-2.2.5.ebuild b/dev-python/pid/pid-2.2.5.ebuild new file mode 100644 index 000000000000..ccc10b9d4456 --- /dev/null +++ b/dev-python/pid/pid-2.2.5.ebuild @@ -0,0 +1,23 @@ +# 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 + +DESCRIPTION="Pidfile featuring stale detection and file-locking" +HOMEPAGE="https://pypi.org/project/pid/ https://github.com/trbs/pid/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}] + test? ( dev-python/mock[${PYTHON_USEDEP}] )" + +PATCHES=( "${FILESDIR}/${P}-fix_tests.patch" ) + +distutils_enable_tests pytest |