%global with_python3 1 %global commit 652cda78f9c96ae5cc70f1f8d797f60df74c4b67 %global oname txsocksx Name: python-%{oname} Version: 1.15.0.2 Release: 2%{?dist} Summary: Twisted client endpoints for SOCKS{4,4a,5} License: MIT URL: https://github.com/habnabit/txsocksx/ Source0: https://github.com/habnabit/%{oname}/archive/%{commit}/%{oname}-%{commit}.tar.gz Patch0: python-txsocksx-drop-vcversioner.patch BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-sphinx BuildRequires: python-twisted %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python-sphinx BuildRequires: python-twisted %endif # with_python3 Requires: python-twisted Requires: python-parsley %if 0%{?with_python3} %package -n python3-%{oname} Summary: Twisted client endpoints for SOCKS{4,4a,5} %endif # with_python3 %description python-txsocksx is SOCKS4/4a and SOCKS5 client endpoints for Twisted 10.1 or greater. %if 0%{?with_python3} %description -n python3-%{oname} python-txsocksx is SOCKS4/4a and SOCKS5 client endpoints for Twisted 10.1 or greater. %endif # with_python3 %prep %setup -q -n %{oname}-%{commit} %patch0 -p1 %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} %endif # with_python3 %build %{__python2} setup.py build make -C docs html man rm -f doc/_build/html/.buildinfo %{__python3} setup.py build make -C docs html man rm -f doc/_build/html/.buildinfo %install %{__python2} setup.py install --skip-build --root %{buildroot} %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install --skip-build --root %{buildroot} popd %endif # with_python3 mkdir -p %{buildroot}%{_mandir}/man1 cp -a %{_builddir}/%{oname}-%{commit}/docs/_build/man/%{oname}.1* %{buildroot}%{_mandir}/man1 # Checks are running partially due to problems with the default route in modules. # Investigating with upstream %check pushd txsocksx/test PYTHONPATH=$(pwd) %{__python2} -m unittest -v util # %%{__python2} -m unittest -v test_tls # %%{__python2} -m unittest -v test_http # %%{__python2} -m unittest -v test_grammar # %%{__python2} -m unittest -v test_client popd %if 0%{?with_python3} pushd %{py3dir} PYTHONPATH=$(pwd) %{__python3} -m unittest -v util # %%{__python3} -m unittest -v test_tls # %%{__python3} -m unittest -v test_http # %%{__python3} -m unittest -v test_grammar # %%{__python3} -m unittest -v test_client popd %endif # with_python3 %files %doc COPYING README.rst %{_mandir}/man1/%{oname}.1* %{python2_sitelib}/%{oname}-%{version}-py%{python2_version}.egg-info %{python2_sitelib}/%{oname}/ %if 0%{?with_python3} py%{python2_version}%files -n python3-%{oname} %doc COPYING README.rst %{_mandir}/man1/%{oname}.1* %{python3_sitelib}/%{oname}-%{version}-py%{python3_version}.egg-info %{python3_sitelib}/%{oname}/ %endif # with_python3 %changelog * Sat Sep 12 2015 Robert Mayr 1.15.0.2-2 - Python 3 is here! * Thu Aug 13 2015 Robert Mayr 1.15.0.2-1 - Bump release * Thu Jun 18 2015 Fedora Release Engineering - 1.13.0.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Tue Jan 13 2015 Robert Mayr 1.13.0.3-5 - Escape macros in comments and bump release * Mon Jan 12 2015 Robert Mayr 1.13.0.3-4 - Fix files permissions * Sat Jan 10 2015 Robert Mayr 1.13.0.3-3 - Add check section and correct permissions on files * Thu Jan 08 2015 Robert Mayr 1.13.0.3-2 - Applying bugfixes accordingly to comments in BZ #1179949 * Wed Jan 07 2015 Robert Mayr 1.13.0.3-1 - Initial package for Fedora