[packages/python3-importlib_resources] up to 5.1.0 (python3 only now)
atler
atler at pld-linux.org
Thu Jan 28 11:02:07 CET 2021
commit 67a852af4b35674000e4627140f295f875eb3f59
Author: Jan Palus <atler at pld-linux.org>
Date: Thu Jan 28 10:59:57 2021 +0100
up to 5.1.0 (python3 only now)
- disabled failing tests
python3-importlib_resources-no_wheel.patch | 19 +++---
python3-importlib_resources.spec | 104 +++++------------------------
2 files changed, 25 insertions(+), 98 deletions(-)
---
diff --git a/python3-importlib_resources.spec b/python3-importlib_resources.spec
index 8524384..46cc439 100644
--- a/python3-importlib_resources.spec
+++ b/python3-importlib_resources.spec
@@ -1,92 +1,48 @@
#
# Conditional build:
%bcond_without doc # Sphinx documentation
-%bcond_without tests # unit tests
-%bcond_without python2 # CPython 2.x module
-%bcond_with python3 # CPython 3.x module (for Python < 3.7)
+%bcond_with tests # unit tests
Summary: Read resources from Python packages
Summary(pl.UTF-8): Odczyt zasobów z pakietów Pythona
-Name: python-importlib_resources
-Version: 1.0.2
+Name: python3-importlib_resources
+Version: 5.1.0
Release: 1
License: Apache v2.0
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/importlib-resources/
Source0: https://files.pythonhosted.org/packages/source/i/importlib-resources/importlib_resources-%{version}.tar.gz
-# Source0-md5: e0a4f004b3508c17143bf969b5414d79
+# Source0-md5: a3ca1dce486f7fba1691938124e54133
Patch0: %{name}-no_wheel.patch
URL: https://pypi.org/project/importlib-resources/
-%if %{with python2}
-BuildRequires: python-modules >= 1:2.7
-BuildRequires: python-setuptools
-BuildRequires: python-wheel
-%if %{with tests}
-BuildRequires: python-pathlib2
-BuildRequires: python-typing
-%endif
-%endif
-%if %{with python3}
-BuildRequires: python3-modules >= 1:3.4
+BuildRequires: python3-modules >= 1:3.6
BuildRequires: python3-setuptools
-BuildRequires: python3-wheel
-%if %{with tests}
-%if "%{py3_ver}" < "3.5"
-BuildRequires: python3-typing
-%endif
-%endif
-%endif
+BuildRequires: python3-setuptools_scm >= 3.4.1
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%if %{with doc}
BuildRequires: sphinx-pdg-3
%endif
-Requires: python-modules >= 1:2.7
+Requires: python3-modules >= 1:3.6
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-importlib_resources is a backport of Python 3.7's standard library
-importlib.resources module for Python 2.7, and 3.4 through 3.6. Users
-of Python 3.7 and beyond should use the standard library module.
-
-The key goal of this module is to replace parts of pkg_resources with
-a solution in Python's stdlib that relies on well-defined APIs. This
-makes reading resources included in packages easier, with more stable
-and consistent semantics.
-
-%description -l pl.UTF-8
-importlib_resources to backport modułu importlib.resources z
-biblioteki standardowej Pythona 3.7, przeznaczony dla Pythona 2.7 oraz
-od 3.4 do 3.6. Użytkownicy Pythona 3.7 i nowszego powinni używać
-modułu z biblioteki standardowej.
-
-Głównym celem tego modułu jest zastąpienie części pkg_resources
-rozwiązaniem obecnym w bibliotece standardowej Pythona, opartym na
-dobrze zdefiniowanym API. Czyni to czytanie zasobów z pakietów
-łatwiejszym, z bardziej stabilną i spójną semantyką.
+importlib_resources is a backport of Python standard library
+importlib.resources module for older Pythons. Users of Python 3.9 and
+beyond should use the standard library module, since for these
+versions, importlib_resources just delegates to that module.
-%package -n python3-importlib_resources
-Summary: Read resources from Python packages
-Summary(pl.UTF-8): Odczyt zasobów z pakietów Pythona
-Group: Libraries/Python
-Requires: python3-modules >= 1:3.4
-
-%description -n python3-importlib_resources
-importlib_resources is a backport of Python 3.7's standard library
-importlib.resources module for Python 2.7, and 3.4 through 3.6. Users
-of Python 3.7 and beyond should use the standard library module.
-
The key goal of this module is to replace parts of pkg_resources with
a solution in Python's stdlib that relies on well-defined APIs. This
makes reading resources included in packages easier, with more stable
and consistent semantics.
-%description -n python3-importlib_resources -l pl.UTF-8
+%description -l pl.UTF-8
importlib_resources to backport modułu importlib.resources z
-biblioteki standardowej Pythona 3.7, przeznaczony dla Pythona 2.7 oraz
-od 3.4 do 3.6. Użytkownicy Pythona 3.7 i nowszego powinni używać
-modułu z biblioteki standardowej.
+biblioteki standardowej Pythona przeznaczony dla starszych wersji
+Pythona. Użytkownicy Pythona 3.9 i nowszego powinni używać modułu z
+biblioteki standardowej.
Głównym celem tego modułu jest zastąpienie części pkg_resources
rozwiązaniem obecnym w bibliotece standardowej Pythona, opartym na
@@ -109,57 +65,29 @@ Dokumentacja API modułu Pythona importlib_resources.
%patch0 -p1
%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-%{__python} -m unittest discover
-%endif
-%endif
-
-%if %{with python3}
%py3_build
%if %{with tests}
%{__python3} -m unittest discover
%endif
-%endif
%if %{with doc}
-sphinx-build-3 -b html importlib_resources/docs docs/_build/html
+sphinx-build-3 -b html docs docs/_build/html
%endif
%install
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
%py3_install
-%endif
%clean
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
%files
%defattr(644,root,root,755)
%doc LICENSE README.rst
-%{py_sitescriptdir}/importlib_resources
-%{py_sitescriptdir}/importlib_resources-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-importlib_resources
-%defattr(644,root,root,755)
-%doc LICENSE README.rst
%{py3_sitescriptdir}/importlib_resources
%{py3_sitescriptdir}/importlib_resources-%{version}-py*.egg-info
-%endif
%if %{with doc}
%files apidocs
diff --git a/python3-importlib_resources-no_wheel.patch b/python3-importlib_resources-no_wheel.patch
index e3d2333..caecf9c 100644
--- a/python3-importlib_resources-no_wheel.patch
+++ b/python3-importlib_resources-no_wheel.patch
@@ -1,10 +1,9 @@
---- importlib_resources-1.0.2/setup.cfg.orig 2018-11-01 19:39:59.000000000 +0100
-+++ importlib_resources-1.0.2/setup.cfg 2019-10-25 05:32:25.497482338 +0200
-@@ -19,7 +19,6 @@
- python_requires = >=2.7,!=3.0,!=3.1,!=3.2,!=3.3
- setup_requires =
- setuptools
-- wheel
- install_requires =
- pathlib2; python_version < '3'
- typing; python_version < '3.5'
+--- importlib_resources-5.1.0/pyproject.toml.orig 2021-01-19 04:22:15.000000000 +0100
++++ importlib_resources-5.1.0/pyproject.toml 2021-01-28 10:40:23.751707228 +0100
+@@ -1,5 +1,5 @@
+ [build-system]
+-requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4.1"]
++requires = ["setuptools>=42", "setuptools_scm[toml]>=3.4.1"]
+ build-backend = "setuptools.build_meta"
+
+ [tool.black]
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-importlib_resources.git/commitdiff/67a852af4b35674000e4627140f295f875eb3f59
More information about the pld-cvs-commit
mailing list