diff options
| author | Liguros - Gitlab CI/CD [feature/flatten] <gitlab@liguros.net> | 2020-08-05 06:34:30 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [feature/flatten] <gitlab@liguros.net> | 2020-08-05 06:34:30 +0000 |
| commit | c64d690a72437a9d42456cef754add2436663d83 (patch) | |
| tree | 02eb821c37863fa1e0ced24f52b9361fbc88de4a /dev-python/configobj | |
| parent | a6a99f66c0503d97545e9cb1884a61327c20d67d (diff) | |
| download | baldeagleos-repo-c64d690a72437a9d42456cef754add2436663d83.tar.gz baldeagleos-repo-c64d690a72437a9d42456cef754add2436663d83.tar.xz baldeagleos-repo-c64d690a72437a9d42456cef754add2436663d83.zip | |
Updating liguros repo
Diffstat (limited to 'dev-python/configobj')
| -rw-r--r-- | dev-python/configobj/Manifest | 1 | ||||
| -rw-r--r-- | dev-python/configobj/configobj-5.0.6-r1.ebuild | 23 | ||||
| -rw-r--r-- | dev-python/configobj/files/configobj-5.0.6-fix-py2-tests.patch | 40 |
3 files changed, 64 insertions, 0 deletions
diff --git a/dev-python/configobj/Manifest b/dev-python/configobj/Manifest index 09a7a68b3487..a606bd2e893c 100644 --- a/dev-python/configobj/Manifest +++ b/dev-python/configobj/Manifest @@ -1 +1,2 @@ +DIST configobj-5.0.6.gh.tar.gz 143664 BLAKE2B b554d0aec903aecb55387a0164cd6f8d442e9fc1ab231ce7f7123e7a5041e07a86f5f7bf70492ca93fcdc1bd3caa5b855c427f060842e3b4a7524afbcc417a76 SHA512 326eb86e362f281ebf07abcb1cf7616abb270c482eafe842371cda8708245ca5e8262f1644b7164664ecc10e9004ed061c9de18cd233a657d4697dbc3ba3c59d DIST configobj-5.0.6.tar.gz 33248 BLAKE2B b58a22fdf247f1c3022108e24abb4de55620ce75f6aeb5f269f008a5668e07b8c1d0c49e4059d7f4c4c361d269ead39c3784377635c7718f92c2381e69c56cb5 SHA512 f253fdd0bc3fcd37f56c9ceb28f5c8c739b0861e099b07a3929645907c97b2261f0529850a95c1a42507846f72d88a0992fcd1e1d6fa8654dc713d120f769963 diff --git a/dev-python/configobj/configobj-5.0.6-r1.ebuild b/dev-python/configobj/configobj-5.0.6-r1.ebuild new file mode 100644 index 000000000000..5534956f45c0 --- /dev/null +++ b/dev-python/configobj/configobj-5.0.6-r1.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{5,6,7,8,9} ) +DISTUTILS_USE_SETUPTOOLS=no + +inherit distutils-r1 + +DESCRIPTION="Simple config file reader and writer" +HOMEPAGE="https://www.voidspace.org.uk/python/configobj.html https://pypi.org/project/configobj/" +SRC_URI="https://github.com/DiffSK/${PN}/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +RDEPEND="dev-python/six[${PYTHON_USEDEP}]" + +PATCHES=( "${FILESDIR}/${P}-fix-py2-tests.patch" ) + +distutils_enable_tests pytest diff --git a/dev-python/configobj/files/configobj-5.0.6-fix-py2-tests.patch b/dev-python/configobj/files/configobj-5.0.6-fix-py2-tests.patch new file mode 100644 index 000000000000..49576b4f43e7 --- /dev/null +++ b/dev-python/configobj/files/configobj-5.0.6-fix-py2-tests.patch @@ -0,0 +1,40 @@ +diff --git a/tests/test_validate.py b/tests/test_validate.py +index bffb0dc..c7d57d3 100644 +--- a/tests/test_validate.py ++++ b/tests/test_validate.py +@@ -2,7 +2,7 @@ + + from configobj import ConfigObj + import pytest +-from validate import Validator, VdtValueTooSmallError ++from validate import Validator, VdtValueTooSmallError, dottedQuadToNum + + + class TestBasic(object): +@@ -161,3 +161,26 @@ class TestBasic(object): + 'test3': 3, + 'test4': 6.0 + }}} ++ ++ ++class TestDottedQuadToNum(object): ++ ++ def test_stripped(self): ++ assert dottedQuadToNum('192.0.2.0') == 3221225984 ++ assert dottedQuadToNum('192.0.2.1 ') == 3221225985 ++ assert dottedQuadToNum(' 192.0.2.2') == 3221225986 ++ assert dottedQuadToNum('\t\t192.0.2.3\n') == 3221225987 ++ with pytest.raises(ValueError) as excinfo: ++ dottedQuadToNum('192. 0. 2. 4') ++ assert str(excinfo.value) == 'Not a good dotted-quad IP: 192. 0. 2. 4' ++ ++ def test_boundaries(self): ++ assert dottedQuadToNum('0.0.0.0') == 0 ++ assert dottedQuadToNum('255.255.255.255') == 4294967295 ++ with pytest.raises(ValueError) as excinfo: ++ dottedQuadToNum('255.255.255.256') ++ assert str(excinfo.value) == ( ++ 'Not a good dotted-quad IP: 255.255.255.256') ++ with pytest.raises(ValueError) as excinfo: ++ dottedQuadToNum('-1') ++ assert str(excinfo.value) == 'Not a good dotted-quad IP: -1' |
