]> git.pld-linux.org Git - packages/python-zodbpickle.git/blob - python-zodbpickle.spec
1835c146cb9dcef048873370ae09ae3ad8ed0b08
[packages/python-zodbpickle.git] / python-zodbpickle.spec
1 # Conditional build:
2 %bcond_with     doc     # don't build doc
3 %bcond_without  tests   # do not perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module          zodbpickle
8 %define         egg_name        zodbpickle
9 %define         pypi_name       zodbpickle
10
11 Summary:        Fork of Python 3 pickle module
12 Summary(pl.UTF-8):      Alternatywna implementacja moduĊ‚u pickle z Pythona3
13 Name:           python-%{module}
14 Version:        0.7.0
15 Release:        2
16 License:        PSFL 2 and ZPL 2.1
17 Group:          Libraries/Python
18 # Source0:      https://pypi.python.org/packages/source/M/MODULE/%{module}-%{version}.tar.gz
19 Source0:        https://files.pythonhosted.org/packages/source/z/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
20 # Source0-md5:  5ad123465fb7283983b15e11d1df7ebd
21 URL:            http://pypi.python.org/pypi/zodbpickle
22 BuildRequires:  rpm-pythonprov
23 # for the py_build, py_install macros
24 BuildRequires:  rpmbuild(macros) >= 1.714
25 %if %{with python2}
26 BuildRequires:  python-devel
27 #BuildRequires: python-setuptools
28 BuildRequires:  python-test
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3-devel
32 #BuildRequires: python3-setuptools
33 BuildRequires:  python3-test
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:        -
44 Summary(pl.UTF-8):      -
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 CHANGES.rst README.rst
99 %dir %{py_sitedir}/%{module}
100 %{py_sitedir}/%{module}/*.py[co]
101 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
102 %{py_sitedir}/%{module}-%{version}-py*.egg-info
103 %endif
104
105 %if %{with python3}
106 %files -n python3-%{module}
107 %defattr(644,root,root,755)
108 %doc CHANGES.rst README.rst
109 %dir %{py3_sitedir}/%{module}
110 %{py3_sitedir}/%{module}/*.py
111 %attr(755,root,root) %{py3_sitedir}/%{module}/*.so
112 %{py3_sitedir}/%{module}/__pycache__
113 %{py3_sitedir}/%{module}-%{version}-py*.egg-info
114 %endif
115
116 %if %{with doc}
117 %files apidocs
118 %defattr(644,root,root,755)
119 %doc docs/_build/html/*
120 %endif
This page took 0.075509 seconds and 2 git commands to generate.