forked from Shopify/ci-queue
-
Notifications
You must be signed in to change notification settings - Fork 6
/
setup.py
55 lines (44 loc) · 1.28 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
import os
import glob
try:
import setuptools as setuplib
except ImportError:
import distutils.core as setuplib
SCRIPTS_PATH = 'ciqueue/redis'
def get_lua_scripts():
if not os.path.exists(SCRIPTS_PATH):
os.makedirs(SCRIPTS_PATH)
paths = []
if not os.path.exists(SCRIPTS_PATH):
os.makedirs(SCRIPTS_PATH)
for path in glob.glob(os.path.join(
os.path.dirname(__file__), '../redis/*.lua')):
filename = os.path.basename(path)
destination_path = os.path.join(os.getcwd(), SCRIPTS_PATH, filename)
with open(destination_path, 'w+') as lua_file:
lua_file.write("-- AUTOGENERATED FILE DO NOT EDIT DIRECTLY\n")
lua_file.write(open(path).read())
paths.append(destination_path)
return paths
setuplib.setup(
name='ciqueue',
version='0.1',
packages=['ciqueue', 'ciqueue._pytest'],
install_requires=[
'dill>=0.2.7',
'pytest>=2.7,<=3.5.0',
'redis>=2.10.5',
'tblib>=1.3.2',
'uritools>=2.0.0',
'future>=0.16.0'
],
extras_require={
'test': [
'tox==3.13.2',
'shopify_python==0.4.1',
'pycodestyle == 2.4.0',
]
},
package_data={'': get_lua_scripts()},
include_package_data=True,
)