summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorMichel Alexandre Salim <salimma@fedoraproject.org>2021-12-07 20:40:50 -0800
committerMichel Alexandre Salim <salimma@fedoraproject.org>2021-12-07 20:40:50 -0800
commit40261775935637b32442df976f76fbb94ef1af09 (patch)
treeeca3a7798c94c9748e4009346053b67b14d83344 /python
parent33ee1f494e9c625c868c1b96c9d9626be81d85bb (diff)
downloadspecs-40261775935637b32442df976f76fbb94ef1af09.tar.gz
specs-40261775935637b32442df976f76fbb94ef1af09.tar.xz
specs-40261775935637b32442df976f76fbb94ef1af09.zip
+ pytest-services
Diffstat (limited to 'python')
-rw-r--r--python/python-pytest-services.spec71
1 files changed, 71 insertions, 0 deletions
diff --git a/python/python-pytest-services.spec b/python/python-pytest-services.spec
new file mode 100644
index 0000000..ce9ca9c
--- /dev/null
+++ b/python/python-pytest-services.spec
@@ -0,0 +1,71 @@
+%global srcname pytest-services
+%global forgeurl https://github.com/pytest-dev/%{srcname}
+
+Name: python-%{srcname}
+Version: 2.2.1
+Release: %autorelease
+Summary: Services plugin for pytest
+
+License: MIT
+URL: %{forgeurl}
+Source0: %{pypi_source %{srcname}}
+Patch0: %{srcname}-flake8.patch
+
+BuildArch: noarch
+
+BuildRequires: python3-devel
+BuildRequires: pyproject-rpm-macros
+# Test dependencies:
+BuildRequires: python3dist(pytest)
+BuildRequires: memcached
+
+%global common_description %{expand:
+This plugin provides a set of fixtures and utility functions to start service
+processes for your tests with pytest.}
+
+%description %{common_description}
+
+
+%package -n python3-%{srcname}
+Summary: %{summary}
+
+%description -n python3-%{srcname} %{common_description}
+
+
+%prep
+%autosetup -p1 -n %{srcname}-%{version}
+# we don't care about upstream's PEP8 lint checks
+# (and need to port it to flake8 if we do)
+sed -i '/^pytest-pep8$/d' requirements-testing.txt
+
+%generate_buildrequires
+# not using -t as tox.ini has extra cruft
+%pyproject_buildrequires -r requirements-testing.txt
+
+
+%build
+%pyproject_wheel
+
+
+%install
+%pyproject_install
+%pyproject_save_files pytest_services
+
+
+%check
+k="$(awk 'NR>1 {pre=" and " } { printf "%snot %s", pre, $0 }' <<EOF
+test_mysql
+test_xvfb
+EOF
+)"
+%pytest -k "${k}"
+
+
+%files -n python3-%{srcname} -f %{pyproject_files}
+%license LICENSE.txt
+%doc AUTHORS.rst CHANGES.rst README.rst
+##{python3_sitelib}/%%{srcname}.pth
+
+
+%changelog
+%autochangelog