[packages/python-PySocks] - updated to 1.6.8

qboosh qboosh at pld-linux.org
Fri Jul 20 23:00:19 CEST 2018


commit e645c5d07b972135d47a472817a7962cbada8c23
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Jul 20 23:02:12 2018 +0200

    - updated to 1.6.8

 python-PySocks.spec | 44 +++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 39 insertions(+), 5 deletions(-)
---
diff --git a/python-PySocks.spec b/python-PySocks.spec
index 9267192..e45b89a 100644
--- a/python-PySocks.spec
+++ b/python-PySocks.spec
@@ -1,26 +1,42 @@
+# TODO: finish tests
 #
 # Conditional build:
 %bcond_without	python2 # CPython 2.x module
 %bcond_without	python3 # CPython 3.x module
+%bcond_with	tests	# unit tests
 
 Summary:	SOCKS client module for Python 2
 Summary(pl.UTF-8):	Moduł klienta SOCKS dla Pythona 2
 Name:		python-PySocks
-Version:	1.6.6
-Release:	2
+Version:	1.6.8
+Release:	1
 License:	BSD
 Group:		Libraries/Python
-#Source0Download: https://pypi.python.org/simple/pysocks/
+#Source0Download: https://pypi.org/simple/pysocks/
 Source0:	https://files.pythonhosted.org/packages/source/P/PySocks/PySocks-%{version}.tar.gz
-# Source0-md5:	571f4c23982fa86bf0e7a441f1b6c881
-URL:		https://pypi.python.org/pypi/PySocks
+# Source0-md5:	441c4e3bf5b042f7e70613cd871df26c
+URL:		https://pypi.org/project/PySocks/
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
 %if %{with python2}
 BuildRequires:	python-modules >= 1:2.6
+BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	3proxy
+BuildRequires:	python-psutil
+BuildRequires:	python-pytest
+BuildRequires:	python-test-server
+%endif
 %endif
 %if %{with python3}
 BuildRequires:	python3-modules >= 1:3.2
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	3proxy
+BuildRequires:	python3-psutil
+BuildRequires:	python3-pytest
+BuildRequires:	python3-test-server
+%endif
 %endif
 Requires:	python-modules >= 1:2.6
 BuildArch:	noarch
@@ -51,13 +67,29 @@ służący do tunelowania połączeń poprzez proxy SOCKS.
 %prep
 %setup -q -n PySocks-%{version}
 
+# precompiled x86_64 binary
+%{__rm} test/bin/3proxy
+%if %{with tests}
+ln -sf /usr/bin/3proxy test/bin/3proxy
+%endif
+
 %build
 %if %{with python2}
 %py_build
+
+%if %{with tests}
+PYTHONPATH=$(pwd) \
+%{__python} -m unittest discover -s test
+%endif
 %endif
 
 %if %{with python3}
 %py3_build
+
+%if %{with tests}
+PYTHONPATH=$(pwd) \
+%{__python3} -m unittest discover -s test
+%endif
 %endif
 
 %install
@@ -79,6 +111,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
+%doc LICENSE README.md
 %{py_sitescriptdir}/socks.py[co]
 %{py_sitescriptdir}/sockshandler.py[co]
 %{py_sitescriptdir}/PySocks-%{version}-py*.egg-info
@@ -87,6 +120,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
 %files -n python3-PySocks
 %defattr(644,root,root,755)
+%doc LICENSE README.md
 %{py3_sitescriptdir}/socks.py
 %{py3_sitescriptdir}/sockshandler.py
 %{py3_sitescriptdir}/__pycache__/socks.cpython-*.py[co]
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-PySocks.git/commitdiff/e645c5d07b972135d47a472817a7962cbada8c23



More information about the pld-cvs-commit mailing list