]> git.pld-linux.org Git - packages/python-speaklater.git/blob - python-speaklater.spec
5af8abf85cc1f797393553b69cb12dc2a6c4483c
[packages/python-speaklater.git] / python-speaklater.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  speaklater
9 Summary:        Implements a lazy string for python
10 Summary(pl.UTF-8):      Implementacja wartoĊ›ciowania leniwego dla Pythona
11 # Name must match the python module/package name (as in 'import' statement)
12 Name:           python-%{module}
13 Version:        1.3
14 Release:        7
15 License:        BSD-like
16 Group:          Libraries/Python
17 Source0:        https://pypi.python.org/packages/source/s/%{module}/%{module}-%{version}.tar.gz
18 # Source0-md5:  e8d5dbe36e53d5a35cff227e795e8bbf
19 URL:            http://github.com/mitsuhiko/speaklater
20 BuildRequires:  rpmbuild(macros) >= 1.710
21 BuildRequires:  rpm-pythonprov
22 %if %{with python2}
23 BuildRequires:  python-distribute
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-distribute
27 BuildRequires:  python3-modules
28 %endif
29 Requires:       python-modules
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 A module that provides lazy strings for translations. Basically you
35 get an object that appears to be a string but changes the value every
36 time the value is evaluated based on a callable you provide.
37
38 # %description -l pl.UTF-8
39
40 %package -n python3-%{module}
41 Summary:        -
42 Summary(pl.UTF-8):      -
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 %build
65 %if %{with python2}
66 %py_build %{?with_tests:test}
67 %endif
68
69 %if %{with python3}
70 %py3_build %{?with_tests:test}
71 %endif
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75
76 %if %{with python2}
77 %py_install
78
79 %py_postclean
80 %endif
81
82 %if %{with python3}
83 %py3_install
84 %endif
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %if %{with python2}
90 %files
91 %defattr(644,root,root,755)
92 %doc LICENSE README
93 %{py_sitescriptdir}/*.py[co]
94 %if "%{py_ver}" > "2.4"
95 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
96 %endif
97 %endif
98
99 %if %{with python3}
100 %files -n python3-%{module}
101 %defattr(644,root,root,755)
102 %doc LICENSE README
103 %{py3_sitescriptdir}/%{module}.py
104 %{py3_sitescriptdir}/__pycache__/*.py[co]
105 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
106 %endif
107
108
This page took 0.08337 seconds and 2 git commands to generate.