]> git.pld-linux.org Git - SPECS.git/blob - python-importlib_resources.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-importlib_resources.spec
1 # NOTE: for versions >= 5.0 (for python 3.6+) see python3-importlib_resources.spec
2 #
3 # Conditional build:
4 %bcond_without  doc     # Sphinx documentation
5 %bcond_without  tests   # unit tests
6 %bcond_without  python2 # CPython 2.x module
7 %bcond_with     python3 # CPython 3.x module (built from python3-importlib_resources.spec)
8
9 Summary:        Read resources from Python packages
10 Summary(pl.UTF-8):      Odczyt zasobów z pakietów Pythona
11 Name:           python-importlib_resources
12 # keep 3.x here for python2 support
13 Version:        3.3.1
14 Release:        2
15 License:        Apache v2.0
16 Group:          Libraries/Python
17 #Source0Download: https://pypi.org/simple/importlib-resources/
18 Source0:        https://files.pythonhosted.org/packages/source/i/importlib-resources/importlib_resources-%{version}.tar.gz
19 # Source0-md5:  8db307bae9ec6c3c84298d75230e8043
20 URL:            https://pypi.org/project/importlib-resources/
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.7
23 BuildRequires:  python-setuptools
24 BuildRequires:  python-setuptools_scm >= 3.4.1
25 BuildRequires:  python-toml
26 %if %{with tests}
27 BuildRequires:  python-contextlib2
28 BuildRequires:  python-pathlib2
29 BuildRequires:  python-singledispatch
30 BuildRequires:  python-typing
31 BuildRequires:  python-zipp >= 0.4
32 %endif
33 %endif
34 %if %{with python3}
35 BuildRequires:  python3-modules >= 1:3.6
36 BuildRequires:  python3-setuptools
37 BuildRequires:  python3-setuptools_scm >= 3.4.1
38 BuildRequires:  python3-toml
39 %if %{with tests}
40 %if "%{py3_ver}" < "3.8"
41 BuildRequires:  python3-zipp >= 0.4
42 %endif
43 %endif
44 %endif
45 BuildRequires:  rpm-pythonprov
46 BuildRequires:  rpmbuild(macros) >= 1.714
47 %if %{with doc}
48 BuildRequires:  python-jaraco.packaging
49 BuildRequires:  python-rst.linker
50 BuildRequires:  sphinx-pdg-2
51 %endif
52 Requires:       python-modules >= 1:2.7
53 BuildArch:      noarch
54 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55
56 %description
57 importlib_resources is a backport of Python 3.9's standard library
58 importlib.resources module for Python 2.7, and 3.6 through 3.8. Users
59 of Python 3.9 and beyond should use the standard library module.
60         
61 The key goal of this module is to replace parts of pkg_resources with
62 a solution in Python's stdlib that relies on well-defined APIs. This
63 makes reading resources included in packages easier, with more stable
64 and consistent semantics.
65
66 %description -l pl.UTF-8
67 importlib_resources to backport modułu importlib.resources z
68 biblioteki standardowej Pythona 3.9, przeznaczony dla Pythona 2.7 oraz
69 od 3.6 do 3.8. Użytkownicy Pythona 3.9 i nowszego powinni używać
70 modułu z biblioteki standardowej.
71
72 Głównym celem tego modułu jest zastąpienie części pkg_resources
73 rozwiązaniem obecnym w bibliotece standardowej Pythona, opartym na
74 dobrze zdefiniowanym API. Czyni to czytanie zasobów z pakietów
75 łatwiejszym, z bardziej stabilną i spójną semantyką.
76
77 %package -n python3-importlib_resources
78 Summary:        Read resources from Python packages
79 Summary(pl.UTF-8):      Odczyt zasobów z pakietów Pythona
80 Group:          Libraries/Python
81 Requires:       python3-modules >= 1:3.6
82
83 %description -n python3-importlib_resources
84 importlib_resources is a backport of Python 3.9's standard library
85 importlib.resources module for Python 2.7, and 3.6 through 3.8. Users
86 of Python 3.9 and beyond should use the standard library module.
87         
88 The key goal of this module is to replace parts of pkg_resources with
89 a solution in Python's stdlib that relies on well-defined APIs. This
90 makes reading resources included in packages easier, with more stable
91 and consistent semantics.
92
93 %description -n python3-importlib_resources -l pl.UTF-8
94 importlib_resources to backport modułu importlib.resources z
95 biblioteki standardowej Pythona 3.9, przeznaczony dla Pythona 2.7 oraz
96 od 3.6 do 3.8. Użytkownicy Pythona 3.9 i nowszego powinni używać
97 modułu z biblioteki standardowej.
98
99 Głównym celem tego modułu jest zastąpienie części pkg_resources
100 rozwiązaniem obecnym w bibliotece standardowej Pythona, opartym na
101 dobrze zdefiniowanym API. Czyni to czytanie zasobów z pakietów
102 łatwiejszym, z bardziej stabilną i spójną semantyką.
103
104 %package apidocs
105 Summary:        API documentation for Python importlib_resources module
106 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona importlib_resources
107 Group:          Documentation
108
109 %description apidocs
110 API documentation for Python importlib_resources module.
111
112 %description apidocs -l pl.UTF-8
113 Dokumentacja API modułu Pythona importlib_resources.
114
115 %prep
116 %setup -q -n importlib_resources-%{version}
117
118 %build
119 %if %{with python2}
120 %py_build
121
122 %if %{with tests}
123 %{__python} -m unittest discover
124 %endif
125 %endif
126
127 %if %{with python3}
128 %py3_build
129
130 %if %{with tests}
131 %{__python3} -m unittest discover
132 %endif
133 %endif
134
135 %if %{with doc}
136 sphinx-build-2 -b html docs docs/_build/html
137 %endif
138
139 %install
140 rm -rf $RPM_BUILD_ROOT
141
142 %if %{with python2}
143 %py_install
144
145 %py_postclean
146 %endif
147
148 %if %{with python3}
149 %py3_install
150 %endif
151
152 %clean
153 rm -rf $RPM_BUILD_ROOT
154
155 %if %{with python2}
156 %files
157 %defattr(644,root,root,755)
158 %doc LICENSE README.rst
159 %{py_sitescriptdir}/importlib_resources
160 %{py_sitescriptdir}/importlib_resources-%{version}-py*.egg-info
161 %endif
162
163 %if %{with python3}
164 %files -n python3-importlib_resources
165 %defattr(644,root,root,755)
166 %doc LICENSE README.rst
167 %{py3_sitescriptdir}/importlib_resources
168 %{py3_sitescriptdir}/importlib_resources-%{version}-py*.egg-info
169 %endif
170
171 %if %{with doc}
172 %files apidocs
173 %defattr(644,root,root,755)
174 %doc docs/_build/html/{_static,*.html,*.js}
175 %endif
This page took 0.223367 seconds and 3 git commands to generate.