Adapting to the pyproject.toml compilation mode

This commit is contained in:
caodongxia 2023-04-26 18:02:55 +08:00
parent 06d4313c71
commit 4aeadc5e80
2 changed files with 11 additions and 38 deletions

View File

@ -1,34 +0,0 @@
From 089e8308734b5274f489a0c0162f420a6ce23ddd Mon Sep 17 00:00:00 2001
From: jxy_git <jiangxinyu@kylinos.cn>
Date: Wed, 9 Nov 2022 19:02:47 +0800
Subject: [PATCH] add setup.py
---
setup.py | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100644 setup.py
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..06f8341
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+
+from distutils.core import setup
+
+packages = \
+['pep517', 'pep517.in_process']
+
+package_data = \
+{'': ['*']}
+
+setup(name='pep517',
+ version='0.13.0',
+ packages=packages,
+ package_data=package_data,
+ )
--
2.37.1

View File

@ -1,12 +1,11 @@
%global _empty_manifest_terminate_build 0 %global _empty_manifest_terminate_build 0
Name: python-pep517 Name: python-pep517
Version: 0.13.0 Version: 0.13.0
Release: 2 Release: 3
Summary: Wrappers to build Python packages using PEP 517 hooks Summary: Wrappers to build Python packages using PEP 517 hooks
License: MIT License: MIT
URL: https://github.com/pypa/pep517 URL: https://github.com/pypa/pep517
Source0: https://files.pythonhosted.org/packages/4d/19/e11fcc88288f68ae48e3aa9cf5a6fd092a88e629cb723465666c44d487a0/pep517-0.13.0.tar.gz Source0: https://files.pythonhosted.org/packages/4d/19/e11fcc88288f68ae48e3aa9cf5a6fd092a88e629cb723465666c44d487a0/pep517-0.13.0.tar.gz
Patch0: 0001-add-setup.py.patch
BuildArch: noarch BuildArch: noarch
%description %description
@ -17,6 +16,10 @@ Summary: Wrappers to build Python packages using PEP 517 hooks
Provides: python-pep517 Provides: python-pep517
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-setuptools BuildRequires: python3-setuptools
BuildRequires: python3-pip
BuildRequires: python3-wheel
BuildRequires: python3-pdm-pep517
BuildRequires: python3-flit-core
Requires: python3-toml Requires: python3-toml
Requires: python3-tomli Requires: python3-tomli
Requires: python3-importlib-metadata Requires: python3-importlib-metadata
@ -34,10 +37,10 @@ Wrappers to build Python packages using PEP 517 hooks
%autosetup -n pep517-%{version} -p1 %autosetup -n pep517-%{version} -p1
%build %build
%py3_build %pyproject_build
%install %install
%py3_install %pyproject_install pep517==%{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
@ -66,11 +69,15 @@ mv %{buildroot}/doclist.lst .
%files -n python3-pep517 -f filelist.lst %files -n python3-pep517 -f filelist.lst
%dir %{python3_sitelib}/* %dir %{python3_sitelib}/*
%{python3_sitelib}/pep517
%files help -f doclist.lst %files help -f doclist.lst
%{_docdir}/* %{_docdir}/*
%changelog %changelog
* Tue Apr 25 2023 caodongxia <caodongxia@h-partners.com> - 0.13.0-3
- Adapting to the pyproject.toml compilation mode
* Fri Mar 24 2023 xu_ping <xuping33@h-partners.com> - 0.13.0-2 * Fri Mar 24 2023 xu_ping <xuping33@h-partners.com> - 0.13.0-2
- Adaptation to setup.py - Adaptation to setup.py