]> git.pld-linux.org Git - packages/python-importlib_metadata.git/blob - python-importlib_metadata.spec
- updated to 1.3.0
[packages/python-importlib_metadata.git] / python-importlib_metadata.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 (for Python < 3.8)
7
8 Summary:        Read metadata from Python packages
9 Summary(pl.UTF-8):      Odczyt metadanych z pakietów Pythona
10 Name:           python-importlib_metadata
11 Version:        1.3.0
12 Release:        1
13 License:        Apache v2.0
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/importlib-metadata/
16 Source0:        https://files.pythonhosted.org/packages/source/i/importlib-metadata/importlib_metadata-%{version}.tar.gz
17 # Source0-md5:  a70c415c516d5f7802163ab8511011b1
18 Patch0:         %{name}-tests.patch
19 URL:            https://pypi.org/project/importlib-metadata/
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 BuildRequires:  python-setuptools
23 BuildRequires:  python-setuptools_scm
24 %if %{with tests}
25 BuildRequires:  python-configparser >= 3.5
26 BuildRequires:  python-contextlib2
27 BuildRequires:  python-importlib_resources
28 BuildRequires:  python-packaging
29 BuildRequires:  python-pathlib2
30 BuildRequires:  python-zipp >= 0.5
31 %endif
32 %endif
33 %if %{with python3}
34 BuildRequires:  python3-modules >= 1:3.4
35 BuildRequires:  python3-setuptools
36 BuildRequires:  python3-setuptools_scm
37 %if %{with tests}
38 %if "%{py3_ver}" < "3.7"
39 BuildRequires:  python3-importlib_resources
40 %endif
41 BuildRequires:  python3-packaging
42 %if "%{py3_ver}" < "3.5"
43 BuildRequires:  python3-pathlib2
44 %endif
45 BuildRequires:  python3-zipp >= 0.5
46 %endif
47 %endif
48 BuildRequires:  rpm-pythonprov
49 BuildRequires:  rpmbuild(macros) >= 1.714
50 %if %{with doc}
51 BuildRequires:  python3-rst.linker
52 BuildRequires:  sphinx-pdg-3
53 %endif
54 Requires:       python-modules >= 1:2.7
55 BuildArch:      noarch
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 %description
59 importlib_metadata is a library to access the metadata for a Python
60 package. It is intended to be ported to Python 3.8.
61
62 %description -l pl.UTF-8
63 importlib_metadata to biblioteka służąca do dostępu do metadanych
64 pakietów Pythona. Ma być przeniesiona do Pythona 3.8.
65
66 %package -n python3-importlib_metadata
67 Summary:        Read metadata from Python packages
68 Summary(pl.UTF-8):      Odczyt metadanych z pakietów Pythona
69 Group:          Libraries/Python
70 Requires:       python3-modules >= 1:3.4
71
72 %description -n python3-importlib_metadata
73 importlib_metadata is a library to access the metadata for a Python
74 package. It is intended to be ported to Python 3.8.
75
76 %description -n python3-importlib_metadata -l pl.UTF-8
77 importlib_metadata to biblioteka służąca do dostępu do metadanych
78 pakietów Pythona. Ma być przeniesiona do Pythona 3.8.
79
80 %package apidocs
81 Summary:        API documentation for Python importlib_metadata module
82 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona importlib_metadata
83 Group:          Documentation
84
85 %description apidocs
86 API documentation for Python importlib_metadata module.
87
88 %description apidocs -l pl.UTF-8
89 Dokumentacja API modułu Pythona importlib_metadata.
90
91 %prep
92 %setup -q -n importlib_metadata-%{version}
93 %patch0 -p1
94
95 %build
96 %if %{with python2}
97 %py_build %{?with_tests:test}
98 %endif
99
100 %if %{with python3}
101 %py3_build %{?with_tests:test}
102 %endif
103
104 %if %{with doc}
105 sphinx-build-3 -b html importlib_metadata/docs docs/_build/html
106 %endif
107
108 %install
109 rm -rf $RPM_BUILD_ROOT
110
111 %if %{with python2}
112 %py_install
113
114 %py_postclean
115 %endif
116
117 %if %{with python3}
118 %py3_install
119 %endif
120
121 %clean
122 rm -rf $RPM_BUILD_ROOT
123
124 %if %{with python2}
125 %files
126 %defattr(644,root,root,755)
127 %doc LICENSE README.rst
128 %{py_sitescriptdir}/importlib_metadata
129 %{py_sitescriptdir}/importlib_metadata-%{version}-py*.egg-info
130 %endif
131
132 %if %{with python3}
133 %files -n python3-importlib_metadata
134 %defattr(644,root,root,755)
135 %doc LICENSE README.rst
136 %{py3_sitescriptdir}/importlib_metadata
137 %{py3_sitescriptdir}/importlib_metadata-%{version}-py*.egg-info
138 %endif
139
140 %if %{with doc}
141 %files apidocs
142 %defattr(644,root,root,755)
143 %doc docs/_build/html/{_static,*.html,*.js}
144 %endif
This page took 0.081619 seconds and 3 git commands to generate.