]> git.pld-linux.org Git - packages/python-ZODB.git/blame - python-ZODB.spec
Rel 1. Works for me.
[packages/python-ZODB.git] / python-ZODB.spec
CommitLineData
5f1a0597
MK
1# TODO:
2# - fix tests
3# - fix docs
4# Conditional build:
5%bcond_with doc # don't build doc
6%bcond_with tests # do not perform "make test"
7%bcond_without python2 # CPython 2.x module
8%bcond_without python3 # CPython 3.x module
9
10# NOTES:
11# - 'module' should match the Python import path (first component?)
12# - 'egg_name' should equal to Python egg name
13# - 'pypi_name' must match the Python Package Index name
14%define module ZODB
15%define egg_name ZODB
16%define pypi_name ZODB
17Summary: Python object-oriented database
18Summary(pl.UTF-8): Pythonowa zorientowana obietowo baza danych
19Name: python-%{pypi_name}
20Version: 5.3.0
5057eec7 21Release: 1
5f1a0597
MK
22License: ZPL 2.1
23Group: Libraries/Python
24Source0: https://files.pythonhosted.org/packages/source/Z/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
25# Source0-md5: 606b51a7a027d5bba2ed4269f3187c67
26URL: http://www.zodb.org/
27BuildRequires: rpm-pythonprov
28BuildRequires: rpmbuild(macros) >= 1.714
29%if %{with python2}
30BuildRequires: python-BTrees
31BuildRequires: python-ZConfig
32BuildRequires: python-modules
33BuildRequires: python-persistent
34BuildRequires: python-setuptools
35BuildRequires: python-transaction
36BuildRequires: python-zc.lockfile
37BuildRequires: python-zodbpickle
38%endif
39%if %{with python3}
40BuildRequires: python3-BTrees
41BuildRequires: python3-ZConfig
42BuildRequires: python3-modules
43BuildRequires: python3-persistent
44BuildRequires: python3-setuptools
45BuildRequires: python3-transaction
46BuildRequires: python3-zc.lockfile
47BuildRequires: python3-zodbpickle
48%endif
49# when using /usr/bin/env or other in-place substitutions
50#BuildRequires: sed >= 4.0
51# replace with other requires if defined in setup.py
52Requires: python-BTrees
53Requires: python-ZConfig
54Requires: python-modules
55Requires: python-persistent
56Requires: python-transaction
57Requires: python-zc.lockfile
58Requires: python-zodbpickle
59BuildArch: noarch
60BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61
62%description
63Implementation of the JSON-RPC v2.0 specification
64(backwards-compatible) as a client library.
65
66# %%description -l pl.UTF-8
67
68%package -n python3-%{pypi_name}
69Summary: -
70Summary(pl.UTF-8): -
71%description -n python3-%{pypi_name}
72
73%description -n python3-%{pypi_name} -l pl.UTF-8
74
75%package apidocs
76Summary: API documentation for Python %{module} module
77Group: Libraries/Python
78Requires: python3-BTrees
79Requires: python3-ZConfig
80Requires: python3-modules
81Requires: python3-persistent
82Requires: python3-transaction
83Requires: python3-zc.lockfile
84Requires: python3-zodbpickle
85Summary(pl.UTF-8): Dokumentacja API modułu Pythona %{module}
86Group: Documentation
87
88%description apidocs
89API documentation for Pythona %{module} module.
90
91%description apidocs -l pl.UTF-8
92Dokumentacja API modułu Pythona %{module}.
93
94%prep
95%setup -q -n %{pypi_name}-%{version}
96
97%build
98%if %{with python2}
99%py_build %{?with_tests:test}
100%endif
101
102%if %{with python3}
103%py3_build %{?with_tests:test}
104%endif
105
106%if %{with doc}
107cd docs
108%{__make} -j1 html
109rm -rf _build/html/_sources
110%endif
111
112%install
113rm -rf $RPM_BUILD_ROOT
114
115%if %{with python2}
116%py_install
117
118# when files are installed in other way that standard 'setup.py
119# they need to be (re-)compiled
120# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
121%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
122%py_comp $RPM_BUILD_ROOT%{py_sitedir}
123
124%py_postclean
125%endif
126
127%if %{with python3}
128%py3_install
129%endif
130
131%clean
132rm -rf $RPM_BUILD_ROOT
133
134%if %{with python2}
135%files
136%defattr(644,root,root,755)
137%doc CHANGES.rst DEVELOPERS.rst HISTORY.rst
138%{py_sitescriptdir}/%{module}
139%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
140%endif
141
142%if %{with python3}
143%files -n python3-%{pypi_name}
144%defattr(644,root,root,755)
145%doc CHANGES.rst DEVELOPERS.rst HISTORY.rst
146%attr(755,root,root) %{_bindir}/*
147%{py3_sitescriptdir}/%{module}
148%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
149%endif
150
151%if %{with doc}
152%files apidocs
153%defattr(644,root,root,755)
154%doc docs/_build/html/*
155%endif
This page took 0.204028 seconds and 4 git commands to generate.