%global pkgname stem %global with_python3 1 Name: python-stem Version: 1.4.1b Release: 10%{?dist} Summary: Python controller library for Tor Group: Development/Libraries # All source code is LGPLv3 except stem/util/ordereddict.py which is MIT License: LGPLv3 and MIT URL: https://stem.torproject.org/ Source0: https://pypi.python.org/packages/source/s/stem/%{pkgname}-%{version}.tar.bz2 # https://www.torproject.org/docs/signing-keys.html.en Source1: https://pypi.python.org/packages/source/s/stem/%{pkgname}-%{version}.tar.bz2.asc BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-sphinx BuildRequires: python-mock BuildRequires: python-crypto BuildRequires: python-pytest-flakes BuildRequires: python-pytest-pep8 %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-crypto BuildRequires: python3-pytest-flakes BuildRequires: python3-pytest-pep8 %endif %description Stem is a python controller library for Tor. It uses Tor’s control protocol to help developers program against the Tor process. %package -n python2-%{pkgname} Summary: Python controller library for Tor Group: Development/Libraries %{?python_provide:%python_provide python2-%{pkgname}} Suggests: %{name}-doc = %{version}-%{release} %description -n python2-%{pkgname} Stem is a python controller library for Tor. It uses Tor’s control protocol to help developers program against the Tor process. %if 0%{?with_python3} %package -n python3-%{pkgname} Summary: Python controller library for Tor Group: Development/Libraries %{?python_provide:%python_provide python3-%{pkgname}} Suggests: %{name}-doc = %{version}-%{release} %description -n python3-%{pkgname} Stem is a python controller library for Tor. It uses Tor’s control protocol to help developers program against the Tor process. %endif %package doc Summary: Python controller library for Tor - Documentation Group: Documentation %description doc Stem is a python controller library for Tor. It uses Tor’s control protocol to help developers program against the Tor process. This package contains documentation files for Stem. %prep %autosetup -n %{pkgname}-1.4.1 %build %py2_build %if 0%{?with_python3} %py3_build %endif pushd docs %make_build html %make_build text %make_build man popd %install %py2_install %if 0%{?with_python3} %py3_install %endif find docs/_build -name .buildinfo -delete install -D -m 0644 docs/_build/man/%{pkgname}.1 %{buildroot}%{_mandir}/man1/%{pkgname}.1 sed -e 's,^#!/usr/bin/python2,#!/usr/bin/python3,' -i %{buildroot}%{_bindir}/tor-prompt %check #%%{__python2} run_tests.py --unit #%%if 0%%{?with_python3} #%%{__python3} run_tests.py --unit #%%endif %files -n python2-%{pkgname} %license LICENSE %{python2_sitelib}/%{pkgname} %{python2_sitelib}/%{pkgname}-*.egg-info %if 0%{?with_python3} %files -n python3-%{pkgname} %license LICENSE %{_bindir}/tor-prompt %{python3_sitelib}/%{pkgname} %{python3_sitelib}/%{pkgname}-*.egg-info %endif %files doc %doc docs/_build/html docs/_build/text %license LICENSE %{_mandir}/man1/%{pkgname}.1* %changelog * Sat Feb 20 2016 Juan Orti Alcaine - 1.4.1b-10 - Fix python3 shebang (RHBZ #1310323) * Thu Feb 04 2016 Fedora Release Engineering - 1.4.1b-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Dec 10 2015 Juan Orti Alcaine - 1.4.1b-8 - Disable ckecks again * Mon Nov 30 2015 Juan Orti Alcaine - 1.4.1b-7 - Re-enable checks - Don't copy source to %%py3dir - Leave only python3 version of tor-prompt script * Wed Nov 25 2015 Juan Orti Alcaine - 1.4.1b-6 - Checks are causing problems. Disable them for now. * Wed Nov 25 2015 Juan Orti Alcaine - 1.4.1b-5 - Rename file to python2-tor-prompt * Tue Nov 24 2015 Zbigniew Jędrzejewski-Szmek - 1.4.1b-4 - Rebuild for Python 3.5 again * Sun Nov 15 2015 Juan Orti Alcaine - 1.4.1b-3 - Use python_provide macro - Create symbolic links to tor-prompt * Tue Nov 10 2015 Fedora Release Engineering - 1.4.1b-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Wed Jun 17 2015 Juan Orti Alcaine - 1.4.1b-1 - Version 1.4.1b * Mon May 18 2015 Juan Orti Alcaine - 1.4.1-1 - Version 1.4.1 * Wed May 13 2015 Juan Orti Alcaine - 1.4.0-2 - Skip integration tests * Wed May 13 2015 Juan Orti Alcaine - 1.4.0-1 - Version 1.4.0 * Thu Apr 09 2015 Juan Orti Alcaine - 1.3.0-3 - Use license macro * Wed Dec 24 2014 Juan Orti Alcaine - 1.3.0-2 - Run tests * Tue Dec 23 2014 Juan Orti Alcaine - 1.3.0-1 - Version 1.3.0 - Add documentation in text format * Sat Jun 14 2014 Juan Orti Alcaine - 1.2.2-2 - Rename tor-prompt to python3-tor-prompt in python3 subpackage * Thu Jun 12 2014 Juan Orti Alcaine - 1.2.2-1 - Version 1.2.2 * Sat Jun 07 2014 Fedora Release Engineering - 1.1.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Fri May 09 2014 Juan Orti Alcaine - 1.1.1-2 - Rebuilt for F21 Python 3.4 * Sun Nov 10 2013 Juan Orti Alcaine - 1.1.1-1 - Version 1.1.1 * Tue Oct 15 2013 Juan Orti Alcaine - 1.1.0-1 - Version 1.1.0 * Sun Aug 04 2013 Fedora Release Engineering - 1.0.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Sun Apr 28 2013 Juan Orti Alcaine - 1.0.1-4 - Enable parallel make * Sun Apr 28 2013 Juan Orti Alcaine - 1.0.1-3 - Add doc subpackage * Sun Apr 07 2013 Juan Orti Alcaine - 1.0.1-2 - Update Source URL * Wed Mar 27 2013 Juan Orti Alcaine - 1.0.1-1 - Add python3 subpackage - Update to 1.0.1 * Wed Mar 27 2013 Juan Orti Alcaine - 1.0.0-1 - Version 1.0.0 * Tue Feb 26 2013 Juan Orti Alcaine - 0-0.2.20130226gitbe9a532 - Update source code * Sun Jan 13 2013 Juan Orti Alcaine - 0-0.1.20130113git - Initial packaging