]> git.pld-linux.org Git - packages/python-zope.deprecation.git/blame - python-zope.deprecation.spec
- updated to 4.4.0, added apidocs
[packages/python-zope.deprecation.git] / python-zope.deprecation.spec
CommitLineData
2a5340e9
JK
1#
2# Conditional build:
7073dc10
JB
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # unit tests
2a5340e9
JK
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8%define module zope.deprecation
9Summary: Deprecation library for Python code
10Summary(pl.UTF-8): Biblioteka odradzająca dla kodu w Pythonie
11Name: python-%{module}
7073dc10
JB
12Version: 4.4.0
13Release: 1
14License: ZPL v2.1
2a5340e9 15Group: Libraries/Python
7073dc10
JB
16Source0: https://files.pythonhosted.org/packages/source/z/zope.deprecation/zope.deprecation-%{version}.tar.gz
17# Source0-md5: 6915a92473e2658b3954f8490938455c
18URL: https://www.zope.dev/
2a5340e9 19%if %{with python2}
7073dc10 20BuildRequires: python >= 1:2.7
2a5340e9 21BuildRequires: python-setuptools
7073dc10
JB
22%if %{with tests}
23BuildRequires: python-zope.testrunner
24%endif
2a5340e9
JK
25%endif
26%if %{with python3}
7073dc10 27BuildRequires: python3 >= 1:3.4
2a5340e9 28BuildRequires: python3-setuptools
7073dc10
JB
29%if %{with tests}
30BuildRequires: python3-zope.testrunner
31%endif
2a5340e9 32%endif
7073dc10
JB
33BuildRequires: rpm-pythonprov
34BuildRequires: rpmbuild(macros) >= 1.714
35%if %{with doc}
36BuildRequires: sphinx-pdg
37%endif
38Requires: python-modules >= 1:2.7
2a5340e9 39Provides: Zope-Deprecation
7073dc10 40Obsoletes: Zope-Deprecation < 4.1.0
7f721943 41BuildArch: noarch
2a5340e9
JK
42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44%description
7073dc10
JB
45This package provides a simple function called deprecated(names,
46reason) to mark deprecated modules, classes, functions, methods and
47properties.
2a5340e9
JK
48
49%description -l pl.UTF-8
7073dc10
JB
50Ten pakiet udostępnia prostą funkcję o nazwie deprecated(names,
51reason), służącą do oznaczania przestarzałych modułów, klas, funkcji,
52metod i własności.
2a5340e9
JK
53
54%package -n python3-%{module}
55Summary: Deprecation library for Python code
56Summary(pl.UTF-8): Biblioteka odradzająca dla kodu w Pythonie
57Group: Libraries/Python
7073dc10 58Requires: python3-modules >= 1:3.4
2a5340e9
JK
59
60%description -n python3-%{module}
7073dc10
JB
61This package provides a simple function called deprecated(names,
62reason) to mark deprecated modules, classes, functions, methods and
63properties.
2a5340e9
JK
64
65%description -n python3-%{module} -l pl.UTF-8
7073dc10
JB
66Ten pakiet udostępnia prostą funkcję o nazwie deprecated(names,
67reason), służącą do oznaczania przestarzałych modułów, klas, funkcji,
68metod i własności.
69
70%package apidocs
71Summary: API documentation for Python zope.deprecation module
72Summary(pl.UTF-8): Dokumentacja API modułu Pythona zope.deprecation
73Group: Documentation
74
75%description apidocs
76API documentation for Python zope.deprecation module.
77
78%description apidocs -l pl.UTF-8
79Dokumentacja API modułu Pythona zope.deprecation.
2a5340e9
JK
80
81%prep
82%setup -q -n zope.deprecation-%{version}
83
84%build
85%if %{with python2}
86%py_build %{?with_tests:test}
87%endif
88
89%if %{with python3}
90%py3_build %{?with_tests:test}
91%endif
92
7073dc10
JB
93%if %{with doc}
94PYTHONPATH=$(pwd)/src \
95%{__make} -C docs html
96%endif
97
2a5340e9
JK
98%install
99rm -rf $RPM_BUILD_ROOT
100
101%if %{with python2}
7073dc10 102%py_install
2a5340e9
JK
103
104%py_postclean
105%endif
106
107%if %{with python3}
7073dc10 108%py3_install
2a5340e9
JK
109%endif
110
111%clean
112rm -rf $RPM_BUILD_ROOT
113
114%if %{with python2}
115%files
116%defattr(644,root,root,755)
7073dc10
JB
117%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
118%{py_sitescriptdir}/zope/deprecation
7f721943
JR
119%{py_sitescriptdir}/zope.deprecation-*.egg-info
120%{py_sitescriptdir}/zope.deprecation-*-nspkg.pth
2a5340e9
JK
121%endif
122
123%if %{with python3}
124%files -n python3-%{module}
125%defattr(644,root,root,755)
7073dc10 126%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
7f721943
JR
127%{py3_sitescriptdir}/zope/deprecation
128%{py3_sitescriptdir}/zope.deprecation-*.egg-info
129%{py3_sitescriptdir}/zope.deprecation-*-nspkg.pth
2a5340e9 130%endif
7073dc10
JB
131
132%if %{with doc}
133%files apidocs
134%defattr(644,root,root,755)
135%doc docs/_build/html/{_static,*.html,*.js}
136%endif
This page took 0.135759 seconds and 4 git commands to generate.