Skip to content

Commit 5d2de75

Browse files
committed
Added setup.py
1 parent 4651ebe commit 5d2de75

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

setup.py

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import os
2+
import re
3+
import ast
4+
from setuptools import setup
5+
6+
7+
_version_re = re.compile(r'__version__\s+=\s+(.*)')
8+
9+
10+
with open('sage_utils/__init__.py', 'rb') as f:
11+
version = str(ast.literal_eval(_version_re.search(
12+
f.read().decode('utf-8')).group(1))
13+
)
14+
15+
16+
requirements = [
17+
'aioamqp==0.10.0',
18+
]
19+
20+
21+
def read(f):
22+
return open(os.path.join(os.path.dirname(__file__), f)).read().strip()
23+
24+
25+
def get_packages(package):
26+
"""
27+
Return root package and all sub-packages.
28+
"""
29+
return [
30+
dirpath
31+
for dirpath, dirnames, filenames in os.walk(package)
32+
if os.path.exists(os.path.join(dirpath, '__init__.py'))
33+
]
34+
35+
36+
args = dict(
37+
name='sage-utils',
38+
version=version,
39+
url='https://github.com/OpenMatchmaking/sage-utils-python',
40+
license='BSD',
41+
author='Valeryi Savich',
42+
author_email='[email protected]',
43+
description='SDK for Open Matchmaking microservices in Python',
44+
long_description=read('README.rst'),
45+
packages=get_packages('sage_utils'),
46+
include_package_data=True,
47+
zip_safe=False,
48+
platforms='any',
49+
install_requires=requirements,
50+
classifiers=[
51+
'License :: OSI Approved :: BSD License',
52+
'Intended Audience :: Developers',
53+
'Programming Language :: Python',
54+
'Programming Language :: Python :: 3',
55+
'Topic :: Internet :: WWW/HTTP'
56+
],
57+
)
58+
59+
60+
if __name__ == '__main__':
61+
setup(**args)

0 commit comments

Comments
 (0)