This repository was archived by the owner on Aug 13, 2018. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathsetup.py
More file actions
44 lines (36 loc) · 1.27 KB
/
setup.py
File metadata and controls
44 lines (36 loc) · 1.27 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
#!/usr/bin/env python
import os
import sys
import shutil
from setuptools import setup
#------------------------------------------------------------------------
# Optional building with MAVEN
#------------------------------------------------------------------------
JAVA_SRC = "knit_jvm"
jar_file = os.path.join(JAVA_SRC, "target", "knit-1.0-SNAPSHOT.jar")
with open('requirements.txt') as f:
requires = f.read().splitlines()
if 'mvn' in sys.argv:
os.chdir(JAVA_SRC)
build_cmd = "mvn clean install -q"
os.system(build_cmd)
os.chdir("..")
sys.argv.remove("mvn")
java_lib_dir = os.path.join("knit", "java_libs")
if not os.path.exists(java_lib_dir):
os.mkdir(java_lib_dir)
shutil.copy(jar_file, java_lib_dir)
setup(name='knit',
version="0.2.4",
description='Python wrapper for YARN Applications',
url='http://github.com/dask/knit/',
maintainer='Benjamin Zaitlen',
maintainer_email='bzaitlen@anaconda.com',
license='BSD',
keywords='yarn',
packages=['knit', 'dask_yarn'],
package_data={'knit': ['java_libs/knit-1.0-SNAPSHOT.jar']},
install_requires=requires,
long_description=(open('README.rst').read()
if os.path.exists('README.rst') else ''),
zip_safe=False)