diff --git a/0001-add-setup.patch b/0001-add-setup.patch deleted file mode 100644 index f39f6e25c0066334076c9de3e8362247a928ca72..0000000000000000000000000000000000000000 --- a/0001-add-setup.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- c/setup.py 1970-01-01 08:00:00.000000000 +0800 -+++ a/setup.py 2023-02-28 17:01:05.764210848 +0800 -@@ -0,0 +1,12 @@ -+from setuptools import setup -+ -+ -+setup( -+ name = "pipdeptree", -+ version = "2.5.0", -+ entry_points = {'console_scripts': -+ [ -+ 'pipdeptree = pipdeptree:main', -+ ] -+ }, -+ ) diff --git a/python-pipdeptree.spec b/python-pipdeptree.spec index 3ecea311bd11d664382f9b33e5b7309fce3c7ac5..9bfa75e76bd274e8572cde94685f332281773136 100644 --- a/python-pipdeptree.spec +++ b/python-pipdeptree.spec @@ -1,12 +1,11 @@ %global _empty_manifest_terminate_build 0 Name: python-pipdeptree Version: 2.7.0 -Release: 1 +Release: 2 Summary: Command line utility to show dependency tree of packages License: MIT URL: https://github.com/tox-dev/pipdeptree Source0: https://files.pythonhosted.org/packages/86/62/309b36c833a99518d35998df58271a15756f847ed66e2e46896d7df49f53/pipdeptree-2.7.0.tar.gz -Patch0: 0001-add-setup.patch BuildArch: noarch %description @@ -18,7 +17,8 @@ on a machine as well as in a virtualenv. Summary: Command line utility to show dependency tree of packages Provides: python-pipdeptree = %{version}-%{release} BuildRequires: python3-devel -BuildRequires: python3-setuptools +BuildRequires: python3-pip python3-wheel python3-flit +BuildRequires: python3-hatchling python3-hatch-vcs %description -n python3-pipdeptree pipdeptree is a command line utility for displaying the installed python packages in form of a dependency tree. It works for packages installed globally @@ -36,46 +36,26 @@ on a machine as well as in a virtualenv. %autosetup -n pipdeptree-%{version} %build -%py3_build +%pyproject_build %install -%py3_install +%pyproject_install pipdeptree==%{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 -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-pipdeptree -f filelist.lst -%dir %{python3_sitelib}/* +%files -n python3-pipdeptree +%{python3_sitelib}/* +%{_bindir}/pipdeptree -%files help -f doclist.lst +%files help %{_docdir}/* %changelog +* Fri Apr 28 2023 jiangxinyu - 2.7.0-2 +- Use pyproject to compile package + * Tue Apr 4 2023 wubijie - 2.7.0-1 - Update package to version 2.7.0