-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
66 lines (54 loc) · 2.04 KB
/
setup.py
File metadata and controls
66 lines (54 loc) · 2.04 KB
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
"""
setup.py
Basic setup file to enable pip install
See:
https://pythonhosted.org/setuptools/
https://bitbucket.org/pypa/setuptools
python setup.py register sdist upload
"""
import sys
import os
from setuptools import setup, find_packages
v = sys.version_info
if sys.version_info < (3, 5):
msg = "FAIL: Requires Python 3.5 or later, but setup.py was run using {}.{}.{}"
v = sys.version_info
print(msg.format(v.major, v.minor, v.micro))
print("NOTE: Installation failed. Run setup.py using python3")
sys.exit(1)
# Change to repo source directory prior to running any command
try:
SETUP_DIRNAME = os.path.dirname(__file__)
except NameError:
# We're probably being frozen, and __file__ triggered this NameError
# Work around this
SETUP_DIRNAME = os.path.dirname(sys.argv[0])
if SETUP_DIRNAME != '':
os.chdir(SETUP_DIRNAME)
SETUP_DIRNAME = os.path.abspath(SETUP_DIRNAME)
METADATA = os.path.join(SETUP_DIRNAME, 'ioserve', '__metadata__.py')
# Load the metadata using exec() so we don't trigger an import of .__init__
exec(compile(open(METADATA).read(), METADATA, 'exec'))
REQUIRES = ['ioflo']
setup(
name='ioserve',
version=__version__,
description='Micro-Services with Ioflo Example',
long_description='Using ioflo http client and http wisgi servers',
url='https://github.com/ioflo/ioserve',
download_url='https://github.com/ioflo/ioserve.git',
author=__author__,
author_email='smith.samuel.m@gmail.com',
license=__license__,
keywords=('Micro-Service Ioflo'),
packages=find_packages(exclude=['test', 'test.*',
'docs', 'docs*',
'log', 'log*',]),
package_data={
'': ['*.txt', '*.md', '*.rst', '*.json', '*.conf', '*.html',
'*.css', '*.ico', '*.png', 'LICENSE', 'LEGAL'],
'ioserve': ['flo/plan/*.flo', 'flo/plan/*/*.flo',
'flo/plan/*.txt', 'flo/plan/*/*.txt',],},
install_requires=REQUIRES,
extras_require={},
scripts=['scripts/ioserve',])