]> git.pld-linux.org Git - packages/python-zc.lockfile.git/blame - python-zc.lockfile.spec
- release 2 (by relup.sh)
[packages/python-zc.lockfile.git] / python-zc.lockfile.spec
CommitLineData
b74b7515
MK
1# TODO:
2# - fix tests - zope.testing upgrade needed ?
b74b7515
MK
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
12Summary: Basic inter-process locks
ed3256b9 13Summary(pl.UTF-8): Podstawowe blokady pomiędzy procesami
b74b7515
MK
14Name: python-%{pypi_name}
15Version: 1.2.1
67fb9fa2 16Release: 2
b74b7515
MK
17License: ZPL 2.1
18Group: Libraries/Python
19Source0: https://files.pythonhosted.org/packages/source/z/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
20# Source0-md5: 163f0293d53a84f608f9008d9c0afc60
21URL: https://pypi.python.org/pypi/%{pypi_name}
22BuildRequires: rpm-pythonprov
23BuildRequires: rpmbuild(macros) >= 1.714
24%if %{with python2}
25BuildRequires: python-modules
26BuildRequires: python-setuptools
27BuildRequires: python-zope.exceptions
28BuildRequires: python-zope.testing
29%endif
30%if %{with python3}
31BuildRequires: python3-modules
32BuildRequires: python3-setuptools
33BuildRequires: python3-zope.exceptions
34BuildRequires: python3-zope.testing
35
36%endif
37# when using /usr/bin/env or other in-place substitutions
ed3256b9 38#BuildRequires: sed >= 4.0
b74b7515
MK
39# replace with other requires if defined in setup.py
40Requires: python-modules
41Requires: python-zope.exceptions
42Requires: python-zope.testing
43BuildArch: noarch
44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46%description
47
48%description -l pl.UTF-8
49
50%package -n python3-%{pypi_name}
51Summary: -
52Summary(pl.UTF-8): -
53Group: Libraries/Python
54Requires: python3-modules
55Requires: python3-zope.exceptions
56Requires: 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
63Summary: API documentation for Python %{module} module
64Summary(pl.UTF-8): Dokumentacja API modułu Pythona %{module}
65Group: Documentation
66
67%description apidocs
68API documentation for Pythona %{module} module.
69
70%description apidocs -l pl.UTF-8
71Dokumentacja 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}
86cd docs
87%{__make} -j1 html
88rm -rf _build/html/_sources
89%endif
90
91%install
92rm -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
111rm -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.258548 seconds and 4 git commands to generate.