Use pyproject to compile package

This commit is contained in:
jxy_git 2023-04-28 10:16:18 +08:00
parent ed823467c2
commit b8f29a7ba1
2 changed files with 11 additions and 44 deletions

View File

@ -1,12 +0,0 @@
--- c/setup.py 1970-01-01 08:00:00.000000000 +0800
+++ a/setup.py 2022-11-23 17:31:28.835786258 +0800
@@ -0,0 +1,9 @@
+#!/usr/bin/env python
+
+from setuptools import setup
+
+if __name__ == "__main__":
+ setup(
+ name = "prettytable",
+ version = "3.6.0"
+ )

View File

@ -1,12 +1,11 @@
%global _empty_manifest_terminate_build 0 %global _empty_manifest_terminate_build 0
Name: python-prettytable Name: python-prettytable
Version: 3.6.0 Version: 3.6.0
Release: 1 Release: 2
Summary: Display tabular data in a visually appealing ASCII table format. Summary: Display tabular data in a visually appealing ASCII table format.
License: BSD-3-Clause License: BSD-3-Clause
URL: https://github.com/jazzband/prettytable URL: https://github.com/jazzband/prettytable
Source0: https://files.pythonhosted.org/packages/ba/b6/8e78337766d4c324ac22cb887ecc19487531f508dbf17d922b91492d55bb/prettytable-3.6.0.tar.gz Source0: https://files.pythonhosted.org/packages/ba/b6/8e78337766d4c324ac22cb887ecc19487531f508dbf17d922b91492d55bb/prettytable-3.6.0.tar.gz
Patch0: 0001-add-setup.py.patch
BuildArch: noarch BuildArch: noarch
%description %description
@ -21,7 +20,8 @@ a row range.
Summary: Display tabular data in a visually appealing ASCII table format. Summary: Display tabular data in a visually appealing ASCII table format.
Provides: python-prettytable = %{version}-%{release} Provides: python-prettytable = %{version}-%{release}
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-setuptools BuildRequires: python3-pip python3-wheel python3-flit
BuildRequires: python3-hatchling python3-hatch-vcs
BuildRequires: python3-setuptools_scm BuildRequires: python3-setuptools_scm
Requires: python3-importlib-metadata Requires: python3-importlib-metadata
Requires: python3-wcwidth Requires: python3-wcwidth
@ -48,46 +48,25 @@ a row range.
%autosetup -n prettytable-%{version} %autosetup -n prettytable-%{version}
%build %build
%py3_build %pyproject_build
%install %install
%py3_install %pyproject_install prettytable==%{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
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
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.md ]; then cp -af README.md %{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 .
%files -n python3-prettytable -f filelist.lst %files -n python3-prettytable
%dir %{python3_sitelib}/* %{python3_sitelib}/*
%files help -f doclist.lst %files help
%{_docdir}/* %{_docdir}/*
%changelog %changelog
* Fri Apr 28 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 3.6.0-2
- Use pyproject to compile package
* Tue Jan 31 2023 wangjunqi <wangjunqi@kylinos.cn> - 3.6.0-1 * Tue Jan 31 2023 wangjunqi <wangjunqi@kylinos.cn> - 3.6.0-1
- Update package to version 3.6.0 - Update package to version 3.6.0