mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-14 18:12:35 +08:00
1.3.13
This commit is contained in:
13
setup.py
13
setup.py
@ -1,21 +1,22 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import io
|
||||
import sys
|
||||
|
||||
import distutils.errors
|
||||
import setuptools
|
||||
|
||||
if not hasattr(sys, "hexversion") or sys.hexversion < 0x02060000:
|
||||
raise distutils.errors.DistutilsError("Python 2.6 or newer is required")
|
||||
|
||||
if os.name == "posix":
|
||||
from setup_posix import get_config
|
||||
else: # assume windows
|
||||
from setup_windows import get_config
|
||||
|
||||
with io.open('README.md', encoding='utf-8') as f:
|
||||
readme = f.read()
|
||||
|
||||
metadata, options = get_config()
|
||||
metadata['ext_modules'] = [
|
||||
setuptools.Extension(sources=['_mysql.c'], **options)]
|
||||
metadata['long_description'] = metadata['long_description'].replace(r'\n', '')
|
||||
metadata['ext_modules'] = [setuptools.Extension(sources=['_mysql.c'], **options)]
|
||||
metadata['long_description'] = readme
|
||||
metadata['long_description_content_type'] = "text/markdown"
|
||||
setuptools.setup(**metadata)
|
||||
|
Reference in New Issue
Block a user