From 40b02a787686dba34d908bc60d85c52d9667aa0c Mon Sep 17 00:00:00 2001 From: jinzhimin369 Date: Fri, 30 Oct 2020 14:10:48 +0800 Subject: [PATCH] remove python2 dependency --- python-mysqlclient.spec | 60 ++++------------------------------------- 1 file changed, 5 insertions(+), 55 deletions(-) diff --git a/python-mysqlclient.spec b/python-mysqlclient.spec index 3f4f9b2..cf8cb24 100644 --- a/python-mysqlclient.spec +++ b/python-mysqlclient.spec @@ -1,15 +1,13 @@ Name: python-mysqlclient Version: 1.3.12 -Release: 8 +Release: 9 Summary: MySQL database connector for Python License: GPLv2+ URL: https://github.com/PyMySQL/mysqlclient-python Source0: https://pypi.python.org/packages/6f/86/bad31f1c1bb0cc99e88ca2adb7cb5c71f7a6540c1bb001480513de76a931/mysqlclient-1.3.12.tar.gz BuildRequires: gcc mariadb-connector-c-devel openssl-devel zlib-devel -BuildRequires: python2-devel python2-setuptools -BuildRequires: python3-devel python3-setuptools -BuildRequires: python2-debug python3-debug +BuildRequires: python3-devel python3-setuptools python3-debug Provides: python-mysql = %{version}-%{release} Obsoletes: python-mysql < %{version}-%{release} @@ -18,34 +16,6 @@ Obsoletes: python-mysql < %{version}-%{release} MySQLdb is an interface to the popular MySQL database server that provides the Python database API. -%package -n python2-mysqlclient -Summary: MySQL database connector for Python2 -Provides: MySQL-python = %{version}-%{release} -Obsoletes: MySQL-python < %{version}-%{release} -Provides: python-mysql = %{version}-%{release} -Obsoletes: python-mysql < %{version}-%{release} -Provides: python-mysql%{_isa} = %{version}-%{release} -Provides: python2-mysql = %{version}-%{release} -Obsoletes: python2-mysql < %{version}-%{release} - - -%description -n python2-mysqlclient -MySQL database connector for Python2 - -%package -n python2-mysqlclient-debug -Summary: Python2 interface to MySQL, built for the CPython debug runtime -Requires: python2-mysqlclient%{_isa} = %{version}-%{release} -Provides: MySQL-python-debug = %{version}-%{release} -Obsoletes: MySQL-python-debug < %{version}-%{release} -Provides: python-mysql-debug = %{version}-%{release} -Obsoletes: python-mysql-debug < %{version}-%{release} -Provides: python-mysql-debug%{_isa} = %{version}-%{release} -Provides: python2-mysql-debug = %{version}-%{release} -Obsoletes: python2-mysql-debug < %{version}-%{release} - -%description -n python2-mysqlclient-debug -Python2 interface to MySQL, built for the CPython debug runtime - %package -n python3-mysqlclient Summary: MySQL database connector for Python3 Provides: MySQL-python3 = %{version}-%{release} @@ -74,38 +44,15 @@ Python3 interface to MySQL, built for the CPython debug runtime %autosetup -n mysqlclient-%{version} -p1 %build -%py2_build -CFLAGS="$RPM_OPT_FLAGS" %{__python2}-debug setup.py build - %py3_build CFLAGS="$RPM_OPT_FLAGS" %{__python3}-debug setup.py build %install -%py2_install -%{__python2}-debug setup.py install -O1 --root %{buildroot} --skip-build - %py3_install %{__python3}-debug setup.py install -O1 --root %{buildroot} --skip-build -%files -n python2-mysqlclient -%doc README.md doc/*.rst -%license LICENSE -%{python2_sitearch}/*.py -%{python2_sitearch}/*.py[co] -%{python2_sitearch}/_mysql.so -%dir %{python2_sitearch}/MySQLdb -%{python2_sitearch}/MySQLdb/*.py -%{python2_sitearch}/MySQLdb/*.py[co] -%dir %{python2_sitearch}/MySQLdb/constants -%{python2_sitearch}/MySQLdb/constants/* -%dir %{python2_sitearch}/mysqlclient-%{version}-py2.*.egg-info -%{python2_sitearch}/mysqlclient-%{version}-py2.*.egg-info/* - -%files -n python2-mysqlclient-debug -%{python2_sitearch}/_mysql_d.so - %files -n python3-mysqlclient %doc README.md doc/*.rst %license LICENSE @@ -128,6 +75,9 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python3}-debug setup.py build %{python3_sitearch}/_mysql.cpython-3?d*.so %changelog +* Fri Oct 30 2020 yanglongkang - 1.3.12-9 +- remove python2 dependency + * Thu Jun 18 2020 jinzhimin - 1.3.12-8 - Type:bugfix - Id:NA