-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
54 lines (41 loc) · 1.67 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
import os
import re
from distutils.core import setup
def read_file(path):
with open(os.path.join(os.path.dirname(__file__), path)) as fp:
return fp.read()
def _get_version_match(content, value_name):
regex = r"^{} = ['\"]([^'\"]*)['\"]".format(value_name)
version_match = re.search(regex, content, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
def get_value(value_name):
path = os.path.join('Marilyn', '__init__.py')
return _get_version_match(read_file(path), value_name)
setup(
name='Marilyn',
packages=['Marilyn'], # this must be the same as the name above
version=get_value('__version__'),
description='Marilyn SDK',
author=get_value('__author__'),
author_email=get_value('__email__'),
license='Apache License 2.0',
url='https://github.com/skar404/marilyn/', # use the URL to the github repo
download_url='https://github.com/skar404/marilyn/archive/master.zip', # I'll explain this in a second
keywords=['marilyn', 'sdk', 'api'], # arbitrary keywords
install_requires=['requests'],
classifiers=[
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 5 - Production/Stable',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
]
)