-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
56 lines (45 loc) · 1.44 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
import os
from setuptools import setup
import json
import glob
def readme():
with open('README.rst') as f:
return f.read()
def package_files(directory):
paths = []
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
if filename.endswith("~"):
continue
paths.append(os.path.join(path, filename))
print( paths )
return paths
def get_version():
with open('version.json') as json_file:
data = json.load(json_file)
return "{}.{}.{}".format( data['major'], data['minor'], data['patch'])
def get_requirements():
file_handle = open('requirements.txt', 'r')
data = file_handle.read()
file_handle.close()
print( data )
return data.split("\n")
# return "{}.{}.{}".format( data['major'], data['minor'], data['patch'])
def scripts(directory='bin/*') -> []:
return glob.glob( directory )
setup(name='kbr',
version= get_version(),
description='python utils and tools collection',
url='https://github.com/brugger/kbr-tools/',
author='Kim Brugger',
author_email='[email protected]',
license='MIT',
packages=['kbr'],
install_requires=get_requirements(),
classifiers=[
"Development Status :: 0.0.1".format( get_version()),
'License :: MIT License',
'Programming Language :: Python :: 3'
],
scripts=scripts(),
zip_safe=False)