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