forked from usegalaxy-no/ecc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
56 lines (44 loc) · 1.49 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
from setuptools import setup
import json
import glob
import os
def readme():
with open('README.rst') as f:
return f.read()
def get_version():
with open('version.json') as json_file:
data = json.load(json_file)
if 'dev' in data and data['dev']:
return "{}.{}.{}-dev{}".format( data['major'], data['minor'], data['patch'], data['dev'])
if 'rc' in data and data['rc']:
return "{}.{}.{}-rc{}".format( data['major'], data['minor'], data['patch'], data['rc'])
return "{}.{}.{}".format( data['major'], data['minor'], data['patch'])
def get_requirements():
file_handle = open('requirements.txt', 'r')
data = file_handle.read()
file_handle.close()
return data.split("\n")
def get_scripts(directory='bin') -> list:
files = []
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
if filename.endswith("~") or filename.endswith("__"):
continue
files.append(os.path.join(path, filename))
# print( paths )
return files
setup(name='ecc',
version= get_version(),
description='Elastic Compute Cluster',
url='https://github.com/usegalaxy-no/ecc/',
author='Kim Brugger',
author_email='[email protected]',
license='MIT',
packages=['ecc'],
classifiers=[
'License :: MIT License',
'Programming Language :: Python :: +3.6'
],
install_requires=[ get_requirements() ],
scripts=get_scripts(),
)