Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Nothing4You committed Feb 18, 2022
1 parent bf8b11e commit 768d1e6
Show file tree
Hide file tree
Showing 8 changed files with 792 additions and 224 deletions.
754 changes: 754 additions & 0 deletions .github/workflows/ci-cd.yml

Large diffs are not rendered by default.

147 changes: 0 additions & 147 deletions .github/workflows/ci.yml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/lint.yml

This file was deleted.

10 changes: 9 additions & 1 deletion aiomysql/__init__.py
Expand Up @@ -23,6 +23,11 @@
"""

try:
import pkg_resources
except ImportError:
pass

from pymysql.converters import escape_dict, escape_sequence, escape_string
from pymysql.err import (Warning, Error, InterfaceError, DataError,
DatabaseError, OperationalError, IntegrityError,
Expand All @@ -33,7 +38,10 @@
from .cursors import Cursor, SSCursor, DictCursor, SSDictCursor
from .pool import create_pool, Pool

__version__ = '0.0.22'
try:
__version__ = pkg_resources.get_distribution('aiomysql').version
except Exception:
__version__ = 'unknown'

__all__ = [

Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
@@ -0,0 +1,9 @@
[build-system]
requires = [
"setuptools>=42",
"setuptools_scm[toml]>=6.4",
"wheel",
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
7 changes: 3 additions & 4 deletions requirements-dev.txt
Expand Up @@ -4,9 +4,8 @@ ipdb==0.13.9
pytest==7.0.1
pytest-cov==3.0.0
pytest-sugar==0.9.4
PyMySQL>=1.0.0,<=1.0.2
sphinx>=1.8.1, <4.4.1
PyMySQL==1.0.2
Sphinx>=4.0
sphinxcontrib-asyncio==0.3.0
sqlalchemy>1.2.12,<=1.3.24
sqlalchemy==1.3.24
uvloop==0.16.0; python_version < '3.11'
pyroma==3.2
14 changes: 13 additions & 1 deletion setup.cfg
Expand Up @@ -2,6 +2,11 @@
name = aiomysql
url = https://github.com/aio-libs/aiomysql
download_url = https://pypi.python.org/pypi/aiomysql
project_urls =
CI: GitHub = https://github.com/aio-libs/aiomysql/actions
Docs: RTD = https://aiomysql.readthedocs.io/
GitHub: issues = https://github.com/aio-libs/aiomysql/issues
GitHub: repo = https://github.com/aio-libs/aiomysql
description = MySQL driver for asyncio.
author = Nikolay Novik
author_email = nickolainovik@gmail.com
Expand Down Expand Up @@ -29,10 +34,12 @@ platforms =
POSIX

[options]
use_scm_version = True
python_requires = >=3.7
include_package_data = True

# runtime requirements
packages = find:

install_requires =
PyMySQL>=1.0

Expand All @@ -41,3 +48,8 @@ sa =
sqlalchemy>=1.0,<1.4
rsa =
PyMySQL[rsa]>=1.0

[options.packages.find]
exclude =
tests
tests.*
22 changes: 4 additions & 18 deletions setup.py
@@ -1,25 +1,11 @@
import os
import re
from setuptools import setup, find_packages
from setuptools import setup


def read(f):
return open(os.path.join(os.path.dirname(__file__), f)).read().strip()


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')


setup(version=read_version(),
long_description='\n\n'.join((read('README.rst'), read('CHANGES.txt'))),
packages=find_packages(exclude=['tests', 'tests.*']))
setup(
long_description='\n\n'.join((read('README.rst'), read('CHANGES.txt'))),
)

0 comments on commit 768d1e6

Please sign in to comment.