This repository has been archived by the owner on Jun 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
85 lines (75 loc) · 2.51 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
from setuptools import find_packages, setup, Extension
def cythonize(*args, **kwargs):
'''
dirty hack, only import cythonize at the time you use it.
if you don't write Cython extension,
you won't fail even if you don't install Cython.
'''
global cythonize
from Cython.Build import cythonize
return cythonize(*args, **kwargs)
def mbcs_work_around():
'''
work around for mbcs codec to make "bdist_wininst" work
https://mail.python.org/pipermail/python-list/2012-February/620326.html
'''
import codecs
try:
codecs.lookup('mbcs')
except LookupError:
ascii = codecs.lookup('ascii')
codecs.register(lambda name: {True: ascii}.get(name == 'mbcs'))
version = __import__('everywhere').VERSION
exclude_from_packages = []
requires = []
extensions = [
# TODO write your own extensions
Extension('everywhere._base',
sources=['everywhere/_base.c']),
*cythonize(
Extension('everywhere._base_cy',
sources=['everywhere/_base_cy.pyx']),
),
]
mbcs_work_around()
setup(
name='python-everywhere',
version=version,
url='https://github.com/wdv4758h/python-everywhere',
author='Chiu-Hsiang Hsu',
author_email='[email protected]',
description=('A template project for Python'),
long_description=open("README.rst").read(),
download_url="https://github.com/wdv4758h/python-everywhere/archive/v{}.zip".format(
version
),
license='BSD',
setup_requires=['pytest-runner',
'coverage', 'pytest-cov',
'flake8', 'pytest-flake8',
'pylint', 'pytest-pylint',
'mypy-lang',
'pydocstyle'],
tests_require=['pytest'],
install_requires=requires,
packages=find_packages(exclude=exclude_from_packages),
include_package_data=True,
ext_modules=extensions,
scripts=[],
extras_require={},
zip_safe=False,
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
# 'Programming Language :: Python :: 2',
# 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
)