!19 Replace compilation method from setuptools to pyproject
From: @wang--ge Reviewed-by: @cherry530 Signed-off-by: @cherry530
This commit is contained in:
commit
18fb240365
@ -1,15 +1,14 @@
|
||||
%global _empty_manifest_terminate_build 0
|
||||
Name: python-PyMySQL
|
||||
Version: 1.0.3
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Pure Python MySQL Client
|
||||
License: MIT
|
||||
URL: https://pypi.python.org/pypi/PyMySQL/
|
||||
Source0: https://files.pythonhosted.org/packages/7a/6f/b3fadf41239b9ca7ea3857c440c499fd2e9e0f410bb942bd8d593dce4bd6/PyMySQL-1.0.3.tar.gz
|
||||
Source1: setup.py
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-cryptography python3-devel python3-setuptools
|
||||
BuildRequires: python3-cryptography python3-devel python3-pip python3-wheel
|
||||
|
||||
|
||||
%description
|
||||
@ -33,46 +32,28 @@ Most public APIs are compatible with mysqlclient and MySQLdb.
|
||||
|
||||
%prep
|
||||
%autosetup -n PyMySQL-%{version}
|
||||
cp %{SOURCE1} ./
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
%pyproject_build
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
%pyproject_install pymysql==%{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
|
||||
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-PyMySQL -f filelist.lst
|
||||
%dir %{python3_sitelib}/*
|
||||
%files -n python3-PyMySQL
|
||||
%{python3_sitelib}/*
|
||||
|
||||
%files help -f doclist.lst
|
||||
%files help
|
||||
%{_docdir}/*
|
||||
|
||||
%changelog
|
||||
* Sat May 6 2023 Ge Wang <wang__ge@126.com> - 1.0.3-2
|
||||
- Replace compilation method form setuptools to pyproject
|
||||
|
||||
* Thu Apr 6 2023 wubijie <wubijie@kylinos.cn> - 1.0.3-1
|
||||
- Update package to version 1.0.3
|
||||
|
||||
|
||||
38
setup.py
38
setup.py
@ -1,38 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
version = "1.0.3"
|
||||
|
||||
with open("./README.md", encoding="utf-8") as f:
|
||||
readme = f.read()
|
||||
|
||||
setup(
|
||||
name="PyMySQL",
|
||||
version=version,
|
||||
url="https://github.com/PyMySQL/PyMySQL/",
|
||||
project_urls={
|
||||
"Documentation": "https://pymysql.readthedocs.io/",
|
||||
},
|
||||
description="Pure Python MySQL Driver",
|
||||
long_description=readme,
|
||||
packages=find_packages(exclude=["tests*", "pymysql.tests*"]),
|
||||
python_requires=">=3.6",
|
||||
extras_require={
|
||||
"rsa": ["cryptography"],
|
||||
"ed25519": ["PyNaCl>=1.4.0"],
|
||||
},
|
||||
classifiers=[
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: Implementation :: CPython",
|
||||
"Programming Language :: Python :: Implementation :: PyPy",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Topic :: Database",
|
||||
],
|
||||
keywords="MySQL",
|
||||
)
|
||||
Loading…
x
Reference in New Issue
Block a user