[packages/python3-pytest-socket] - python-pytest-socket.spec updated to 0.7.0 for python 3.8+
qboosh
qboosh at pld-linux.org
Sun Dec 7 22:20:03 CET 2025
commit cc6a4f6a031f8ce7a36470e128c6b3de4c2de5c8
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Dec 7 22:20:18 2025 +0100
- python-pytest-socket.spec updated to 0.7.0 for python 3.8+
python-pytest-socket.spec | 97 ----------------------------------------------
python3-pytest-socket.spec | 64 ++++++++++++++++++++++++++++++
2 files changed, 64 insertions(+), 97 deletions(-)
---
diff --git a/python-pytest-socket.spec b/python-pytest-socket.spec
deleted file mode 100644
index 8cf74e8..0000000
--- a/python-pytest-socket.spec
+++ /dev/null
@@ -1,97 +0,0 @@
-#
-# Conditional build:
-%bcond_without python2 # CPython 2.x module
-%bcond_with python3 # CPython 3.x module (built from python3-pytest-socket.spec)
-
-Summary: Pytest Plugin to disable socket calls during tests
-Summary(pl.UTF-8): Wtyczka pytesta blokująca odwołania do gniazd w trakcie testów
-Name: python-pytest-socket
-# keep 0.3.3 here for python2 support
-Version: 0.3.3
-Release: 1
-License: MIT
-Group: Libraries/Python
-#Source0Download: https://pypi.org/simple/pytest-socket/
-Source0: https://files.pythonhosted.org/packages/source/p/pytest-socket/pytest-socket-%{version}.tar.gz
-# Source0-md5: 5d3a96b1aff2d7a744ae2f002391d14c
-URL: https://pypi.org/project/pytest-socket/
-%if %{with python2}
-BuildRequires: python-modules >= 1:2.7
-BuildRequires: python-setuptools
-%endif
-%if %{with python3}
-BuildRequires: python3-modules >= 1:3.4
-BuildRequires: python3-setuptools
-%endif
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
-Requires: python-modules >= 1:2.7
-BuildArch: noarch
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-A plugin to use with Pytest to disable or restrict socket calls during
-tests to ensure network calls are prevented.
-
-%description -l pl.UTF-8
-Wtyczka dla pytesta blokująca lub ograniczająca odwołania do gniazd
-podczas testów, aby zapobiec odwołaniom do sieci.
-
-%package -n python3-pytest-socket
-Summary: Pytest Plugin to disable socket calls during tests
-Summary(pl.UTF-8): Wtyczka pytesta blokująca odwołania do gniazd w trakcie testów
-Group: Libraries/Python
-Requires: python3-modules >= 1:3.4
-
-%description -n python3-pytest-socket
-A plugin to use with Pytest to disable or restrict socket calls during
-tests to ensure network calls are prevented.
-
-%description -n python3-pytest-socket -l pl.UTF-8
-Wtyczka dla pytesta blokująca lub ograniczająca odwołania do gniazd
-podczas testów, aby zapobiec odwołaniom do sieci.
-
-%prep
-%setup -q -n pytest-socket-%{version}
-
-%build
-%if %{with python2}
-%py_build
-%endif
-
-%if %{with python3}
-%py3_build
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
-%py3_install
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc LICENSE README.rst
-%{py_sitescriptdir}/pytest_socket.py[co]
-%{py_sitescriptdir}/pytest_socket-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-pytest-socket
-%defattr(644,root,root,755)
-%doc LICENSE README.rst
-%{py3_sitescriptdir}/pytest_socket.py
-%{py3_sitescriptdir}/__pycache__/pytest_socket.cpython-*.py[co]
-%{py3_sitescriptdir}/pytest_socket-%{version}-py*.egg-info
-%endif
diff --git a/python3-pytest-socket.spec b/python3-pytest-socket.spec
new file mode 100644
index 0000000..33a6542
--- /dev/null
+++ b/python3-pytest-socket.spec
@@ -0,0 +1,64 @@
+#
+# Conditional build:
+%bcond_without tests # unit tests
+
+Summary: Pytest Plugin to disable socket calls during tests
+Summary(pl.UTF-8): Wtyczka pytesta blokująca odwołania do gniazd w trakcie testów
+Name: python3-pytest-socket
+Version: 0.7.0
+Release: 1
+License: MIT
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/pytest-socket/
+Source0: https://files.pythonhosted.org/packages/source/p/pytest-socket/pytest_socket-%{version}.tar.gz
+# Source0-md5: a0d2be06ec38c479a0731b79512ad61d
+URL: https://pypi.org/project/pytest-socket/
+BuildRequires: python3-build
+BuildRequires: python3-installer
+BuildRequires: python3-modules >= 1:3.8
+BuildRequires: python3-setuptools
+%if %{with pytest}
+BuildRequires: python3-pytest >= 6.2.5
+BuildRequires: python3-pytest-httpbin >= 2.0.0
+BuildRequires: python3-pytest-randomly >= 3.15.0
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 2.044
+Requires: python3-modules >= 1:3.8
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A plugin to use with Pytest to disable or restrict socket calls during
+tests to ensure network calls are prevented.
+
+%description -l pl.UTF-8
+Wtyczka dla pytesta blokująca lub ograniczająca odwołania do gniazd
+podczas testów, aby zapobiec odwołaniom do sieci.
+
+%prep
+%setup -q -n pytest_socket-%{version}
+
+%build
+%py3_build_pyproject
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS=pytest_httpbin.plugin,pytest_socket \
+%{__python3} -m pytest tests
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install_pyproject
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.md
+%{py3_sitescriptdir}/pytest_socket.py
+%{py3_sitescriptdir}/__pycache__/pytest_socket.cpython-*.py[co]
+%{py3_sitescriptdir}/pytest_socket-%{version}.dist-info
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-pytest-socket.git/commitdiff/cc6a4f6a031f8ce7a36470e128c6b3de4c2de5c8
More information about the pld-cvs-commit
mailing list