]> git.pld-linux.org Git - packages/python-packaging.git/blob - python-packaging.spec
ed845a8bc0234d74e086667e81e94e61f05b1a89
[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:        16.8
12 Release:        3
13 License:        Apache v2.0 or BSD
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.python.org/simple/packaging
16 Source0:        https://files.pythonhosted.org/packages/source/p/packaging/packaging-%{version}.tar.gz
17 # Source0-md5:  53895cdca04ecff80b54128e475b5d3b
18 URL:            https://github.com/pypa/packaging
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.6
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-pretend
24 BuildRequires:  python-pyparsing
25 BuildRequires:  python-pytest
26 BuildRequires:  python-six
27 %endif
28 %endif
29 %if %{with python3}
30 BuildRequires:  python3-modules >= 1:3.2
31 BuildRequires:  python3-setuptools
32 %if %{with tests}
33 BuildRequires:  python3-pretend
34 BuildRequires:  python3-pyparsing
35 BuildRequires:  python3-pytest
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
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 %endif
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100
101 %if %{with python2}
102 %py_install
103
104 %py_postclean
105 %endif
106
107 %if %{with python3}
108 %py3_install
109 %endif
110
111 %clean
112 rm -rf $RPM_BUILD_ROOT
113
114 %if %{with python2}
115 %files
116 %defattr(644,root,root,755)
117 %doc CHANGELOG.rst LICENSE LICENSE.BSD README.rst
118 %{py_sitescriptdir}/packaging
119 %{py_sitescriptdir}/packaging-%{version}-py*.egg-info
120 %endif
121
122 %if %{with python3}
123 %files -n python3-packaging
124 %defattr(644,root,root,755)
125 %doc CHANGELOG.rst LICENSE LICENSE.BSD README.rst
126 %{py3_sitescriptdir}/packaging
127 %{py3_sitescriptdir}/packaging-%{version}-py*.egg-info
128 %endif
129
130 %if %{with doc}
131 %files apidocs
132 %defattr(644,root,root,755)
133 %doc docs/_build/html/{_static,development,*.html,*.js}
134 %endif
This page took 0.138791 seconds and 3 git commands to generate.