diff options
Diffstat (limited to 'dev-python/mock')
-rw-r--r-- | dev-python/mock/Manifest | 8 | ||||
-rw-r--r-- | dev-python/mock/files/mock-1.0.1-fix-python3.4.patch | 30 | ||||
-rw-r--r-- | dev-python/mock/metadata.xml | 12 | ||||
-rw-r--r-- | dev-python/mock/mock-1.0.1-r2.ebuild | 41 | ||||
-rw-r--r-- | dev-python/mock/mock-1.3.0-r2.ebuild | 42 | ||||
-rw-r--r-- | dev-python/mock/mock-2.0.0.ebuild | 42 |
6 files changed, 175 insertions, 0 deletions
diff --git a/dev-python/mock/Manifest b/dev-python/mock/Manifest new file mode 100644 index 000000000000..b1f8bdd39a06 --- /dev/null +++ b/dev-python/mock/Manifest @@ -0,0 +1,8 @@ +AUX mock-1.0.1-fix-python3.4.patch 895 BLAKE2B 0a767889c488559f5cdc8a472a3a58d656d1e974012da5b4e97cdee1e0006d52c2d413520cc59330a6893e430f032040d6cf1179ca282ba55571e75bbf6adba1 SHA512 86c08b8754a7ab7fe923c5d61d66f1196c603efea86a0e04df2fa8f53280522625e175bfd601de49c1f963c0948a2c6279154cd0e1fb5e7c2e5378ddfa512e97 +DIST mock-1.0.1.tar.gz 818644 BLAKE2B 7bfe02c413c2f98a2d98ca9cc40ca8831d65b3a5095d95625e0844e764c3510b771dc9e36086dd44f518659cdf7f1d105c02bdb51c5ffe00953c5eb3b0e05106 SHA512 4f6f4ebc34843e16b15d866e415ad9992e79bd266a63a22fee31b773ba77615e3406bc8890ceed92c0ee296380d68c46299c4c4448a3526f9cb96b258d32cf58 +DIST mock-1.3.0.tar.gz 70908 BLAKE2B 4df669c5d54fc835c70d6190362d4dea9cc0d2e7ca47f6ef5a394bc80cac10898b611146f28da93e84c4b26c23f25708be3c8fc6b61062dae099396e351861d8 SHA512 10cbb78b89f2e82abfcadc035a526182f83b59df4775cd85acfdbeb4505791c63b7a3761e6126a08d9aedbd07ead8632ac2a728dc07a362f4aaeea694bdecaf9 +DIST mock-2.0.0.tar.gz 73684 BLAKE2B 970bebe72b6969b58acdc2856b53054f992d01f9f3ca5f91b73073d0a1c9ec89a5c94fd66eab85b258f23f33326825ff6598bb2ba8e07eded1e6540a26ac5fa3 SHA512 a08007651b749d2843b94f5045d74c122958888290aea21930455538a854e6b04c07115e21d82edde996154bf597d7a8784a2f4213cbabc49a98dec22dd92238 +EBUILD mock-1.0.1-r2.ebuild 1122 BLAKE2B 0666590c8f88b75fa42b639d6a62bfe728eddac03a8960c9e6e3c0ffbfa4c5ca38ed16a4225a8e88773bc7f41f9a0e25bfdcfc25c1e6af93717d48b09c81770d SHA512 910319a9736fdbe3797ba3dbf8131bcb40f3b7a22e532c70f1e68797e948c4dc37aded8bbf726e9cb4b404e655b12cf4c6e66b34cbe3abc8c04998f9e96810d5 +EBUILD mock-1.3.0-r2.ebuild 1073 BLAKE2B 04e814e0e3babe2b9bc187d0a30d0e81f0292306fe05f370b4203d152f10d251ec36a79c139722395e020c17c7f7d267a2f219779d85f9b7ac16ee58d89ec837 SHA512 601b41f1e291903f62a786900aef41e815396c21c2536ea1d9d0acfb27b305765bc3ee7ec2fa8270f14d6f70f76361cc007cd9cc926fc072b1cbcee145913e39 +EBUILD mock-2.0.0.ebuild 1080 BLAKE2B b8ad29322db0f8e3c1a9199ae9e94b1fed7b5df7ff743509e4de0adb96053209d2adf0d3f55813f6a4ac0913cdc2d06ffb5c067f780dd7f8d97784a1d068929d SHA512 28d07b10d9ccb4491f0cf16bbde62ba9503af0ae08975b33e6dad7b63742d0ba95bf6f514d49ef34a275e4e799e412ce13fafb86e7611cd82e0cddfc5bc21543 +MISC metadata.xml 365 BLAKE2B 80ce989b7585192744838e804490286b598d6a4e082a2e88fce1efdc34c3ef3185478fa6ce3f08c81dd680c62b4de0c7eff3fe7c926d96479ab856aa46c69250 SHA512 89eda97d1f0ece91d573a9fc4fb5d357733b757b1214a56c7bb14a10f84e1c275d2cc49ed773597c4e320df03f751fb093fef7f3805deb450380df4dd83d875f diff --git a/dev-python/mock/files/mock-1.0.1-fix-python3.4.patch b/dev-python/mock/files/mock-1.0.1-fix-python3.4.patch new file mode 100644 index 000000000000..166ee2ac00d3 --- /dev/null +++ b/dev-python/mock/files/mock-1.0.1-fix-python3.4.patch @@ -0,0 +1,30 @@ +# Fix test errors with python 3.4 - thanks to Ubuntu developer Barry Warsaw. + +diff -r d356250e275d mock.py +--- a/mock.py Tue Apr 09 14:53:33 2013 +0100 ++++ b/mock.py Wed Feb 26 15:12:18 2014 -0500 +@@ -239,12 +239,21 @@ + funcopy.__name__ = func.__name__ + funcopy.__doc__ = func.__doc__ + #funcopy.__dict__.update(func.__dict__) +- funcopy.__module__ = func.__module__ ++ try: ++ funcopy.__module__ = func.__module__ ++ except AttributeError: ++ pass + if not inPy3k: + funcopy.func_defaults = func.func_defaults + return +- funcopy.__defaults__ = func.__defaults__ +- funcopy.__kwdefaults__ = func.__kwdefaults__ ++ try: ++ funcopy.__defaults__ = func.__defaults__ ++ except AttributeError: ++ pass ++ try: ++ funcopy.__kwdefaults__ = func.__kwdefaults__ ++ except AttributeError: ++ pass + + + def _callable(obj): diff --git a/dev-python/mock/metadata.xml b/dev-python/mock/metadata.xml new file mode 100644 index 000000000000..ab357a34d6e4 --- /dev/null +++ b/dev-python/mock/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <upstream> + <remote-id type="pypi">mock</remote-id> + <remote-id type="github">testing-cabal/mock</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-python/mock/mock-1.0.1-r2.ebuild b/dev-python/mock/mock-1.0.1-r2.ebuild new file mode 100644 index 000000000000..891538afdf95 --- /dev/null +++ b/dev-python/mock/mock-1.0.1-r2.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="A Python Mocking and Patching Library for Testing" +HOMEPAGE="http://www.voidspace.org.uk/python/mock/ https://pypi.org/project/mock/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos" +IUSE="doc test" + +# dev-python/unittest2 is not required with Python >=3.2. +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + dev-python/nose[${PYTHON_USEDEP}] + $(python_gen_cond_dep 'dev-python/unittest2[${PYTHON_USEDEP}]' python2_7 pypy) + )" +RDEPEND="" + +PATCHES=( "${FILESDIR}"/${P}-fix-python3.4.patch ) + +python_test() { + nosetests || die "Tests fail with ${EPYTHON}" +} + +python_install_all() { + local DOCS=( docs/*.txt ) + + distutils-r1_python_install_all + + if use doc; then + dohtml -r html/ -x html/objects.inv -x html/output.txt -x html/_sources + fi +} diff --git a/dev-python/mock/mock-1.3.0-r2.ebuild b/dev-python/mock/mock-1.3.0-r2.ebuild new file mode 100644 index 000000000000..6604750c8115 --- /dev/null +++ b/dev-python/mock/mock-1.3.0-r2.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="Rolling backport of unittest.mock for all Pythons" +HOMEPAGE="https://github.com/testing-cabal/mock" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos" +IUSE="test" + +CDEPEND=" + >=dev-python/pbr-1.3[${PYTHON_USEDEP}] + virtual/python-funcsigs[${PYTHON_USEDEP}]" +DEPEND=" + >=dev-python/setuptools-17.1[${PYTHON_USEDEP}] + test? ( + ${CDEPEND} + dev-python/nose[${PYTHON_USEDEP}] + >=dev-python/unittest2-1.1.0[${PYTHON_USEDEP}] + )" +RDEPEND=" + ${CDEPEND} + >=dev-python/six-1.7[${PYTHON_USEDEP}] +" + +python_test() { + nosetests --verbose || die "tests fail under ${EPYTHON}" +} + +python_install_all() { + local DOCS=( docs/{conf.py,index.txt} AUTHORS ChangeLog NEWS README.rst ) + + distutils-r1_python_install_all +} diff --git a/dev-python/mock/mock-2.0.0.ebuild b/dev-python/mock/mock-2.0.0.ebuild new file mode 100644 index 000000000000..b4d88b3e0c2c --- /dev/null +++ b/dev-python/mock/mock-2.0.0.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 ) + +inherit distutils-r1 + +DESCRIPTION="Rolling backport of unittest.mock for all Pythons" +HOMEPAGE="https://github.com/testing-cabal/mock" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos" +IUSE="test" + +CDEPEND=" + >=dev-python/pbr-1.3[${PYTHON_USEDEP}] + >=virtual/python-funcsigs-1[${PYTHON_USEDEP}]" +DEPEND=" + >=dev-python/setuptools-17.1[${PYTHON_USEDEP}] + test? ( + ${CDEPEND} + dev-python/nose[${PYTHON_USEDEP}] + >=dev-python/unittest2-1.1.0[${PYTHON_USEDEP}] + )" +RDEPEND=" + ${CDEPEND} + >=dev-python/six-1.9[${PYTHON_USEDEP}] +" + +python_test() { + nosetests --verbose || die "tests fail under ${EPYTHON}" +} + +python_install_all() { + local DOCS=( docs/{conf.py,index.txt} AUTHORS ChangeLog NEWS README.rst ) + + distutils-r1_python_install_all +} |