]> git.pld-linux.org Git - packages/python-ZConfig.git/blame - python-ZConfig.spec
rebuild with python 3.10
[packages/python-ZConfig.git] / python-ZConfig.spec
CommitLineData
cd408d92
MK
1# TODO:
2# - fix tests, needs: manuel and zope.testrunner
3#
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 ZConfig
15%define egg_name %{module}
16%define pypi_name %{module}
17Summary: Structured Configuration Library
18Summary(pl.UTF-8): Biblioteka ustrukturyzowanych plików konfiguracyjnych
19Name: python-%{pypi_name}
20Version: 3.2.0
a3b4d340 21Release: 6
cd408d92
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: 1f7206c3efaaed21e492153156107e89
26URL: https://github.com/zopefoundation/ZConfig/
27BuildRequires: rpm-pythonprov
28BuildRequires: rpmbuild(macros) >= 1.714
29%if %{with python2}
30BuildRequires: python-modules
31BuildRequires: python-setuptools
32%endif
33%if %{with python3}
34BuildRequires: python3-modules
35BuildRequires: python3-setuptools
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
40Requires: python-modules
41BuildArch: noarch
42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44%description
45
46%description -l pl.UTF-8
47
48%package -n python3-%{pypi_name}
49Summary: -
50Summary(pl.UTF-8): -
51Group: Libraries/Python
52Requires: python3-modules
53
54%description -n python3-%{pypi_name}
55
56%description -n python3-%{pypi_name} -l pl.UTF-8
57
58%package apidocs
59Summary: API documentation for Python %{module} module
60Summary(pl.UTF-8): Dokumentacja API modułu Pythona %{module}
61Group: Documentation
62
63%description apidocs
64API documentation for Pythona %{module} module.
65
66%description apidocs -l pl.UTF-8
67Dokumentacja API modułu Pythona %{module}.
68
69%prep
70%setup -q -n %{pypi_name}-%{version}
71
72%build
73%if %{with python2}
74%py_build %{?with_tests:test}
75%endif
76
77%if %{with python3}
78%py3_build %{?with_tests:test}
79%endif
80
81%if %{with doc}
82cd docs
83%{__make} -j1 html
84rm -rf _build/html/_sources
85%endif
86
87%install
88rm -rf $RPM_BUILD_ROOT
89
90%if %{with python2}
91%py_install
92
93# when files are installed in other way that standard 'setup.py
94# they need to be (re-)compiled
95# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
96%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
97%py_comp $RPM_BUILD_ROOT%{py_sitedir}
98
99%py_postclean
100%endif
101
102%if %{with python3}
103%py3_install
104%endif
105
106%clean
107rm -rf $RPM_BUILD_ROOT
108
109%if %{with python2}
110%files
111%defattr(644,root,root,755)
112%doc CHANGES.rst README.rst
113%{py_sitescriptdir}/%{module}
114%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
115%endif
116
117%if %{with python3}
118%files -n python3-%{pypi_name}
119%defattr(644,root,root,755)
120%doc CHANGES.rst README.rst
121%{py3_sitescriptdir}/%{module}
122%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
123%attr(755,root,root) %{_bindir}/zconfig
124%attr(755,root,root) %{_bindir}/zconfig_schema2html
125%endif
126
127%if %{with doc}
128%files apidocs
129%defattr(644,root,root,755)
130%doc docs/_build/html/*
131%endif
This page took 0.130365 seconds and 4 git commands to generate.