diff --git a/0001-rollback-setuptools-scm-versioning.patch b/0001-rollback-setuptools-scm-versioning.patch new file mode 100644 index 0000000000000000000000000000000000000000..9e6601d9123b34d34e05cc94ee21810ebd4a1bb3 --- /dev/null +++ b/0001-rollback-setuptools-scm-versioning.patch @@ -0,0 +1,27 @@ +From b0fa876059f4e9768ed7b85e58a40ab7673b27c8 Mon Sep 17 00:00:00 2001 +From: wang--ge +Date: Tue, 7 Feb 2023 18:00:00 +0800 +Subject: [PATCH] rollback setuptools-scm versioning + +--- + aiomysql/__init__.py | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/aiomysql/__init__.py b/aiomysql/__init__.py +index a367fcd..a412281 100644 +--- a/aiomysql/__init__.py ++++ b/aiomysql/__init__.py +@@ -32,9 +32,8 @@ from pymysql.err import (Warning, Error, InterfaceError, DataError, + from .connection import Connection, connect + from .cursors import Cursor, SSCursor, DictCursor, SSDictCursor + from .pool import create_pool, Pool +-from ._version import version + +-__version__ = version ++__version__ = '0.1.0' + + __all__ = [ + +-- +2.27.0 + diff --git a/aiomysql-0.0.21.tar.gz b/aiomysql-0.0.21.tar.gz deleted file mode 100644 index b1438ad5808e403916d121fddcb8cf50c3162b37..0000000000000000000000000000000000000000 Binary files a/aiomysql-0.0.21.tar.gz and /dev/null differ diff --git a/python-aiomysql.spec b/python-aiomysql.spec index 136997af92e653e62638d05c6a8faf720a12a62f..62d6de4de79709973b9c73112e2fe15a5055fdd6 100644 --- a/python-aiomysql.spec +++ b/python-aiomysql.spec @@ -1,11 +1,13 @@ %global _empty_manifest_terminate_build 0 Name: python-aiomysql -Version: 0.0.21 +Version: 0.1.0 Release: 1 Summary: MySQL driver for asyncio. License: MIT URL: https://github.com/aio-libs/aiomysql -Source0: https://files.pythonhosted.org/packages/a9/7f/d5a409cc0bb8349d6475ee4ea42ac2a5664646fe8a85e81ce3d91f63c474/aiomysql-0.0.21.tar.gz +Source0: https://github.com/aio-libs/aiomysql/archive/refs/tags/v0.1.0.tar.gz +Source1: https://github.com/aio-libs/aiomysql/raw/c93fad378a5d9c823218b0b7fb271d65d6b2835b/setup.py +Patch0: 0001-rollback-setuptools-scm-versioning.patch BuildArch: noarch Requires: python3-PyMySQL @@ -38,7 +40,8 @@ parts of PyMySQL_ . *aiomysql* tries to be like awesome aiopg_ library and preserve same api, look and feel. %prep -%autosetup -n aiomysql-0.0.21 +%autosetup -n aiomysql-0.1.0 -p1 +cp %{SOURCE1} . %build %py3_build @@ -78,6 +81,9 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Tue Feb 07 2023 Ge Wang - 0.1.0-1 +- update package to 0.1.0 + * Thu Jul 22 2021 Xu Jin - 0.0.21-1 - Update package to 0.0.21 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000000000000000000000000000000000000..0cdacf2647ae2017ccdad7798d6effd0665b39f5 --- /dev/null +++ b/setup.py @@ -0,0 +1,70 @@ +import os +import re +import sys +from setuptools import setup, find_packages + + +install_requires = ['PyMySQL>=1.0.0,<=1.0.2'] + +PY_VER = sys.version_info + + +if not PY_VER >= (3, 7, 0): + raise RuntimeError("aiomysql doesn't support Python earlier than 3.7.0") + + +def read(f): + return open(os.path.join(os.path.dirname(__file__), f)).read().strip() + + +extras_require = {'sa': ['sqlalchemy>=1.0'], } + + +def read_version(): + regexp = re.compile(r"^__version__\W*=\W*'([\d.abrc]+)'") + init_py = os.path.join(os.path.dirname(__file__), + 'aiomysql', '__init__.py') + with open(init_py) as f: + for line in f: + match = regexp.match(line) + if match is not None: + return match.group(1) + else: + raise RuntimeError('Cannot find version in aiomysql/__init__.py') + + +classifiers = [ + 'License :: OSI Approved :: MIT License', + 'Intended Audience :: Developers', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Operating System :: POSIX', + 'Environment :: Web Environment', + 'Development Status :: 3 - Alpha', + 'Topic :: Database', + 'Topic :: Database :: Front-Ends', + 'Framework :: AsyncIO', +] + +keywords = ["mysql", "asyncio", "aiomysql"] + + +setup(name='aiomysql', + version=read_version(), + description=('MySQL driver for asyncio.'), + long_description='\n\n'.join((read('README.rst'), read('CHANGES.txt'))), + classifiers=classifiers, + platforms=['POSIX'], + author="Nikolay Novik", + author_email="nickolainovik@gmail.com", + url='https://github.com/aio-libs/aiomysql', + download_url='https://pypi.python.org/pypi/aiomysql', + license='MIT', + packages=find_packages(exclude=['tests', 'tests.*']), + install_requires=install_requires, + extras_require=extras_require, + keywords=keywords, + include_package_data=True) diff --git a/v0.1.0.tar.gz b/v0.1.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..9a43c2c1c14c01dc7924574deafe99ac106102a4 Binary files /dev/null and b/v0.1.0.tar.gz differ