From 5f0b64dded45a6848e3bf2f4a021d2754abe2086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Thu, 22 May 2025 16:22:31 +0200 Subject: [PATCH] dev-python/fake-py: New package, v0.11.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New NIH "minimalistic" test dependency for dev-python/tld. Because obviously there is nothing more minimalistic than having to install two packages doing the same thing. Signed-off-by: Michał Górny --- dev-python/fake-py/Manifest | 1 + dev-python/fake-py/fake-py-0.11.6.ebuild | 57 ++++++++++++++++++++++++ dev-python/fake-py/metadata.xml | 12 +++++ 3 files changed, 70 insertions(+) create mode 100644 dev-python/fake-py/Manifest create mode 100644 dev-python/fake-py/fake-py-0.11.6.ebuild create mode 100644 dev-python/fake-py/metadata.xml diff --git a/dev-python/fake-py/Manifest b/dev-python/fake-py/Manifest new file mode 100644 index 0000000000000..0f83c51f73741 --- /dev/null +++ b/dev-python/fake-py/Manifest @@ -0,0 +1 @@ +DIST fake_py-0.11.6.tar.gz 183570 BLAKE2B ebcc04cb4ea17d52c085e5d0989e88f74f78ee7a6967ccf1c000325d659150f783d2e0fd72e9919b2f3f0d2023328a0278e8e724ad960fcd22dcd1f302f0f0c0 SHA512 1ca476adc9b8bff0a4c2b666b91770b9126d093dc02dcab017db2a8099b20e5ed5416950127892f724460a8030a7f5ab51a9f91f4fed4ce6773ee31dbf827d3c diff --git a/dev-python/fake-py/fake-py-0.11.6.ebuild b/dev-python/fake-py/fake-py-0.11.6.ebuild new file mode 100644 index 0000000000000..b093bc7a7c69e --- /dev/null +++ b/dev-python/fake-py/fake-py-0.11.6.ebuild @@ -0,0 +1,57 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYPI_PN=fake.py +PYTHON_COMPAT=( pypy3_11 python3_{11..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="Minimalistic, standalone alternative fake data generator with no dependencies" +HOMEPAGE=" + https://github.com/barseghyanartur/fake.py/ + https://pypi.org/project/fake-py/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +BDEPEND=" + dev-python/setuptools-scm[${PYTHON_USEDEP}] + test? ( + dev-python/hypothesis[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +src_prepare() { + distutils-r1_src_prepare + + # avoid pytest-codeblock which is another nightmare NIH package + rm conftest.py || die +} + +python_test() { + # This package is a mess with tests thrown all over the place, + # and they need to be run separately because of how messy this is. + + local EPYTEST_DESELECT=( + # fails when started via 'python -m pytest' because of different + # argparse output + fake.py::TestCLI::test_no_command + ) + + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + epytest -o addopts= fake.py + + local suite + for suite in customisation dataclasses hypothesis lazyfuzzy; do + pushd "examples/${suite}" >/dev/null || die + epytest -o addopts= + popd >/dev/null || die + done +} diff --git a/dev-python/fake-py/metadata.xml b/dev-python/fake-py/metadata.xml new file mode 100644 index 0000000000000..c517de0d7d9ea --- /dev/null +++ b/dev-python/fake-py/metadata.xml @@ -0,0 +1,12 @@ + + + + + python@gentoo.org + + + + barseghyanartur/fake.py + fake.py + +