]> git.pld-linux.org Git - packages/python-zc.lockfile.git/blob - python-zc.lockfile.spec
- release 4 (by relup.sh)
[packages/python-zc.lockfile.git] / python-zc.lockfile.spec
1 # TODO:
2 # - fix tests - zope.testing upgrade needed ?
3
4 %bcond_with     doc     # don't build doc
5 %bcond_with     tests   # do not perform "make test"
6 %bcond_without  python2 # CPython 2.x module
7 %bcond_without  python3 # CPython 3.x module
8
9 %define         module          zc.lockfile
10 %define         egg_name        zc.lockfile
11 %define         pypi_name       zc.lockfile
12 Summary:        Basic inter-process locks
13 Summary(pl.UTF-8):      Podstawowe blokady pomiędzy procesami 
14 Name:           python-%{pypi_name}
15 Version:        1.2.1
16 Release:        4
17 License:        ZPL 2.1
18 Group:          Libraries/Python
19 Source0:        https://files.pythonhosted.org/packages/source/z/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
20 # Source0-md5:  163f0293d53a84f608f9008d9c0afc60
21 URL:            https://pypi.python.org/pypi/%{pypi_name}
22 BuildRequires:  rpm-pythonprov
23 BuildRequires:  rpmbuild(macros) >= 1.714
24 %if %{with python2}
25 BuildRequires:  python-modules
26 BuildRequires:  python-setuptools
27 BuildRequires:  python-zope.exceptions
28 BuildRequires:  python-zope.testing
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3-modules
32 BuildRequires:  python3-setuptools
33 BuildRequires:  python3-zope.exceptions
34 BuildRequires:  python3-zope.testing
35
36 %endif
37 # when using /usr/bin/env or other in-place substitutions
38 #BuildRequires:        sed >= 4.0
39 # replace with other requires if defined in setup.py
40 Requires:       python-modules
41 Requires:       python-zope.exceptions
42 Requires:       python-zope.testing
43 BuildArch:      noarch
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %description
47
48 %description -l pl.UTF-8
49
50 %package -n python3-%{pypi_name}
51 Summary:        -
52 Summary(pl.UTF-8):      -
53 Group:          Libraries/Python
54 Requires:       python3-modules
55 Requires:       python3-zope.exceptions
56 Requires:       python3-zope.testing
57
58 %description -n python3-%{pypi_name}
59
60 %description -n python3-%{pypi_name} -l pl.UTF-8
61
62 %package apidocs
63 Summary:        API documentation for Python %{module} module
64 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona %{module}
65 Group:          Documentation
66
67 %description apidocs
68 API documentation for Pythona %{module} module.
69
70 %description apidocs -l pl.UTF-8
71 Dokumentacja API modułu Pythona %{module}.
72
73 %prep
74 %setup -q -n %{pypi_name}-%{version}
75
76 %build
77 %if %{with python2}
78 %py_build %{?with_tests:test}
79 %endif
80
81 %if %{with python3}
82 %py3_build %{?with_tests:test}
83 %endif
84
85 %if %{with doc}
86 cd docs
87 %{__make} -j1 html
88 rm -rf _build/html/_sources
89 %endif
90
91 %install
92 rm -rf $RPM_BUILD_ROOT
93
94 %if %{with python2}
95 %py_install
96
97 # when files are installed in other way that standard 'setup.py
98 # they need to be (re-)compiled
99 # change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
100 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
101 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
102
103 %py_postclean
104 %endif
105
106 %if %{with python3}
107 %py3_install
108 %endif
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 %if %{with python2}
114 %files
115 %defattr(644,root,root,755)
116 %doc CHANGES.txt doc.txt README.txt
117 %dir %{py_sitescriptdir}/zc
118 %{py_sitescriptdir}/zc/lockfile
119 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
120 %{py_sitescriptdir}/*.pth
121 %endif
122
123 %if %{with python3}
124 %files -n python3-%{pypi_name}
125 %defattr(644,root,root,755)
126 %doc CHANGES.txt doc.txt README.txt
127 %dir %{py3_sitescriptdir}/zc
128 %{py3_sitescriptdir}/zc/lockfile
129 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
130 %{py3_sitescriptdir}/*.pth
131 %endif
132
133 %if %{with doc}
134 %files apidocs
135 %defattr(644,root,root,755)
136 %doc docs/_build/html/*
137 %endif
This page took 0.082547 seconds and 3 git commands to generate.