17
0

Compare commits

2 Commits

Author SHA256 Message Date
05f0c9709e Accepting request 1195631 from devel:languages:python
- Do not use setup.py test to "run" the testsuite, use pytest to
  actually run it.
- Switch to pyproject macros.
- No more greedy globs in %files.

OBS-URL: https://build.opensuse.org/request/show/1195631
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-iptables?expand=0&rev=9
2024-08-23 20:26:52 +00:00
f501544bf4 - Do not use setup.py test to "run" the testsuite, use pytest to
actually run it.
- Switch to pyproject macros.
- No more greedy globs in %files.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-iptables?expand=0&rev=12
2024-08-23 04:22:45 +00:00
2 changed files with 24 additions and 7 deletions

View File

@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri Aug 23 04:18:10 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Do not use setup.py test to "run" the testsuite, use pytest to
actually run it.
- Switch to pyproject macros.
- No more greedy globs in %files.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Dec 7 22:57:15 UTC 2023 - Dirk Müller <dmueller@suse.com> Thu Dec 7 22:57:15 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-iptables # spec file for package python-iptables
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -16,19 +16,24 @@
# #
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-iptables Name: python-iptables
Version: 1.0.1 Version: 1.0.1
Release: 0 Release: 0
Summary: Python bindings for iptables Summary: Python bindings for iptables
License: Apache-2.0 License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/ldx/python-iptables URL: https://github.com/ldx/python-iptables
Source: https://github.com/ldx/python-iptables/archive/v%{version}.tar.gz Source: https://github.com/ldx/python-iptables/archive/v%{version}.tar.gz
BuildRequires: %{python_module devel} BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: libiptc-devel
BuildRequires: libxtables-devel
BuildRequires: pkg-config
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildRequires: xtables-plugins
%python_subpackages %python_subpackages
%description %description
@@ -43,18 +48,22 @@ at the same time leveraging all available iptables match and target extensions w
chmod -x README.md chmod -x README.md
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch} %python_expand %fdupes %{buildroot}%{$python_sitearch}
%check %check
%python_exec setup.py clean build test --help export XTABLES_LIBDIR=$(pkg-config xtables --variable=xtlibdir)
# Most of the tests require root
%pytest_arch -k 'TestChain and not (test_chain or test_create_chain)'
%files %{python_files} %files %{python_files}
%license NOTICE %license NOTICE
%doc doc README.md %doc doc README.md
%{python_sitearch}/* %{python_sitearch}/iptc
%{python_sitearch}/libxtwrapper.cpython*-linux-gnu.so
%{python_sitearch}/python_iptables-%{version}.dist-info
%changelog %changelog