From 1a7e5c0584568d8429143cb10da16dbd7d00c698 Mon Sep 17 00:00:00 2001 From: Wangjunqi123 Date: Fri, 28 Apr 2023 14:29:58 +0800 Subject: [PATCH] remove 0001-add-setup.py.patch --- 0001-add-setup.py.patch | 17 ----------------- add-metadata-name.patch | 9 +++++++++ python-tabulate.spec | 41 ++++++++++++++--------------------------- 3 files changed, 23 insertions(+), 44 deletions(-) delete mode 100644 0001-add-setup.py.patch create mode 100644 add-metadata-name.patch diff --git a/0001-add-setup.py.patch b/0001-add-setup.py.patch deleted file mode 100644 index 3597123..0000000 --- a/0001-add-setup.py.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- c/setup.py 1970-01-01 08:00:00.000000000 +0800 -+++ a/setup.py 2022-12-06 09:22:10.203917839 +0800 -@@ -0,0 +1,14 @@ -+#!/usr/bin/env python -+ -+try: -+ from setuptools import setup -+except ImportError: -+ from distutils.core import setup -+ -+ -+setup( -+ name="tabulate", -+ version="0.9.0", -+ py_modules=["tabulate"], -+ entry_points={"console_scripts": ["tabulate = tabulate:_main"]} -+) diff --git a/add-metadata-name.patch b/add-metadata-name.patch new file mode 100644 index 0000000..bac80f6 --- /dev/null +++ b/add-metadata-name.patch @@ -0,0 +1,9 @@ +--- c/setup.cfg 2023-04-28 15:14:24.355517196 +0800 ++++ a/setup.cfg 2023-04-28 16:08:57.449787130 +0800 +@@ -1,3 +1,6 @@ ++[metadata] ++name = tabulate ++ + [egg_info] + tag_build = + tag_date = 0 diff --git a/python-tabulate.spec b/python-tabulate.spec index 8485242..70064ec 100644 --- a/python-tabulate.spec +++ b/python-tabulate.spec @@ -1,12 +1,12 @@ %global _empty_manifest_terminate_build 0 Name: python-tabulate Version: 0.9.0 -Release: 1 +Release: 2 Summary: Pretty-print tabular data License: MIT URL: https://github.com/astanin/python-tabulate Source0: https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz -Patch0: 0001-add-setup.py.patch +Patch0: add-metadata-name.patch BuildArch: noarch %description @@ -25,8 +25,11 @@ The main use cases of the library are: Summary: Pretty-print tabular data Provides: python-tabulate = %{version}-%{release} # Base build requires +BuildRequires: python3-pip +BuildRequires: python3-wheel BuildRequires: python3-devel BuildRequires: python3-setuptools +BuildRequires: python3-setuptools_scm # General requires BuildRequires: python3-wcwidth BuildRequires: python3-pytest @@ -61,10 +64,10 @@ The main use cases of the library are: %autosetup -n tabulate-%{version} %build -%py3_build +%pyproject_build %install -%py3_install +%pyproject_install tabulate==%{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 @@ -73,37 +76,21 @@ 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 . %check PYTHONPATH=. pytest -%files -n python3-tabulate -f filelist.lst -%dir %{python3_sitelib}/* +%files -n python3-tabulate +%{python3_sitelib}/* +%{_bindir}/tabulate -%files help -f doclist.lst +%files help %{_docdir}/* %changelog +* Fri Apr 28 2023 wangjunqi - 0.9.0-2 +- remove 0001-add-setup.py.patch + * Mon Dec 05 2022 wangjunqi - 0.9.0-1 - Update package to version 0.9.0 -- Gitee