3 %bcond_without doc # don't build doc
4 %bcond_without tests # do not perform "make test"
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define module itsdangerous
9 Summary: Various helpers to pass trusted data to untrusted environments and back
10 Summary(pl.UTF-8): Wspomaganie przekazywania danych do i z niebezpiecznych środowisk
11 Name: python-%{module}
15 Group: Libraries/Python
16 Source0: http://pypi.python.org/packages/source/i/%{module}/%{module}-%{version}.tar.gz
17 # Source0-md5: a3d55aa79369aef5345c036a8a26307f
18 URL: http://github.com/mitsuhiko/itsdangerous
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.710
22 BuildRequires: python-devel
23 BuildRequires: python-distribute
26 BuildRequires: python3-devel
27 BuildRequires: python3-distribute
28 BuildRequires: python3-modules
30 Requires: python-modules
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 Various helpers to pass data to untrusted environments and to get it
38 # %description -l pl.UTF-8
40 %package -n python3-%{module}
41 Summary: Various helpers to pass data to untrusted environments and to get it back safe and sound
42 Summary(pl.UTF-8): Wspomaganie przekazywania danych do i z niebezpiecznych środowisk
43 Group: Libraries/Python
44 Requires: python3-modules
46 %description -n python3-%{module}
48 %description -n python3-%{module} -l pl.UTF-8
51 Summary: %{module} API documentation
52 Summary(pl.UTF-8): Dokumentacja API %{module}
56 API documentation for %{module}.
58 %description apidocs -l pl.UTF-8
59 Dokumentacja API %{module}.
62 %setup -q -n %{module}-%{version}
67 %py_build %{?with_tests:test}
71 %py3_build %{?with_tests:test}
77 rm -rf _build/html/_sources
81 rm -rf $RPM_BUILD_ROOT
94 rm -rf $RPM_BUILD_ROOT
98 %defattr(644,root,root,755)
99 # %doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO
100 %{py_sitescriptdir}/%{module}.py[co]
101 %if "%{py_ver}" > "2.4"
102 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
107 %files -n python3-%{module}
108 %defattr(644,root,root,755)
109 # %doc AUTHORS CHANGES LICENSE
110 %{py3_sitescriptdir}/%{module}.py
111 %{py3_sitescriptdir}/__pycache__/*.py[co]
112 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
117 %defattr(644,root,root,755)
118 %doc docs/_build/html/*