From 33bfe6605851ae611857caa7351c5c97e0fdcfb9d9254b7e91344ba0d1492e6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 4 Jul 2023 15:46:19 +0000 Subject: [PATCH 1/6] Accepting request 1096796 from home:ecsos:python - Add %{?sle15_python_module_pythons} OBS-URL: https://build.opensuse.org/request/show/1096796 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-socks?expand=0&rev=8 --- python-python-socks.changes | 5 +++++ python-python-socks.spec | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/python-python-socks.changes b/python-python-socks.changes index a643846..04930f5 100644 --- a/python-python-socks.changes +++ b/python-python-socks.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 4 11:32:43 UTC 2023 - ecsos + +- Add %{?sle15_python_module_pythons} + ------------------------------------------------------------------- Wed Feb 22 07:28:56 UTC 2023 - ecsos diff --git a/python-python-socks.spec b/python-python-socks.spec index dac453e..5c65405 100644 --- a/python-python-socks.spec +++ b/python-python-socks.spec @@ -16,8 +16,7 @@ # -%define skip_python2 1 -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?sle15_python_module_pythons} Name: python-python-socks Version: 2.1.1 Release: 0 @@ -49,7 +48,7 @@ directly. It is used internally by aiohttp-socks and httpx-socks packages. %check # try at least a simple import -echo 'from python_socks import ProxyType' | python3 +echo 'from python_socks import ProxyType' | $python %files %{python_files} %doc README.md From 69f1712e5da3714e61b78a2723f59f3acd183ad0ddaf2151e127724d4aa82b54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 4 Jul 2023 15:47:10 +0000 Subject: [PATCH 2/6] "test" for all pythons OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-socks?expand=0&rev=9 --- python-python-socks.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-python-socks.spec b/python-python-socks.spec index 5c65405..a9c588e 100644 --- a/python-python-socks.spec +++ b/python-python-socks.spec @@ -48,7 +48,7 @@ directly. It is used internally by aiohttp-socks and httpx-socks packages. %check # try at least a simple import -echo 'from python_socks import ProxyType' | $python +%python_expand echo 'from python_socks import ProxyType' | $python %files %{python_files} %doc README.md From ff6c4bc2baeafaec0f43047d0c8e42620566708049f5a1c681fb52c8bb94f338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 4 Jul 2023 15:53:58 +0000 Subject: [PATCH 3/6] what? OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-socks?expand=0&rev=10 --- python-python-socks.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-python-socks.spec b/python-python-socks.spec index a9c588e..73a68a2 100644 --- a/python-python-socks.spec +++ b/python-python-socks.spec @@ -48,7 +48,7 @@ directly. It is used internally by aiohttp-socks and httpx-socks packages. %check # try at least a simple import -%python_expand echo 'from python_socks import ProxyType' | $python +%{python_expand echo 'from python_socks import ProxyType' | $python} %files %{python_files} %doc README.md From c52b16b7ac02e6927d838afa4345c7888013228275534cd8469fc77554fefacd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 4 Jul 2023 16:01:34 +0000 Subject: [PATCH 4/6] later OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-socks?expand=0&rev=11 --- python-python-socks.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-python-socks.spec b/python-python-socks.spec index 73a68a2..96a5ee5 100644 --- a/python-python-socks.spec +++ b/python-python-socks.spec @@ -48,7 +48,7 @@ directly. It is used internally by aiohttp-socks and httpx-socks packages. %check # try at least a simple import -%{python_expand echo 'from python_socks import ProxyType' | $python} +python_expand echo 'from python_socks import ProxyType' | $python %files %{python_files} %doc README.md From a5bd6dfa15636c5dcf9f2919b79ea827192409d3ecf60e4763ea18c50fa5a43b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 4 Jul 2023 17:26:46 +0000 Subject: [PATCH 5/6] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-socks?expand=0&rev=12 --- python-python-socks.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-python-socks.spec b/python-python-socks.spec index 96a5ee5..5c65405 100644 --- a/python-python-socks.spec +++ b/python-python-socks.spec @@ -48,7 +48,7 @@ directly. It is used internally by aiohttp-socks and httpx-socks packages. %check # try at least a simple import -python_expand echo 'from python_socks import ProxyType' | $python +echo 'from python_socks import ProxyType' | $python %files %{python_files} %doc README.md From 32864f367bd390a4dddc83200183adad00a567e59aee9b68ef698905feb1e976 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 5 Jul 2023 07:43:42 +0000 Subject: [PATCH 6/6] - Clean up SPEC file. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-socks?expand=0&rev=13 --- python-python-socks.changes | 5 +++++ python-python-socks.spec | 14 ++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/python-python-socks.changes b/python-python-socks.changes index 04930f5..cd28ccd 100644 --- a/python-python-socks.changes +++ b/python-python-socks.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jul 5 07:43:34 UTC 2023 - Matej Cepl + +- Clean up SPEC file. + ------------------------------------------------------------------- Tue Jul 4 11:32:43 UTC 2023 - ecsos diff --git a/python-python-socks.spec b/python-python-socks.spec index 5c65405..4eceb99 100644 --- a/python-python-socks.spec +++ b/python-python-socks.spec @@ -24,7 +24,8 @@ Summary: Core proxy client functionality for Python License: Apache-2.0 URL: https://github.com/romis2012/python-socks Source: https://files.pythonhosted.org/packages/source/p/python-socks/python-socks-%{version}.tar.gz -BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch @@ -37,22 +38,23 @@ Supports SOCKS4(a), SOCKS5, HTTP (tunneling) proxy and provides sync and async directly. It is used internally by aiohttp-socks and httpx-socks packages. %prep -%setup -q -n python-socks-%{version} +%autosetup -p1 -n python-socks-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check # try at least a simple import -echo 'from python_socks import ProxyType' | $python +%python_exec -c 'from python_socks import ProxyType' %files %{python_files} %doc README.md %license LICENSE.txt -%{python_sitelib}/* +%{python_sitelib}/python_socks +%{python_sitelib}/python_socks-%{version}*-info %changelog