forked from insolite/graphene-peewee-async
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
60 lines (46 loc) · 1.79 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
import re
import os
from setuptools import find_packages, setup
from pip.req import parse_requirements
install_reqs = parse_requirements('requirements.txt', session=False)
tests_reqs = parse_requirements('tests-requirements.txt', session=False)
requirements = [str(ir.req) for ir in install_reqs]
tests_requirements = [str(ir.req) for ir in tests_reqs]
package_name = 'graphene_peewee_async'
hyphen_package_name = package_name.replace('_', '-')
def read_version():
regexp = re.compile(r"^__version__\s*=\s*'([\d.abrc]+)'")
init_py = os.path.join(os.path.dirname(__file__), package_name, '__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 {}'.format(init_py))
setup(
name=hyphen_package_name,
version=read_version(),
description='Graphene peewee-async integration',
long_description=open('README.rst').read(),
url='https://github.com/insolite/{}'.format(hyphen_package_name),
author='Oleg Krasnikov',
author_email='a.insolite@gmail.com',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: PyPy',
],
keywords='api graphql protocol rest relay graphene',
packages=find_packages(exclude=['tests']),
install_requires=requirements,
tests_require=tests_requirements,
include_package_data=True,
zip_safe=False,
platforms='any',
)