From bb2e86df9cde5996dd66466f21c36b3924694ed3e698e30b06492736d501e74e Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 23 Aug 2024 04:22:45 +0000 Subject: [PATCH] - 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 --- .gitattributes | 23 ++++++++++++++ .gitignore | 1 + python-iptables.changes | 45 +++++++++++++++++++++++++++ python-iptables.spec | 69 +++++++++++++++++++++++++++++++++++++++++ v1.0.1.tar.gz | 3 ++ 5 files changed, 141 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-iptables.changes create mode 100644 python-iptables.spec create mode 100644 v1.0.1.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/python-iptables.changes b/python-iptables.changes new file mode 100644 index 0000000..4dc1c57 --- /dev/null +++ b/python-iptables.changes @@ -0,0 +1,45 @@ +------------------------------------------------------------------- +Fri Aug 23 04:18:10 UTC 2024 - Steve Kowalik + +- 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 + +- update to 1.0.1: + * https://github.com/ldx/python-iptables/compare/v0.13.0...v1.0.1 + +------------------------------------------------------------------- +Mon Jun 25 14:57:13 UTC 2018 - mcepl@suse.com + +- Clean up SPEC file +- Upgrade to 0.13.0 ... zillion small changes, mostly bugfixes, + unfortunately there is no better log than the commit one on the GitHub + repo (https://github.com/ldx/python-iptables/commits/master) + +------------------------------------------------------------------- +Thu Aug 24 13:41:30 UTC 2017 - jmatejek@suse.com + +- singlespec auto-conversion + +------------------------------------------------------------------- +Sun Dec 8 21:22:27 UTC 2013 - p.drouand@gmail.com + +- Update to version 0.2.0 + + No changelog available +- Use tarball generated with Github tags + +------------------------------------------------------------------- +Thu Oct 24 11:07:03 UTC 2013 - speilicke@suse.com + +- Require python-setuptools instead of distribute (upstreams merged) + +------------------------------------------------------------------- +Wed Nov 14 21:52:14 UTC 2012 - saschpe@suse.de + +- Initial version + + diff --git a/python-iptables.spec b/python-iptables.spec new file mode 100644 index 0000000..412f1c8 --- /dev/null +++ b/python-iptables.spec @@ -0,0 +1,69 @@ +# +# spec file for package python-iptables +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: python-iptables +Version: 1.0.1 +Release: 0 +Summary: Python bindings for iptables +License: Apache-2.0 +URL: https://github.com/ldx/python-iptables +Source: https://github.com/ldx/python-iptables/archive/v%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: libiptc-devel +BuildRequires: libxtables-devel +BuildRequires: pkg-config +BuildRequires: python-rpm-macros +BuildRequires: xtables-plugins +%python_subpackages + +%description +Python-iptables is a Python project that provides bindings to the iptables C libraries in Linux. +Interoperability with iptables is achieved using the iptables C libraries (libiptc, libxtables, +and iptables extensions), not calling the iptables executable and parsing its output as most other +iptables wrapper libraries do; this makes python-iptables faster and not prone to parsing errors, +at the same time leveraging all available iptables match and target extensions without further work. + +%prep +%setup -q +chmod -x README.md + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%check +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} +%license NOTICE +%doc doc README.md +%{python_sitearch}/iptc +%{python_sitearch}/libxtwrapper.cpython*-linux-gnu.so +%{python_sitearch}/python_iptables-%{version}.dist-info + +%changelog diff --git a/v1.0.1.tar.gz b/v1.0.1.tar.gz new file mode 100644 index 0000000..8ea1e3d --- /dev/null +++ b/v1.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ab4d2b1e4c268717dd2e7cb0f527dee06f39cdcdd763f1803a6f2618fe410ee +size 62387