diff --git a/0001-add-setup.py.patch b/0001-add-setup.py.patch new file mode 100644 index 0000000000000000000000000000000000000000..7ad928db5ae0d6e0dea977c21f0fef5125c63612 --- /dev/null +++ b/0001-add-setup.py.patch @@ -0,0 +1,25 @@ +From 442decd2a4c9b754e8c674044b85016d4fa99a7d Mon Sep 17 00:00:00 2001 +From: Gzx1999 +Date: Sat, 24 Sep 2022 19:45:06 +0800 +Subject: [PATCH] add setup.py + +--- + setup.py | 6 ++++++ + 1 file changed, 6 insertions(+) + create mode 100644 setup.py + +diff --git a/setup.py b/setup.py +new file mode 100644 +index 0000000..bac24a4 +--- /dev/null ++++ b/setup.py +@@ -0,0 +1,6 @@ ++#!/usr/bin/env python ++ ++import setuptools ++ ++if __name__ == "__main__": ++ setuptools.setup() +-- +2.25.1 + diff --git a/importlib_metadata-3.7.2.tar.gz b/importlib_metadata-3.7.2.tar.gz deleted file mode 100644 index 34e2a9bec1fc70c25d4ea938e2fd92417af9d00f..0000000000000000000000000000000000000000 Binary files a/importlib_metadata-3.7.2.tar.gz and /dev/null differ diff --git a/importlib_metadata-4.13.0.tar.gz b/importlib_metadata-4.13.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..a0ea112e62460c3e8e61a7e75a4cbc895746d641 Binary files /dev/null and b/importlib_metadata-4.13.0.tar.gz differ diff --git a/python-importlib-metadata.spec b/python-importlib-metadata.spec index 0e5d4717f4d0dcec25d9ca6ec33fb435fc4350aa..9eac75b5a08d7d6514204baa1aedaa9d4913d273 100644 --- a/python-importlib-metadata.spec +++ b/python-importlib-metadata.spec @@ -1,47 +1,109 @@ -Name: python-importlib-metadata -Version: 3.7.2 -Release: 2 +%global _empty_manifest_terminate_build 0 +Name: python-importlib-metadata +Version: 4.13.0 +Release: 1 Summary: Read metadata from Python packages -License: Apache v2.0 -URL: https://pypi.org/project/importlib-metadata/ -Source0: https://files.pythonhosted.org/packages/source/i/importlib-metadata/importlib_metadata-%{version}.tar.gz - +License: Apache-2.0 +URL: https://github.com/python/importlib_metadata +Source0: https://files.pythonhosted.org/packages/55/12/ab288357b884ebc807e3f4eff63ce5ba6b941ba61499071bf19f1bbc7f7f/importlib_metadata-4.13.0.tar.gz +Patch0: 0001-add-setup.py.patch BuildArch: noarch +Requires: python3-zipp >= 0.5 +Requires: python3-typing-extensions +Requires: python3-sphinx +Requires: python3-ipython +Requires: python3-pytest +Requires: python3-pytest-checkdocs +Requires: python3-pytest-flake8 +Requires: python3-pytest-cov +Requires: python3-pytest-enabler +Requires: python3-pytest-perf +Requires: python3-pytest-black +Requires: python3-pytest-mypy +Requires: python3-packaging +Requires: python3-pyfakefs +Requires: python3-importlib-resources + %description importlib_metadata is a library which provides an API for accessing an installed package’s metadata (see PEP 566), such as its entry points or its top-level name. -%package -n python3-importlib_metadata +%package -n python3-importlib-metadata Summary: Read metadata from Python packages -provides: python3-importlib-metadata -BuildRequires: python3-devel python3-setuptools python3-setuptools_scm python3-toml -BuildRequires: python3-packaging python3-pbr python3-pip python3-zipp >= 0.5 -Requires: python3-zipp >= 0.5 -%description -n python3-importlib_metadata +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-setuptools_scm +BuildRequires: python3-toml +BuildRequires: python3-packaging +BuildRequires: python3-pbr +BuildRequires: python3-pip +BuildRequires: python3-zipp >= 0.5 + +%description -n python3-importlib-metadata importlib_metadata is a library which provides an API for accessing an installed package’s metadata (see PEP 566), such as its entry points or its top-level name. -%package_help +%package help +Summary: Development documents and examples for importlib-metadata +%description help +importlib_metadata is a library which provides an API for accessing an installed package’s metadata (see PEP 566), such as its entry points or its top-level name. %prep -%setup -q -n importlib_metadata-%{version} +%autosetup -n importlib_metadata-%{version} -p1 %build -%_bindir/python3 setup.py build '--executable=%_bindir/python3 -s' +%py3_build %install -%_bindir/python3 setup.py install -O1 --skip-build --root %buildroot - +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . -%files -n python3-importlib_metadata -%defattr(-,root,root) -%license LICENSE -%_prefix/lib/python%{python3_version}/site-packages/importlib_metadata* +%files -n python3-importlib-metadata -f filelist.lst +%dir %{python3_sitelib}/* -%files help -%defattr(-,root,root) -%doc README.rst +%files help -f doclist.lst +%{_docdir}/* %changelog +* Sat Jun 15 2024 Wenlong Zhang - 4.13.0-1 +- Fix Attribute Error when used with python3.11 + https://github.com/python/cpython/issues/98706 + +* Mon Feb 27 2023 wangkai - 4.12.0-2 +- Modify the patching method + +* Sat Sep 24 2022 guozhengxin - 4.12.0-1 +- Upgrade package to version 4.12.0 + +* Mon Jul 25 2022 renliang16 - 4.8.3-1 +- Upgrade package python3-importlib-metadata to version 4.8.3 + +* Mon Dec 20 2021 shixuantong - 4.8.2-1 +- update version to 4.8.2 + * Mon Aug 2 2021 huangtianhua - 3.7.2-2 - Adds provide name python3-importlib-metadata and adds pbr/pip as buildrequires