]> git.pld-linux.org Git - packages/python3-itsdangerous.git/blob - python-itsdangerous.spec
Added .spec file ;)
[packages/python3-itsdangerous.git] / python-itsdangerous.spec
1 #
2 # Conditional build:
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
7
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}
12 Version:        0.24
13 Release:        1
14 License:        BSD
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.219
21 %if %{with python2}
22 BuildRequires:  python-devel
23 BuildRequires:  python-distribute
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-devel
27 BuildRequires:  python3-distribute
28 BuildRequires:  python3-modules
29 %endif
30 Requires:       python-modules
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 Various helpers to pass data to untrusted environments and to get it
36 back safe and sound.
37
38 # %description -l pl.UTF-8
39
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
45
46 %description -n python3-%{module}
47
48 %description -n python3-%{module} -l pl.UTF-8
49
50 %package apidocs
51 Summary:        %{module} API documentation
52 Summary(pl.UTF-8):      Dokumentacja API %{module}
53 Group:          Documentation
54
55 %description apidocs
56 API documentation for %{module}.
57
58 %description apidocs -l pl.UTF-8
59 Dokumentacja API %{module}.
60
61 %prep
62 %setup -q -n %{module}-%{version}
63
64
65 %build
66 %if %{with python2}
67 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
68 %endif
69
70 %if %{with python3}
71 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
72 %endif
73
74 %if %{with doc}
75 cd docs
76 %{__make} -j1 html
77 rm -rf _build/html/_sources
78 %endif
79
80 %install
81 rm -rf $RPM_BUILD_ROOT
82
83 %if %{with python2}
84 %{__python} setup.py \
85         build --build-base build-2 \
86         install --skip-build \
87         --optimize=2 \
88         --root=$RPM_BUILD_ROOT
89
90 %py_postclean
91 %endif
92
93 %if %{with python3}
94 %{__python3} setup.py \
95         build --build-base build-3 \
96         install --skip-build \
97         --optimize=2 \
98         --root=$RPM_BUILD_ROOT
99 %endif
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %if %{with python2}
105 %files
106 %defattr(644,root,root,755)
107 # %doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO
108 %{py_sitescriptdir}/%{module}.py[co]
109 %if "%{py_ver}" > "2.4"
110 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
111 %endif
112 %endif
113
114 %if %{with python3}
115 %files -n python3-%{module}
116 %defattr(644,root,root,755)
117 # %doc AUTHORS CHANGES LICENSE
118 %{py3_sitescriptdir}/%{module}.py
119 %{py3_sitescriptdir}/__pycache__/*.py[co]
120 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
121 %endif
122
123 %if %{with doc}
124 %files apidocs
125 %defattr(644,root,root,755)
126 %doc docs/_build/html/*
127 %endif
This page took 0.054192 seconds and 3 git commands to generate.