!18 Adapting to the pyproject.toml compilation mode
From: @cherry530 Reviewed-by: @caodongxia Signed-off-by: @caodongxia
This commit is contained in:
commit
25ef544e71
@ -1,13 +0,0 @@
|
||||
--- c/setup.py 1970-01-01 08:00:00.000000000 +0800
|
||||
+++ a/setup.py 2022-11-22 10:14:02.675655535 +0800
|
||||
@@ -0,0 +1,10 @@
|
||||
+#!/usr/bin/env python
|
||||
+
|
||||
+import setuptools
|
||||
+
|
||||
+if __name__ == "__main__":
|
||||
+ setuptools.setup(
|
||||
+ name="path",
|
||||
+ version="16.5.0"
|
||||
+ )
|
||||
+
|
||||
@ -1,14 +1,14 @@
|
||||
%global _empty_manifest_terminate_build 0
|
||||
Name: python-path
|
||||
Version: 16.6.0
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Python module wrapper for path
|
||||
License: MIT
|
||||
URL: https://github.com/jaraco/path
|
||||
Source0: https://files.pythonhosted.org/packages/0a/52/94faab34ea4ddff296d99d32d16a7c342f70b1cd0f1d1d65b49e2a04b7a6/path-16.6.0.tar.gz
|
||||
Patch0: 0001-add-setup-file.patch
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-pip python3-hatchling python3-hatch-vcs python3-wheel
|
||||
|
||||
%description
|
||||
This package implements path objects as first-class entities,
|
||||
@ -36,46 +36,29 @@ allowing common operations on files to be invoked on those path objects directly
|
||||
%autosetup -p1 -n path-%{version}
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
%pyproject_build
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
%pyproject_install path==%{version}
|
||||
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 .
|
||||
|
||||
%check
|
||||
/usr/bin/pytest
|
||||
|
||||
%files -n python3-path -f filelist.lst
|
||||
%dir %{python3_sitelib}/*
|
||||
%files -n python3-path
|
||||
%{python3_sitelib}/path*
|
||||
|
||||
%files help -f doclist.lst
|
||||
%files help
|
||||
%{_docdir}/*
|
||||
|
||||
%changelog
|
||||
* Wed Apr 26 2023 xu_ping <707078654@qq.com> - 16.6.0-2
|
||||
- Adapting to the pyproject.toml compilation mode
|
||||
|
||||
* Fri Dec 16 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 16.6.0-1
|
||||
- Update package to version 16.6.0
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user