Adapting to the pyproject.toml compilation mode

This commit is contained in:
caodongxia 2023-05-05 11:27:58 +08:00
parent c13346172a
commit cf831c4c96
2 changed files with 10 additions and 25 deletions

View File

@ -1,19 +0,0 @@
--- cppy-1.2.1/setup.py 2022-03-31 03:40:07.000000000 +0800
+++ cppy-1.2.0/setup.py 2022-08-03 09:10:34.806143523 +0800
@@ -7,4 +7,15 @@
# ------------------------------------------------------------------------------
from setuptools import setup
-setup()
+setup(
+ name="cppy",
+ version="1.2.1",
+ author="The Nucleic Development Team",
+ author_email="sccolbert@gmail.com",
+ maintainer_email="m.dartiailh@gmail.com",
+ url="https://github.com/nucleic/cppy",
+ description="C++ headers for C extension development",
+ long_description=open("README.rst").read(),
+ packages=["cppy"],
+ package_data={"cppy": ["include/cppy/*.h"]},
+)

View File

@ -2,18 +2,20 @@
Name: python-%{srcname}
Version: 1.2.1
Release: 1
Release: 2
Summary: C++ headers for C extension development
License: BSD
URL: https://github.com/nucleic/cppy
Source0: https://files.pythonhosted.org/packages/c5/7e/6cc5acd93752ee52d2f0423046072a2ce3ae16dfcd44373b9fe2a0222204/%{srcname}-%{version}.tar.gz
Patch0: fix-cppy-version.patch
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
BuildRequires: python3dist(pytest)
BuildRequires: python3-pip
BuildRequires: python3-wheel
BuildRequires: python3-setuptools_scm
%description
A small C++ header library which makes it easier to write Python extension
@ -49,9 +51,8 @@ Documentation for cppy
# Remove bundled egg-info
rm -rf %{srcname}.egg-info
%build
%py3_build
%pyproject_build
# generate html docs
PYTHONPATH=${PWD} sphinx-build-3 docs/source html
@ -60,7 +61,7 @@ rm -rf html/.{doctrees,buildinfo}
%install
%py3_install
%pyproject_install %{srcname}==%{version}
%check
@ -72,7 +73,7 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} \
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{srcname}
%{python3_sitelib}/%{srcname}-%{version}-py*.egg-info
%{python3_sitelib}/%{srcname}-%{version}.dist-info/
%files -n python-%{srcname}-doc
%doc html
@ -80,6 +81,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} \
%changelog
* Fri May 5 2023 caodongxia <caodongxia@h-partners.com> - 1.2.1-2
- Adapting to the pyproject.toml compilation mode
* Tue Aug 02 2022 fushanqing <fushanqing@kylinos.cn> - 1.2.1-1
- update to 1.2.1