-
Notifications
You must be signed in to change notification settings - Fork 62
/
setup.py
72 lines (63 loc) · 1.9 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
'''setuptools setup
'''
import os
import setuptools
import eosfactory.core.config as config
from shutil import rmtree
setuptools_name = config.SETUPTOOLS_NAME
try:
rmtree("build")
except:
pass
try:
rmtree("dist")
except:
pass
try:
rmtree(setuptools_name + ".egg-info")
except:
pass
def readme():
with open('README.rst') as f:
return f.read()
def data_files_item(directory):
'''Given a directory, return tuple the directory, its files.
'''
paths = []
for (path, _directories, filenames) in os.walk(directory):
for filename in filenames:
d = os.path.join(config.EOSFACTORY_DIR, path)
if "build" in d:
continue
file_list = [os.path.join(path, filename)]
paths.append((d, file_list))
return paths
DATA_FILES = [
(config.EOSFACTORY_DIR, ["wsl_root.sh"]),
(os.path.join(config.EOSFACTORY_DIR, "config"),
["config/distributed/config.json", "config/config.ini"])]
DATA_FILES.extend(data_files_item('templates'))
DATA_FILES.extend(data_files_item('contracts'))
DATA_FILES.extend(data_files_item('includes'))
DATA_FILES.extend(data_files_item('libs'))
setuptools.setup(
name=setuptools_name,
version=config.VERSION,
description='Python-based EOS smart-contract development & testing framework',
long_description=readme(),
classifiers=[
"Programming Language :: Python :: 3.5",
"License :: OSI Approved :: MIT License",
"Operating System :: Unix",
'Topic :: Software Development :: Testing',
],
keywords='EOSIO, smart contract unit testing',
url='https://github.com/tokenika/eosfactory',
author='Tokenika',
author_email='contact@tokenika.io',
license='MIT',
packages=setuptools.find_packages(),
install_requires=['termcolor', 'psutil'],
include_package_data = True,
data_files=DATA_FILES,
zip_safe=False)