!33 Compling package with pyproject
From: @Wangjunqi123 Reviewed-by: @yangzhao_kl Signed-off-by: @yangzhao_kl
This commit is contained in:
commit
a480935762
@ -1,12 +0,0 @@
|
|||||||
--- a/setup.py 1970-01-01 08:00:00.000000000 +0800
|
|
||||||
+++ b/setup.py 2022-10-19 09:38:57.746598491 +0800
|
|
||||||
@@ -0,0 +1,9 @@
|
|
||||||
+#!/usr/bin/env python
|
|
||||||
+
|
|
||||||
+from setuptools import setup
|
|
||||||
+
|
|
||||||
+if __name__ == "__main__":
|
|
||||||
+ setup(
|
|
||||||
+ name = "zipp",
|
|
||||||
+ version = "3.15.0",
|
|
||||||
+ )
|
|
||||||
@ -1,12 +1,11 @@
|
|||||||
%global _empty_manifest_terminate_build 0
|
%global _empty_manifest_terminate_build 0
|
||||||
Name: python-zipp
|
Name: python-zipp
|
||||||
Version: 3.15.0
|
Version: 3.15.0
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Backport of pathlib-compatible object wrapper for zip files
|
Summary: Backport of pathlib-compatible object wrapper for zip files
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/jaraco/zipp
|
URL: https://github.com/jaraco/zipp
|
||||||
Source0: https://files.pythonhosted.org/packages/00/27/f0ac6b846684cecce1ee93d32450c45ab607f65c2e0255f0092032d91f07/zipp-3.15.0.tar.gz
|
Source0: https://files.pythonhosted.org/packages/00/27/f0ac6b846684cecce1ee93d32450c45ab607f65c2e0255f0092032d91f07/zipp-3.15.0.tar.gz
|
||||||
Patch0: 0001-add-setup.py.patch
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -42,10 +41,10 @@ sed -i "/import jaraco.itertools/d" tests/test_zipp.py
|
|||||||
sed -i "/func_timeout/d" tests/test_zipp.py
|
sed -i "/func_timeout/d" tests/test_zipp.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%pyproject_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py3_install
|
%pyproject_install zipp==%{version}
|
||||||
install -d -m755 %{buildroot}/%{_pkgdocdir}
|
install -d -m755 %{buildroot}/%{_pkgdocdir}
|
||||||
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
|
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
|
||||||
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
|
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
|
||||||
@ -54,39 +53,22 @@ if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
|
|||||||
if [ -f README.rst ]; then cp -af README.rst %{buildroot}/%{_pkgdocdir}; fi
|
if [ -f README.rst ]; then cp -af README.rst %{buildroot}/%{_pkgdocdir}; fi
|
||||||
if [ -f README.md ]; then cp -af README.md %{buildroot}/%{_pkgdocdir}; fi
|
if [ -f README.md ]; then cp -af README.md %{buildroot}/%{_pkgdocdir}; fi
|
||||||
if [ -f README.txt ]; then cp -af README.txt %{buildroot}/%{_pkgdocdir}; fi
|
if [ -f README.txt ]; then cp -af README.txt %{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 .
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
pytest -k "not test_joinpath_constant_time"
|
pytest -k "not test_joinpath_constant_time"
|
||||||
|
|
||||||
%files -n python3-zipp -f filelist.lst
|
%files -n python3-zipp
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%dir %{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
|
||||||
%files help -f doclist.lst
|
%files help
|
||||||
%{_docdir}/*
|
%{_docdir}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 26 2023 wangjunqi <wangjunqi@kylinos.cn> - 3.15.0-2
|
||||||
|
- apply pyproject.toml
|
||||||
|
|
||||||
* Fri Mar 17 2023 wangjunqi <wangjunqi@kylinos.cn> - 3.15.0-1
|
* Fri Mar 17 2023 wangjunqi <wangjunqi@kylinos.cn> - 3.15.0-1
|
||||||
- Update package to version 3.15.0
|
- Update package to version 3.15.0
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user