]> git.pld-linux.org Git - packages/python3-importlib_resources.git/blob - python3-importlib_resources.spec
- release 3 (by relup.sh)
[packages/python3-importlib_resources.git] / python3-importlib_resources.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5
6 Summary:        Read resources from Python packages
7 Summary(pl.UTF-8):      Odczyt zasobów z pakietów Pythona
8 Name:           python3-importlib_resources
9 Version:        5.1.0
10 Release:        3
11 License:        Apache v2.0
12 Group:          Libraries/Python
13 #Source0Download: https://pypi.org/simple/importlib-resources/
14 Source0:        https://files.pythonhosted.org/packages/source/i/importlib-resources/importlib_resources-%{version}.tar.gz
15 # Source0-md5:  a3ca1dce486f7fba1691938124e54133
16 Patch0:         %{name}-no_wheel.patch
17 URL:            https://pypi.org/project/importlib-resources/
18 BuildRequires:  python3-modules >= 1:3.6
19 BuildRequires:  python3-setuptools >= 1:42
20 BuildRequires:  python3-setuptools_scm >= 5.0.1-2
21 BuildRequires:  python3-toml
22 %if %{with tests}
23 BuildRequires:  python3-pytest >= 3.5
24 BuildRequires:  python3-pytest-black >= 0.3.7
25 BuildRequires:  python3-pytest-cov
26 BuildRequires:  python3-pytest-flake8
27 %if "%{py3_ver}" < "3.8"
28 BuildRequires:  python3-zipp >= 0.4
29 %endif
30 %endif
31 BuildRequires:  rpm-pythonprov
32 BuildRequires:  rpmbuild(macros) >= 1.714
33 %if %{with doc}
34 BuildRequires:  python3-jaraco.packaging >= 8.2
35 BuildRequires:  python3-rst.linker >= 1.9
36 BuildRequires:  sphinx-pdg-3
37 %endif
38 Requires:       python3-modules >= 1:3.6
39 BuildArch:      noarch
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 importlib_resources is a backport of Python standard library
44 importlib.resources module for older Pythons. Users of Python 3.9 and
45 beyond should use the standard library module, since for these
46 versions, importlib_resources just delegates to that module.
47
48 The key goal of this module is to replace parts of pkg_resources with
49 a solution in Python's stdlib that relies on well-defined APIs. This
50 makes reading resources included in packages easier, with more stable
51 and consistent semantics.
52
53 %description -l pl.UTF-8
54 importlib_resources to backport modułu importlib.resources z
55 biblioteki standardowej Pythona przeznaczony dla starszych wersji
56 Pythona. Użytkownicy Pythona 3.9 i nowszego powinni używać modułu z
57 biblioteki standardowej.
58
59 Głównym celem tego modułu jest zastąpienie części pkg_resources
60 rozwiązaniem obecnym w bibliotece standardowej Pythona, opartym na
61 dobrze zdefiniowanym API. Czyni to czytanie zasobów z pakietów
62 łatwiejszym, z bardziej stabilną i spójną semantyką.
63
64 %package apidocs
65 Summary:        API documentation for Python importlib_resources module
66 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona importlib_resources
67 Group:          Documentation
68
69 %description apidocs
70 API documentation for Python importlib_resources module.
71
72 %description apidocs -l pl.UTF-8
73 Dokumentacja API modułu Pythona importlib_resources.
74
75 %prep
76 %setup -q -n importlib_resources-%{version}
77 %patch0 -p1
78
79 %build
80 %py3_build
81
82 %if %{with tests}
83 %{__python3} -m unittest discover
84 %endif
85
86 %if %{with doc}
87 sphinx-build-3 -b html docs docs/_build/html
88 %endif
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92
93 %py3_install
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98 %files
99 %defattr(644,root,root,755)
100 %doc CHANGES.rst LICENSE README.rst
101 %{py3_sitescriptdir}/importlib_resources
102 %{py3_sitescriptdir}/importlib_resources-%{version}-py*.egg-info
103
104 %if %{with doc}
105 %files apidocs
106 %defattr(644,root,root,755)
107 %doc docs/_build/html/{_static,*.html,*.js}
108 %endif
This page took 0.075487 seconds and 3 git commands to generate.