!15 Adapting to the pyproject.toml compilation mode

From: @caodongxia 
Reviewed-by: @cherry530 
Signed-off-by: @cherry530
This commit is contained in:
openeuler-ci-bot 2023-05-05 06:38:12 +00:00 committed by Gitee
commit 84f11e0305
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 7 additions and 48 deletions

View File

@ -1,42 +0,0 @@
--- kiwisolver-1.4.4/setup.py 2022-07-16 04:13:35.000000000 +0800
+++ kiwisolver-1.4.1/setup.py 2022-03-27 23:36:05.000000000 +0800
@@ -44,6 +44,39 @@
setup(
+ # FIXME remove once setuptool supports PEP 621
+ name="kiwisolver",
+ author="The Nucleic Development Team",
+ author_email="sccolbert@gmail.com",
+ url="https://github.com/nucleic/kiwi",
+ description="A fast implementation of the Cassowary constraint solver",
+ long_description=open("README.rst").read(),
+ license="BSD",
+ classifiers=[
+ # https://pypi.org/pypi?%3Aaction=list_classifiers
+ "License :: OSI Approved :: BSD License",
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.7",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: Implementation :: CPython",
+ "Programming Language :: Python :: Implementation :: PyPy",
+ ],
+ python_requires=">=3.7",
+ # FIXME end of remove once setuptool supports PEP 621
+ setup_requires=[
+ "setuptools>=42",
+ "wheel",
+ "setuptools_scm[toml]>=3.4.3",
+ "cppy>=1.2.0",
+ ],
+ package_dir={"": "py"},
+ packages=["kiwisolver"],
+ install_requires=["typing_extensions;python_version<'3.8'"],
ext_modules=ext_modules,
cmdclass={"build_ext": CppyBuildExt},
+ include_package_data=False,
+ package_data={"kiwisolver": ["py.typed", "*.pyi"]},
)

View File

@ -1,11 +1,10 @@
Name: python-kiwisolver Name: python-kiwisolver
Version: 1.4.4 Version: 1.4.4
Release: 2 Release: 3
Summary: A fast implementation of the Cassowary constraint solver Summary: A fast implementation of the Cassowary constraint solver
License: BSD-3-Clause License: BSD-3-Clause
URL: https://github.com/nucleic/kiwi URL: https://github.com/nucleic/kiwi
Source0: https://github.com/nucleic/kiwi/archive/%{version}/kiwisolver-%{version}.tar.gz Source0: https://github.com/nucleic/kiwi/archive/%{version}/kiwisolver-%{version}.tar.gz
Patch0: fix-kiwisolver-version.patch
BuildRequires: gcc-c++ python3-cppy python3-pip python3-setuptools_scm python3-wheel python3-toml BuildRequires: gcc-c++ python3-cppy python3-pip python3-setuptools_scm python3-wheel python3-toml
%description %description
@ -27,20 +26,22 @@ Kiwisolver for Python 3 Package.
rm -rf kiwisolver.egg-info rm -rf kiwisolver.egg-info
%build %build
%py3_build %pyproject_build
%install %install
%py3_install %pyproject_install kiwisolver==%{version}
%check %check
PYTHONPATH="%{buildroot}%{python3_sitearch}" py.test-3 py/tests/ PYTHONPATH="%{buildroot}%{python3_sitearch}" py.test-3 py/tests/
%files -n python3-kiwisolver %files -n python3-kiwisolver
%doc README.rst LICENSE %doc README.rst LICENSE
%{python3_sitearch}/kiwisolver/* %{python3_sitearch}/kiwisolver*
%{python3_sitearch}/kiwisolver-%{version}-*.egg-info
%changelog %changelog
* Thu May 4 2023 caodongxia <caodongxia@h-partners.com> - 1.4.4-3
- Adapting to the pyproject.toml compilation mode
* Wed Jan 18 2023 caodongxia <caodongxia@h-partners.com> - 1.4.4-2 * Wed Jan 18 2023 caodongxia <caodongxia@h-partners.com> - 1.4.4-2
- Add buildRequires python3-toml - Add buildRequires python3-toml