]> git.pld-linux.org Git - SPECS.git/blob - python-persistent.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-persistent.spec
1 # TODO:
2 # - check test failures: FAIL: test_ring_impl (persistent.tests.test_picklecache.PickleCacheTests)
3 # - fix docs: Could not import extension repoze.sphinx.autointerface (exception: No module named 'repoze')
4 # - delete/packages /usr/lib64/python*/site-packages/persistent/tests/
5 # Conditional build:
6 %bcond_with     doc     # don't build doc
7 %bcond_with     tests   # do not perform "make test"
8 %bcond_without  python2 # CPython 2.x module
9 %bcond_without  python3 # CPython 3.x module
10
11 %define         module  persistent
12 %define         pypi_name       %{module}
13
14 Summary:        Automatic persistence for Python objects
15 Summary(pl.UTF-8):      Automytczne trwałe obiekty w Pythonie
16 Name:           python-%{module}
17 Version:        4.6.4
18 Release:        1
19 License:        ZPL 2.1
20 Group:          Libraries/Python
21 #Source0Download: https://pypi.org/simple/persistent/
22 Source0:        https://files.pythonhosted.org/packages/source/p/persistent/%{pypi_name}-%{version}.tar.gz
23 # Source0-md5:  6878fd3a3008fb5b7da7a374155fd6c2
24 URL:            http://www.zope.org/Products/ZODB
25 BuildRequires:  rpm-pythonprov
26 BuildRequires:  rpmbuild(macros) >= 1.714
27 %if %{with python2}
28 BuildRequires:  python-devel
29 BuildRequires:  python-setuptools
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-devel
33 BuildRequires:  python3-setuptools
34 %endif
35 Requires:       python-modules
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39
40 %description -l pl.UTF-8
41
42 %package -n python3-%{module}
43 Summary:        Automatic persistence for Python objects
44 Summary(pl.UTF-8):      Automytczne trwałe obiekty w Pythonie
45 Group:          Libraries/Python
46 Requires:       python3-modules
47
48 %description -n python3-%{module}
49
50 %description -n python3-%{module} -l pl.UTF-8
51
52 %package apidocs
53 Summary:        %{module} API documentation
54 Summary(pl.UTF-8):      Dokumentacja API %{module}
55 Group:          Documentation
56
57 %description apidocs
58 API documentation for %{module}.
59
60 %description apidocs -l pl.UTF-8
61 Dokumentacja API %{module}.
62
63 %prep
64 %setup -q -n %{module}-%{version}
65
66 %build
67 %if %{with python2}
68 %py_build %{?with_tests:test}
69 %endif
70
71 %if %{with python3}
72 %py3_build %{?with_tests:test}
73 %endif
74
75 %if %{with doc}
76 cd docs
77 %{__make} -j1 html
78 rm -rf _build/html/_sources
79 %endif
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83 %if %{with python2}
84 %py_install
85 %py_postclean
86 %endif
87
88 %if %{with python3}
89 %py3_install
90 %endif
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %if %{with python2}
96 %files
97 %defattr(644,root,root,755)
98 %doc README.rst CHANGES.rst
99 %dir %{py_sitedir}/%{module}
100 %{py_sitedir}/%{module}/*.py[co]
101 %{py_sitedir}/%{module}/*.[ch]
102 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
103 %{py_sitedir}/%{module}-%{version}-py*.egg-info
104 %dir %{py_incdir}/persistent/
105 %{py_incdir}/persistent/cPersistence.h
106 %{py_incdir}/persistent/ring.h
107 %endif
108
109 %if %{with python3}
110 %files -n python3-%{module}
111 %defattr(644,root,root,755)
112 %doc README.rst CHANGES.rst
113 %dir %{py3_sitedir}/%{module}
114 %{py3_sitedir}/%{module}/*.py
115 %{py3_sitedir}/%{module}/*.[ch]
116 %attr(755,root,root) %{py3_sitedir}/%{module}/*.so
117 %{py3_sitedir}/%{module}/__pycache__
118 %{py3_sitedir}/%{module}-%{version}-py*.egg-info
119 %dir %{py3_incdir}/persistent/
120 %{py3_incdir}/persistent/cPersistence.h
121 %{py3_incdir}/persistent/ring.h
122 %endif
123
124 %if %{with doc}
125 %files apidocs
126 %defattr(644,root,root,755)
127 %doc docs/_build/html/*
128 %endif
This page took 2.503457 seconds and 3 git commands to generate.