]> git.pld-linux.org Git - packages/python-jaraco.packaging.git/blob - python-jaraco.packaging.spec
c816e7214b5bbd0f4df4b05651550b188fe55743
[packages/python-jaraco.packaging.git] / python-jaraco.packaging.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define         egg_name        jaraco.packaging
9 %define         pypi_name       jaraco.packaging
10 Summary:        Tools to supplement packaging Python releases
11 Summary(pl.UTF-8):      Narzędzia wspierające pakietowanie wydań modułów Pythona
12 Name:           python-%{pypi_name}
13 Version:        6.2
14 Release:        2
15 License:        MIT
16 Group:          Libraries/Python
17 #Source0Download: https://pypi.org/simple/jaraco-packaging/
18 Source0:        https://files.pythonhosted.org/packages/source/j/jaraco.packaging/%{pypi_name}-%{version}.tar.gz
19 # Source0-md5:  ac36cfb217276af107bcbcb60bced1ec
20 URL:            https://pypi.org/project/jaraco.packaging/
21 BuildRequires:  rpm-pythonprov
22 BuildRequires:  rpmbuild(macros) >= 1.714
23 %if %{with python2}
24 BuildRequires:  python-modules >= 1:2.7
25 BuildRequires:  python-setuptools >= 31.0.1
26 BuildRequires:  python-setuptools_scm >= 1.15
27 %if %{with tests}
28 BuildRequires:  python-importlib_metadata
29 BuildRequires:  python-pytest >= 3.5
30 BuildRequires:  python-six >= 1.4
31 %endif
32 %endif
33 %if %{with python3}
34 BuildRequires:  python3-modules >= 1:3.2
35 BuildRequires:  python3-setuptools >= 31.0.1
36 BuildRequires:  python3-setuptools_scm >= 1.15
37 %if %{with tests}
38 %if "%{py3_ver}" < "3.8"
39 BuildRequires:  python3-importlib_metadata
40 %endif
41 BuildRequires:  python3-pytest >= 3.5
42 BuildRequires:  python3-six >= 1.4
43 %endif
44 %endif
45 %if %{with doc}
46 BuildRequires:  python3-rst.linker >= 1.9
47 BuildRequires:  sphinx-pdg-3
48 %endif
49 Requires:       python-jaraco
50 Requires:       python-modules >= 1:2.7
51 BuildArch:      noarch
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 %description
55 A few tools to supplement packaging Python releases.
56
57 %description -l pl.UTF-8
58 Kilka narzędzi wspierających pakietowanie wydań modułów Pythona.
59
60 %package -n python3-%{pypi_name}
61 Summary:        Tools to supplement packaging Python releases
62 Summary(pl.UTF-8):      Narzędzia wspierające pakietowanie wydań modułów Pythona
63 Group:          Libraries/Python
64 Requires:       python3-jaraco
65 Requires:       python3-modules >= 1:3.2
66
67 %description -n python3-%{pypi_name}
68 A few tools to supplement packaging Python releases.
69
70 %description -n python3-%{pypi_name} -l pl.UTF-8
71 Kilka narzędzi wspierających pakietowanie wydań modułów Pythona.
72
73 %package apidocs
74 Summary:        API documentation for Python jaraco.packaging module
75 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona jaraco.packaging
76 Group:          Documentation
77
78 %description apidocs
79 API documentation for Python jaraco.packaging module.
80
81 %description apidocs -l pl.UTF-8
82 Dokumentacja API modułu Pythona jaraco.packaging.
83
84 %prep
85 %setup -q -n %{pypi_name}-%{version}
86
87 %build
88 %if %{with python2}
89 %py_build %{?with_tests:test}
90 %endif
91
92 %if %{with python3}
93 %py3_build %{?with_tests:test}
94 %endif
95
96 %if %{with doc}
97 # no Makefile
98 cd docs
99 PYTHONPATH=$(pwd)/.. \
100 sphinx-build-3 -b html . _build/html
101 %endif
102
103 %install
104 rm -rf $RPM_BUILD_ROOT
105
106 %if %{with python2}
107 %py_install
108
109 %py_postclean
110
111 # packaged in python-jaraco.spec
112 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/jaraco/__init__.py*
113 %endif
114
115 %if %{with python3}
116 %py3_install
117
118 # packaged in python-jaraco.spec
119 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/jaraco/__init__.py
120 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/jaraco/__pycache__/__init__.*
121 %endif
122
123 %clean
124 rm -rf $RPM_BUILD_ROOT
125
126 %if %{with python2}
127 %files
128 %defattr(644,root,root,755)
129 %doc CHANGES.rst LICENSE README.rst
130 %{py_sitescriptdir}/jaraco/packaging
131 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
132 %endif
133
134 %if %{with python3}
135 %files -n python3-%{pypi_name}
136 %defattr(644,root,root,755)
137 %doc CHANGES.rst LICENSE README.rst
138 %attr(755,root,root) %{_bindir}/dependency-tree
139 %attr(755,root,root) %{_bindir}/upload-package
140 %{py3_sitescriptdir}/jaraco/packaging
141 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
142 %endif
143
144 %if %{with doc}
145 %files apidocs
146 %defattr(644,root,root,755)
147 %doc docs/_build/html/{_static,*.html,*.js}
148 %endif
This page took 0.060602 seconds and 2 git commands to generate.