diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-01-27 13:58:28 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-01-27 13:58:28 +0000 |
commit | 8eccda982236f2cfe9188bdcaffd9168134f39a9 (patch) | |
tree | a2f9e1db038cdb1c9ae55a8ead0f9020b072d627 /dev-python/PyContracts | |
parent | f2299aed04cae8310f7fce0be5396370e346d966 (diff) |
gentoo auto-resync : 27:01:2023 - 13:58:28
Diffstat (limited to 'dev-python/PyContracts')
-rw-r--r-- | dev-python/PyContracts/Manifest | 4 | ||||
-rw-r--r-- | dev-python/PyContracts/PyContracts-1.8.14-r1.ebuild | 39 | ||||
-rw-r--r-- | dev-python/PyContracts/files/PyContracts-1.8.14-fix-py3.10.patch | 150 | ||||
-rw-r--r-- | dev-python/PyContracts/metadata.xml | 13 |
4 files changed, 0 insertions, 206 deletions
diff --git a/dev-python/PyContracts/Manifest b/dev-python/PyContracts/Manifest deleted file mode 100644 index e0d535e1784b..000000000000 --- a/dev-python/PyContracts/Manifest +++ /dev/null @@ -1,4 +0,0 @@ -AUX PyContracts-1.8.14-fix-py3.10.patch 5460 BLAKE2B 4c30458b9a731788055b1a5cd21ff973800e1aa82dedd613d3ebb7e3fe92f6d5264d7ecfb8bcb2ba6c67e5cfc495e894a66ab40e3d22ec818da923daafbc353e SHA512 3c6bafd95ef86c77e05ddf7c3c54bbbcf49f7275edd7f0d8a9bcbb04d95c4070e32f4b1bb1bd251351e970caf5eb469d110a9cd10cfd78ed4ad8967c8c8caae3 -DIST PyContracts-1.8.14.tar.gz 92346 BLAKE2B 507fdfb313347d6650f21326b6b70b73f17cd702f25d06d97e5d84f84c9bf7f23cceb48d918727158d02081115344a4194e307caed59510265dacbf267774ab4 SHA512 95f8c76e35cc7549fefa069d9c354fc1d4a55dcab0f3fd322cb86aed92c7bfa75a06eabb7540ff991d590a90cdec781906b856291002a82ee5ab0072cdcf6ccd -EBUILD PyContracts-1.8.14-r1.ebuild 1042 BLAKE2B 792ccfe4a0e74afa7daab87655105540b0f8ba6a14ca9636b460c929f2191da867e2ad47e1de5e7f8269fa6bbf7404e4f4ce1b12379e62a3514e79ef242dce9b SHA512 8287fc6fb488b56cdd925b8b74c3a4038c4eaa6f239cfc8a80ba122ba48e4a1884c7d5d171f67f795e1d103b6b3a8cf944356556bfe473c246f15ae9ad7997fc -MISC metadata.xml 413 BLAKE2B b731255a39193db2f861e4907dd6066170892c7cf325a6efc2b82e998d46dd2aba2a9343011075ba4a08e9f6b675783dce66989b2ca1598099acdd0d875644b9 SHA512 70ffaa45a305c0883b13f579d1b4293009e5cb619197a01ab78e27a3a26e32072fe7e88b081df04d19af576c19cc88dbbe21522b4d8f3765d6b697049c6a2f06 diff --git a/dev-python/PyContracts/PyContracts-1.8.14-r1.ebuild b/dev-python/PyContracts/PyContracts-1.8.14-r1.ebuild deleted file mode 100644 index d77287470a4a..000000000000 --- a/dev-python/PyContracts/PyContracts-1.8.14-r1.ebuild +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{9..10} pypy3 ) - -inherit distutils-r1 optfeature - -DESCRIPTION="Declare constraints on function parameters and return values" -HOMEPAGE="https://andreacensi.github.io/contracts/ https://pypi.org/project/PyContracts/" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - -SLOT="0" -LICENSE="LGPL-2" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - -RDEPEND=" - dev-python/decorator[${PYTHON_USEDEP}] - dev-python/future[${PYTHON_USEDEP}] - dev-python/pyparsing[${PYTHON_USEDEP}] - dev-python/six[${PYTHON_USEDEP}] -" -BDEPEND=" - test? ( $(python_gen_cond_dep ' - dev-python/numpy[${PYTHON_USEDEP}] - ' 'python*' ) - ) -" - -PATCHES=( - "${FILESDIR}/${P}-fix-py3.10.patch" -) - -distutils_enable_tests nose - -pkg_postinst() { - optfeature "constraints on numpy arrays" dev-python/numpy -} diff --git a/dev-python/PyContracts/files/PyContracts-1.8.14-fix-py3.10.patch b/dev-python/PyContracts/files/PyContracts-1.8.14-fix-py3.10.patch deleted file mode 100644 index 754b40efabd8..000000000000 --- a/dev-python/PyContracts/files/PyContracts-1.8.14-fix-py3.10.patch +++ /dev/null @@ -1,150 +0,0 @@ -From d23ee2902e9e9aeffec86cbdb7a392d71be70861 Mon Sep 17 00:00:00 2001 -From: slorg1 <slorg1@gmail.com> -Date: Tue, 16 Apr 2019 14:13:52 -0400 -Subject: [PATCH] + upgrade to use collections.abc as needed for python 3.6+ - ---- a/src/contracts/library/map.py -+++ b/src/contracts/library/map.py -@@ -1,7 +1,11 @@ - from ..interface import Contract, ContractNotRespected - from ..syntax import (W, contract_expression, O, S, add_contract, add_keyword, - Keyword) --import collections -+ -+try: -+ import collections.abc as collectionsAbc # python 3.6+ -+except ImportError: -+ import collections as collectionsAbc - - - class Map(Contract): -@@ -13,7 +17,7 @@ def __init__(self, length=None, key_c=None, value_c=None, where=None): - self.value_c = value_c - - def check_contract(self, context, value, silent): -- if not isinstance(value, collections.Mapping): -+ if not isinstance(value, collectionsAbc.Mapping): - error = 'Expected a Mapping, got %r.' % value.__class__.__name__ - raise ContractNotRespected(contract=self, error=error, - value=value, context=context) ---- a/src/contracts/library/miscellaneous_aliases.py -+++ b/src/contracts/library/miscellaneous_aliases.py -@@ -1,12 +1,16 @@ --import collections -- -+try: -+ import collections.abc as collectionsAbc # python 3.6+ -+except ImportError: -+ import collections as collectionsAbc - - - def ist(C): -+ - def f(x): - f.__name__ = 'isinstance_of_%s' % C.__name__ - if not isinstance(x, C): - raise ValueError('Value is not an instance of %s.' % C.__name__) -+ - return f - - -@@ -14,33 +18,32 @@ def m_new_contract(name, f): - from contracts.library.extensions import CheckCallable - from contracts.library.extensions import Extension - Extension.registrar[name] = CheckCallable(f) -- - --m_new_contract('Container', ist(collections.Container)) --# todo: Iterable(x) --m_new_contract('Iterable', ist(collections.Iterable)) -- --m_new_contract('Hashable', ist(collections.Hashable)) - -+m_new_contract('Container', ist(collectionsAbc.Container)) -+# todo: Iterable(x) -+m_new_contract('Iterable', ist(collectionsAbc.Iterable)) - -+m_new_contract('Hashable', ist(collectionsAbc.Hashable)) - --m_new_contract('Iterator', ist(collections.Iterator)) --m_new_contract('Sized', ist(collections.Sized)) --m_new_contract('Callable', ist(collections.Callable)) --m_new_contract('Sequence', ist(collections.Sequence)) --m_new_contract('Set', ist(collections.Set)) --m_new_contract('MutableSequence', ist(collections.MutableSequence)) --m_new_contract('MutableSet', ist(collections.MutableSet)) --m_new_contract('Mapping', ist(collections.Mapping)) --m_new_contract('MutableMapping', ist(collections.MutableMapping)) --#new_contract('MappingView', ist(collections.MappingView)) --#new_contract('ItemsView', ist(collections.ItemsView)) --#new_contract('ValuesView', ist(collections.ValuesView)) -+m_new_contract('Iterator', ist(collectionsAbc.Iterator)) -+m_new_contract('Sized', ist(collectionsAbc.Sized)) -+m_new_contract('Callable', ist(collectionsAbc.Callable)) -+m_new_contract('Sequence', ist(collectionsAbc.Sequence)) -+m_new_contract('Set', ist(collectionsAbc.Set)) -+m_new_contract('MutableSequence', ist(collectionsAbc.MutableSequence)) -+m_new_contract('MutableSet', ist(collectionsAbc.MutableSet)) -+m_new_contract('Mapping', ist(collectionsAbc.Mapping)) -+m_new_contract('MutableMapping', ist(collectionsAbc.MutableMapping)) -+# new_contract('MappingView', ist(collections.MappingView)) -+# new_contract('ItemsView', ist(collections.ItemsView)) -+# new_contract('ValuesView', ist(collections.ValuesView)) - - - # Not a lambda to have better messages --def is_None(x): -+def is_None(x): - return x is None - -+ - m_new_contract('None', is_None) - m_new_contract('NoneType', is_None) ---- a/src/contracts/library/seq.py -+++ b/src/contracts/library/seq.py -@@ -1,7 +1,12 @@ - from ..interface import Contract, ContractNotRespected - from ..syntax import (add_contract, W, contract_expression, O, S, add_keyword, - Keyword) --import collections -+ -+try: -+ import collections.abc as collectionsAbc # python 3.6+ -+except ImportError: -+ import collections as collectionsAbc -+ - from past.builtins import xrange - - try: -@@ -38,7 +43,7 @@ def check_contract(self, context, value, silent): - - return - -- if not isinstance(value, collections.Sequence): -+ if not isinstance(value, collectionsAbc.Sequence): - error = 'Expected a Sequence, got %r.' % value.__class__.__name__ - raise ContractNotRespected(self, error, value, context) - ---- a/src/contracts/library/sets.py -+++ b/src/contracts/library/sets.py -@@ -1,7 +1,10 @@ - from ..interface import Contract, ContractNotRespected, describe_type - from ..syntax import (Keyword, O, S, W, add_contract, add_keyword, - contract_expression) --import collections -+try: -+ import collections.abc as collectionsAbc # python 3.6+ -+except ImportError: -+ import collections as collectionsAbc - - - class ASet(Contract): -@@ -13,7 +16,7 @@ def __init__(self, length_contract=None, - self.elements_contract = elements_contract - - def check_contract(self, context, value, silent): -- if not isinstance(value, collections.Set): -+ if not isinstance(value, collectionsAbc.Set): - error = 'Expected a set, got %r.' % describe_type(value) - raise ContractNotRespected(self, error, value, context) - diff --git a/dev-python/PyContracts/metadata.xml b/dev-python/PyContracts/metadata.xml deleted file mode 100644 index ab1d67f3e345..000000000000 --- a/dev-python/PyContracts/metadata.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>python@gentoo.org</email> - <name>Python</name> - </maintainer> - <stabilize-allarches/> - <upstream> - <remote-id type="pypi">PyContracts</remote-id> - <remote-id type="github">AndreaCensi/contracts</remote-id> - </upstream> -</pkgmetadata> |