diff options
-rw-r--r-- | dev-python/hypothesis/Manifest | 1 | ||||
-rw-r--r-- | dev-python/hypothesis/hypothesis-6.14.7.ebuild | 62 | ||||
-rw-r--r-- | eclass/python-utils-r1.eclass | 30 | ||||
-rw-r--r-- | sys-apps/pkgcore/Manifest | 1 | ||||
-rw-r--r-- | sys-apps/pkgcore/pkgcore-0.12.4.ebuild | 50 |
5 files changed, 142 insertions, 2 deletions
diff --git a/dev-python/hypothesis/Manifest b/dev-python/hypothesis/Manifest index 0cddb611f8c4..121487129137 100644 --- a/dev-python/hypothesis/Manifest +++ b/dev-python/hypothesis/Manifest @@ -3,3 +3,4 @@ DIST hypothesis-python-6.14.2.tar.gz 9135496 BLAKE2B f77f0668c4d0c2f5a952e06a40a DIST hypothesis-python-6.14.3.tar.gz 9135537 BLAKE2B 2effb0c68cf3a7a2f7d56c0c46c2ba36cbed4fed35b8a617ec68a721990247370772b986f0492aab112f7420c07409f8d738485ca28f42e7aea919af52611b10 SHA512 1722c5dcf1eb7375fd09d4208851826582808449fcaaa0345f1461d9a531961500a9c888bec5a457efbbb34f8178464b3358a3187b94bb5c783af42b4e7287ce DIST hypothesis-python-6.14.5.tar.gz 9135819 BLAKE2B 2e42949f81024038b901231a8446203388c8052ebaacf4a87d21356265fd1c09c9aa8b191dcd65780d45cc52ed9d48bb16440fc553addb4671e0ad901213ef64 SHA512 d047eea19129d5855bee5f012f5c91fe1f0de40228600fadad9c76709f951c003450f613f59848064b58f9d0e559b54b44744ae0aae689687488b6506cc8fe1a DIST hypothesis-python-6.14.6.tar.gz 9136187 BLAKE2B a9f0d24882266d5ccce0e940fb7e28ae654361215829ae87410ea18a0d304a78ecbfeaa8b74f7c415d60991e43f7b4beaaecbaaabbb697dac47aa360c5d59366 SHA512 fecf5af77d5f355861b6fbf3ea964a741b501a9db032c3f2ded2fb51605f2b961e2ad0633f671d6ffbc2e6ff4ca27412eb456ca7bd9a72a4a9e8b89cc79a7042 +DIST hypothesis-python-6.14.7.tar.gz 9136527 BLAKE2B 46176df0ffac48d3bff68a83b03b316506236e8a89365c419d61d0e8dae98a54961da3715377475ba7ce89d9d989e63b75eed1473758896c13bc8c0937617b12 SHA512 bb04434893c7cf937c1f1fc733fc424b48e87ec00d3f650ad85b1749b37f18b3a4718c346739d9121b4461d46516ee1af934a34922cc6ec626defa5ffb1e531b diff --git a/dev-python/hypothesis/hypothesis-6.14.7.ebuild b/dev-python/hypothesis/hypothesis-6.14.7.ebuild new file mode 100644 index 000000000000..536affb7ae13 --- /dev/null +++ b/dev-python/hypothesis/hypothesis-6.14.7.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..10} pypy3 ) +PYTHON_REQ_USE="threads(+),sqlite" + +inherit distutils-r1 multiprocessing optfeature + +DESCRIPTION="A library for property based testing" +HOMEPAGE="https://github.com/HypothesisWorks/hypothesis https://pypi.org/project/hypothesis/" +SRC_URI="https://github.com/HypothesisWorks/${PN}/archive/${PN}-python-${PV}.tar.gz" +S="${WORKDIR}/${PN}-${PN}-python-${PV}/${PN}-python" + +LICENSE="MPL-2.0" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" +IUSE="cli" + +RDEPEND=" + >=dev-python/attrs-19.2.0[${PYTHON_USEDEP}] + >=dev-python/sortedcontainers-2.1.0[${PYTHON_USEDEP}] + cli? ( + $(python_gen_cond_dep ' + dev-python/black[${PYTHON_USEDEP}] + dev-python/click[${PYTHON_USEDEP}] + ' python3_{7..9}) + ) +" +BDEPEND=" + test? ( + dev-python/mock[${PYTHON_USEDEP}] + dev-python/pexpect[${PYTHON_USEDEP}] + dev-python/pytest-xdist[${PYTHON_USEDEP}] + !!dev-python/pytest-describe + !!<dev-python/typing-3.7.4.1 + ) +" + +distutils_enable_tests --install pytest + +python_prepare() { + if ! use cli || ! has "${EPYTHON}" python3.{7..9}; then + sed -i -e '/console_scripts/d' setup.py || die + fi +} + +python_test() { + distutils_install_for_testing + epytest tests/cover tests/pytest tests/quality \ + -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" +} + +pkg_postinst() { + optfeature "datetime support" dev-python/pytz + optfeature "dateutil support" dev-python/python-dateutil + optfeature "numpy support" dev-python/numpy + optfeature "django support" dev-python/django dev-python/pytz + optfeature "pandas support" dev-python/pandas + optfeature "pytest support" dev-python/pytest +} diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index a2b5b6d5d41a..4fedf939c779 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1250,11 +1250,30 @@ build_sphinx() { HTML_DOCS+=( "${dir}/_build/html/." ) } +# @VARIABLE: EPYTEST_DESELECT +# @DEFAULT_UNSET +# @DESCRIPTION: +# Specifies an array of tests to be deselected via pytest's --deselect +# parameter, when calling epytest. The list can include file paths, +# specific test functions or parametrized test invocations. +# +# Note that the listed files will still be subject to collection, +# i.e. modules imported in global scope will need to be available. +# If this is undesirable, EPYTEST_IGNORE can be used instead. + +# @VARIABLE: EPYTEST_IGNORE +# @DEFAULT_UNSET +# @DESCRIPTION: +# Specifies an array of paths to be ignored via pytest's --ignore +# parameter, when calling epytest. The listed files will be entirely +# skipped from test collection. + # @FUNCTION: epytest # @USAGE: [<args>...] # @DESCRIPTION: -# Run pytest, passing the standard set of pytest options, followed -# by user-specified options. +# Run pytest, passing the standard set of pytest options, then +# --deselect and --ignore options based on EPYTEST_DESELECT +# and EPYTEST_IGNORE, then user-specified options. # # This command dies on failure and respects nonfatal. epytest() { @@ -1274,6 +1293,13 @@ epytest() { # for end users, as it tends to fail on new warnings from deps -Wdefault ) + local x + for x in "${EPYTEST_DESELECT[@]}"; do + args+=( --deselect "${x}" ) + done + for x in "${EPYTEST_IGNORE[@]}"; do + args+=( --ignore "${x}" ) + done set -- "${EPYTHON}" -m pytest "${args[@]}" "${@}" echo "${@}" >&2 diff --git a/sys-apps/pkgcore/Manifest b/sys-apps/pkgcore/Manifest index 3f84c5faa92a..e8a87910373c 100644 --- a/sys-apps/pkgcore/Manifest +++ b/sys-apps/pkgcore/Manifest @@ -4,3 +4,4 @@ DIST pkgcore-0.12.0.tar.gz 621376 BLAKE2B d58390ad7251fc48465d744a0b0694210d1f1c DIST pkgcore-0.12.1.tar.gz 621918 BLAKE2B aa3bedaf4d58d8e604b19ce3e6f97242d29eadbbeab85b7de029d0230a5ea77e2ee96b128381964afe92a327674d64878f833d8c1ddc983c0fe1381b008e2d62 SHA512 a78f3ffd5610f14adb07e2adce07c8446012e742c777d08bbc7ac711bf194508d66a14d21aa56f5d0c9353bd10354fdd34bc6eb4b6017c03bff5d1b565a53575 DIST pkgcore-0.12.2.tar.gz 621604 BLAKE2B 15964d9a73727028010b7267a61802566aa59f28769f4ac67aa91ccd32708b1a27914ba14957e1da848dc1a2a24ee9fbf92a7b4cee055a7cff22dd1f0d204f58 SHA512 192532dcee696e7ce159efad2f90597aa68801759ceb5ae85484a99a11242c1da98b73290ce1e4c9e29f2c92607989991b3802c4d0fb9bd1f4a866dd80f13cde DIST pkgcore-0.12.3.tar.gz 621912 BLAKE2B 629c42b9d0236196d018302b0941d05d36d15d2bdf31f51ef0d212ab0aad2968ff58aa938d22ff8ba65d115e5a1e80e0f444959c2c63aa227f34bd2da3868165 SHA512 6942d13aecfbf0af2969b71b92fcf4e8e938c367fe61e4a748cae14eeeb4ba831b7ac50deb04f4afa8a7f1a6dc31a893ce4106e54b188ff0a1036f7afd6798a4 +DIST pkgcore-0.12.4.tar.gz 622553 BLAKE2B fc9df4f9499ad20cec439275880e469e1ffd8204b894c0a523ed27a3e55748e58634fca2af693fcc453e8aec068733a944331f7cea52e983e50981374239d534 SHA512 bc9eccd8d903e987df97354de008826dd52a7db0d9def064c56bb9425d1aa69e8fdf15dcfd0f86057c98a3c0adefee633a3c1cc9b689a334c126730cbdeafd0c diff --git a/sys-apps/pkgcore/pkgcore-0.12.4.ebuild b/sys-apps/pkgcore/pkgcore-0.12.4.ebuild new file mode 100644 index 000000000000..5c7eeb03645d --- /dev/null +++ b/sys-apps/pkgcore/pkgcore-0.12.4.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +DISTUTILS_IN_SOURCE_BUILD=1 +inherit distutils-r1 + +if [[ ${PV} == *9999 ]] ; then + EGIT_REPO_URI="https://github.com/pkgcore/pkgcore.git" + inherit git-r3 +else + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" +fi + +DESCRIPTION="a framework for package management" +HOMEPAGE="https://github.com/pkgcore/pkgcore" + +LICENSE="BSD MIT" +SLOT="0" + +RDEPEND=" + >=app-shells/bash-5.0 + dev-python/lxml[${PYTHON_USEDEP}]" +if [[ ${PV} == *9999 ]]; then + RDEPEND+=" ~dev-python/snakeoil-9999[${PYTHON_USEDEP}]" +else + RDEPEND+=" >=dev-python/snakeoil-0.9.6[${PYTHON_USEDEP}]" +fi +BDEPEND=" + test? ( + >=dev-python/pytest-6[${PYTHON_USEDEP}] + dev-vcs/git + ) +" + +distutils_enable_tests setup.py + +src_test() { + local -x PYTHONDONTWRITEBYTECODE= + distutils-r1_src_test +} + +python_install_all() { + local DOCS=( NEWS.rst ) + [[ ${PV} == *9999 ]] || doman man/* + distutils-r1_python_install_all +} |