]> git.pld-linux.org Git - packages/python-packaging.git/blob - python-packaging.spec
do not always require setuptools
[packages/python-packaging.git] / python-packaging.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # don't build doc
4 %bcond_without  tests   # py.test tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 Summary:        Core utilities for Python packages
9 Summary(pl.UTF-8):      Bazowe funkcje narzędziowe do pakietów Pythona
10 Name:           python-packaging
11 Version:        17.1
12 Release:        1
13 License:        Apache v2.0 or BSD
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/packaging/
16 Source0:        https://files.pythonhosted.org/packages/source/p/packaging/packaging-%{version}.tar.gz
17 # Source0-md5:  8baf8241d1b6b0a5fae9b00f359976a8
18 URL:            https://github.com/pypa/packaging
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.6
21 %if %{with tests}
22 BuildRequires:  python-pretend
23 BuildRequires:  python-pyparsing
24 BuildRequires:  python-pytest
25 BuildRequires:  python-setuptools
26 BuildRequires:  python-six
27 %endif
28 %endif
29 %if %{with python3}
30 BuildRequires:  python3-modules >= 1:3.2
31 %if %{with tests}
32 BuildRequires:  python3-pretend
33 BuildRequires:  python3-pyparsing
34 BuildRequires:  python3-pytest
35 BuildRequires:  python3-setuptools
36 BuildRequires:  python3-six
37 %endif
38 %endif
39 BuildRequires:  rpm-pythonprov
40 BuildRequires:  rpmbuild(macros) >= 1.714
41 %if %{with doc}
42 BuildRequires:  python3-sphinx_rtd_theme
43 BuildRequires:  sphinx-pdg-3
44 %endif
45 Requires:       python-modules >= 1:2.6
46 BuildArch:      noarch
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49 %description
50 Core utilities for Python packages.
51
52 %description -l pl.UTF-8
53 Bazowe funkcje narzędziowe do pakietów Pythona.
54
55 %package -n python3-packaging
56 Summary:        Core utilities for Python packages
57 Summary(pl.UTF-8):      Bazowe funkcje narzędziowe do pakietów Pythona
58 Group:          Libraries/Python
59 Requires:       python3-modules >= 1:3.2
60
61 %description -n python3-packaging
62 Core utilities for Python packages.
63
64 %description -n python3-packaging -l pl.UTF-8
65 Bazowe funkcje narzędziowe do pakietów Pythona.
66
67 %package apidocs
68 Summary:        API documentation for Python packaging library
69 Summary(pl.UTF-8):      Dokumentacja API biblioteki Pythona packaging
70 Group:          Documentation
71
72 %description apidocs
73 API documentation for Python packaging library.
74
75 %description apidocs -l pl.UTF-8
76 Dokumentacja API biblioteki Pythona packaging.
77
78 %prep
79 %setup -q -n packaging-%{version}
80
81 %build
82 %if %{with python2}
83 %py_build
84
85 %{?with_tests:%{__python} -m pytest}
86 %endif
87
88 %if %{with python3}
89 %py3_build
90
91 %{?with_tests:%{__python3} -m pytest}
92 %endif
93
94 %if %{with doc}
95 %{__make} -C docs html \
96         SPHINXBUILD=sphinx-build-3
97 %endif
98
99 %install
100 rm -rf $RPM_BUILD_ROOT
101
102 %if %{with python2}
103 %py_install
104
105 %py_postclean
106 %endif
107
108 %if %{with python3}
109 %py3_install
110 %endif
111
112 %clean
113 rm -rf $RPM_BUILD_ROOT
114
115 %if %{with python2}
116 %files
117 %defattr(644,root,root,755)
118 %doc CHANGELOG.rst LICENSE LICENSE.BSD README.rst
119 %{py_sitescriptdir}/packaging
120 %{py_sitescriptdir}/packaging-%{version}-py*.egg-info
121 %endif
122
123 %if %{with python3}
124 %files -n python3-packaging
125 %defattr(644,root,root,755)
126 %doc CHANGELOG.rst LICENSE LICENSE.BSD README.rst
127 %{py3_sitescriptdir}/packaging
128 %{py3_sitescriptdir}/packaging-%{version}-py*.egg-info
129 %endif
130
131 %if %{with doc}
132 %files apidocs
133 %defattr(644,root,root,755)
134 %doc docs/_build/html/{_static,development,*.html,*.js}
135 %endif
This page took 0.390442 seconds and 4 git commands to generate.