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