forked from pool/python-python-socks
- Use tarball from GitHub (gh#romis2012/python-socks#30) to make
running the test suite possible. - Fix dependencies (bsc#1223181). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-socks?expand=0&rev=19
This commit is contained in:
3
_multibuild
Normal file
3
_multibuild
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
@@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 22 06:46:07 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
|
||||||
|
|
||||||
|
- Use tarball from GitHub (gh#romis2012/python-socks#30) to make
|
||||||
|
running the test suite possible.
|
||||||
|
- Fix dependencies (bsc#1223181).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 1 20:31:36 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
Mon Jan 1 20:31:36 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@@ -16,20 +16,46 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
%define psuffix -test
|
||||||
|
%bcond_without test
|
||||||
|
%else
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%bcond_with test
|
||||||
|
%endif
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-python-socks
|
Name: python-python-socks%{psuffix}
|
||||||
Version: 2.4.4
|
Version: 2.4.4
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Core proxy client functionality for Python
|
Summary: Core proxy client functionality for Python
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
URL: https://github.com/romis2012/python-socks
|
URL: https://github.com/romis2012/python-socks
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/python-socks/python-socks-%{version}.tar.gz
|
# gh#romis2012/python-socks#30
|
||||||
|
Source: https://github.com/romis2012/python-socks/archive/refs/tags/v%{version}.tar.gz#/python-socks-%{version}.tar.gz
|
||||||
|
BuildRequires: %{python_module anyio}
|
||||||
|
BuildRequires: %{python_module async-timeout}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
# Source: https://files.pythonhosted.org/packages/source/p/python-socks/python-socks-%%{version}.tar.gz
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
|
# SECTION test requirements
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
%if %{with test}
|
||||||
|
BuildRequires: %{python_module Flask}
|
||||||
|
BuildRequires: %{python_module async_timeout}
|
||||||
|
BuildRequires: %{python_module attrs}
|
||||||
|
BuildRequires: %{python_module flake8}
|
||||||
|
BuildRequires: %{python_module pytest-asyncio}
|
||||||
|
BuildRequires: %{python_module pytest-trio}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
|
BuildRequires: %{python_module tiny-proxy}
|
||||||
|
BuildRequires: %{python_module trio}
|
||||||
|
BuildRequires: %{python_module trustme}
|
||||||
|
BuildRequires: %{python_module yarl}
|
||||||
|
%endif
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -42,20 +68,28 @@ directly. It is used internally by aiohttp-socks and httpx-socks packages.
|
|||||||
%autosetup -p1 -n python-socks-%{version}
|
%autosetup -p1 -n python-socks-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if %{without test}
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if %{without test}
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with test}
|
||||||
# try at least a simple import
|
# try at least a simple import
|
||||||
%python_exec -c 'from python_socks import ProxyType'
|
%pytest
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{without test}
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%{python_sitelib}/python_socks
|
%{python_sitelib}/python_socks
|
||||||
%{python_sitelib}/python_socks-%{version}.dist-info
|
%{python_sitelib}/python_socks-%{version}.dist-info
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:e5a8e4f78203612c813946feacd87b98943965a04389fe221fa1e9ab263ad22e
|
oid sha256:2fd4a78f8ddeee7e01a93752115efa92dfb3f371bb2ac0566d0bb64c959f25b1
|
||||||
size 25792
|
size 31998
|
||||||
|
Reference in New Issue
Block a user