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