diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 69b6dba..0000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# python-mysqlclient - -#### Description -MySQL database connector for Python - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md index b95af6c..60ec4ea 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,47 @@ -# python-mysqlclient +# mysqlclient -#### 介绍 -MySQL database connector for Python +[![Build Status](https://secure.travis-ci.org/PyMySQL/mysqlclient-python.png)](http://travis-ci.org/PyMySQL/mysqlclient-python) -#### 软件架构 -软件架构说明 +This is a fork of [MySQLdb1](https://github.com/farcepest/MySQLdb1). + +This project adds Python 3 support and bug fixes. +I hope this fork is merged back to MySQLdb1 like distribute was merged back to setuptools. + +## Install + +### Prerequisites + +You may need to install the Python and MySQL development headers and libraries like so: + +`sudo apt-get install python-dev libmysqlclient-dev` # Debian / Ubuntu + +`sudo yum install python-devel mysql-devel` # Red Hat / CentOS + +On Windows, there are binary wheel you can install without MySQLConnector/C or MSVC. + +#### Note on Python 3 : if you are using python3 then you need to install python3-dev using the following command : + +`sudo apt-get install python3-dev` # debian / Ubuntu + +`sudo yum install python3-devel ` # Red Hat / CentOS + +`brew install mysql-connector-c` # macOS (Homebrew) + +### Install from PyPI + +`pip install mysqlclient` + +NOTE: Wheels for Windows may be not released with source package. You should pin version +in your `requirements.txt` to avoid trying to install newest source package. -#### 安装教程 +### Install from source -1. xxxx -2. xxxx -3. xxxx +1. Download source by `git clone` or [zipfile](https://github.com/PyMySQL/mysqlclient-python/archive/master.zip). +2. Customize `site.cfg` +3. `python setup.py install` -#### 使用说明 +### Documentation -1. xxxx -2. xxxx -3. xxxx +Documentation is hosted on [Read The Docs](https://mysqlclient.readthedocs.io/) -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/mysqlclient-1.3.12.tar.gz b/mysqlclient-1.3.12.tar.gz new file mode 100644 index 0000000..ea11f37 Binary files /dev/null and b/mysqlclient-1.3.12.tar.gz differ diff --git a/python-mysqlclient.spec b/python-mysqlclient.spec new file mode 100644 index 0000000..dc0a02a --- /dev/null +++ b/python-mysqlclient.spec @@ -0,0 +1,132 @@ +Name: python-mysqlclient +Version: 1.3.12 +Release: 7 +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 + +Provides: python-mysql = %{version}-%{release} +Obsoletes: python-mysql < %{version}-%{release} + +%description +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} +Obsoletes: MySQL-python3 < %{version}-%{release} +Provides: python3-mysql = %{version}-%{release} +Obsoletes: python3-mysql < %{version}-%{release} +Provides: python3-mysql%{_isa} = %{version}-%{release} + +%description -n python3-mysqlclient +MySQL database connector for Python3 + +%package -n python3-mysqlclient-debug +Summary: Python3 interface to MySQL, built for the CPython debug runtime +Requires: python3-mysqlclient%{_isa} = %{version}-%{release} +Provides: MySQL-python3-debug = %{version}-%{release} +Obsoletes: MySQL-python3-debug < %{version}-%{release} +Provides: python3-mysql-debug = %{version}-%{release} +Obsoletes: python3-mysql-debug < %{version}-%{release} +Provides: python3-mysql-debug%{_isa} = %{version}-%{release} + +%description -n python3-mysqlclient-debug +Python3 interface to MySQL, built for the CPython debug runtime + + +%prep +%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 +%{python3_sitearch}/*.py +%{python3_sitearch}/_mysql.cpython-3?m*.so +%dir %{python3_sitearch}/__pycache__ +%{python3_sitearch}/__pycache__/* +%dir %{python3_sitearch}/MySQLdb +%{python3_sitearch}/MySQLdb/*.py +%dir %{python3_sitearch}/MySQLdb/__pycache__ +%{python3_sitearch}/MySQLdb/__pycache__/* +%dir %{python3_sitearch}/MySQLdb/constants +%{python3_sitearch}/MySQLdb/constants/*.py +%dir %{python3_sitearch}/MySQLdb/constants/__pycache__ +%{python3_sitearch}/MySQLdb/constants/__pycache__/* +%dir %{python3_sitearch}/mysqlclient-%{version}-py3.*.egg-info +%{python3_sitearch}/mysqlclient-%{version}-py3.*.egg-info/* + +%files -n python3-mysqlclient-debug +%{python3_sitearch}/_mysql.cpython-3?dm*.so + +%changelog +* Fri Feb 14 2020 hy-euler - 1.3.12-7 +- Package Initialization