This repository has been archived by the owner on Oct 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
97 lines (86 loc) · 3.52 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
86
87
88
89
90
91
92
93
94
95
96
97
# - # Copyright 2016 Max Fischer
# - #
# - # Licensed under the Apache License, Version 2.0 (the "License");
# - # you may not use this file except in compliance with the License.
# - # You may obtain a copy of the License at
# - #
# - # http://www.apache.org/licenses/LICENSE-2.0
# - #
# - # Unless required by applicable law or agreed to in writing, software
# - # distributed under the License is distributed on an "AS IS" BASIS,
# - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# - # See the License for the specific language governing permissions and
# - # limitations under the License.
import os
import re
import sys
import codecs
from setuptools import setup, find_packages
# guard against rerunning setup.py when bootstrapping __main__
if __name__ == '__main__':
repo_base = os.path.abspath(os.path.dirname(__file__))
# grab meta without import package
sys.path.insert(0, os.path.join(repo_base, 'cpy2py'))
import meta as cpy2py_meta
install_requires = []
try:
import argparse
except ImportError:
install_requires.append('argparse')
if sys.version_info < (3, 3):
install_requires.append('backports.range')
# use readme for long descripion
with codecs.open(os.path.join(repo_base, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
for directive_re, replacement_re in [
(':py:\S*?:`~(.*?)`', '`\g<1>`'),
(':py:\S*?:', ''),
(':envvar:', ''),
(':option:', ''),
]:
long_description = re.sub(directive_re, replacement_re, long_description)
if '--longdescription' in sys.argv:
print(long_description)
sys.exit(1)
setup(
name='cpy2py',
# meta data
version=cpy2py_meta.__version__,
description='Framework for combining different python interpeters',
long_description=long_description,
url='https://github.com/maxfischer2781/cpy2py',
author='Max Fischer',
author_email='[email protected]',
license='Apache V2.0',
platforms=['Operating System :: OS Independent'],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
# TODO: confirm others
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
# TODO: confirm others
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Interpreters',
'Topic :: Software Development :: Libraries :: Application Frameworks',
'Topic :: Software Development :: Libraries :: Python Modules',
],
keywords='interpreter framework development ipc processing pypy cpython',
# content
packages=find_packages(exclude=('cpy2py_*', 'dev_tools')),
install_requires=install_requires,
extras_require={
'example': ['matplotlib'],
'profiling': ['vmprof'],
'coverage': ['coverage'],
},
# unit tests
test_suite='cpy2py_unittests',
# use unittest backport to have subTest etc.
tests_require=['unittest2'] if sys.version_info < (3, 4) else [],
)