-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
66 lines (60 loc) · 2.42 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
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import os
import subprocess
DOC_DIR = os.path.join("py4j-python", "doc")
DIST_DIR = os.path.join("py4j-python", "dist")
VERSION_PATH = os.path.join("py4j-python", "src", "py4j", "version.py")
# For Python 3 compatibility, we can't use execfile; this is 2to3's conversion:
exec(compile(open(VERSION_PATH).read(),
VERSION_PATH, "exec"))
VERSION = __version__ # noqa
RELEASE = "py4j-" + VERSION
JAR_FILE = "py4j" + VERSION + ".jar"
os.chdir("py4j-java")
if os.name == "nt":
subprocess.call("./gradlew.bat buildPython", shell=True)
else:
subprocess.call("./gradlew buildPython", shell=True)
os.chdir("..")
JAR_FILE_PATH = os.path.join("py4j-python", "py4j-java", JAR_FILE)
setup(
name="py4j",
packages=["py4j", "py4j.tests"],
package_dir={"": "py4j-python/src"},
data_files=[("share/py4j", [JAR_FILE_PATH])],
version=VERSION,
description="Enables Python programs to dynamically access arbitrary "
"Java objects",
long_description="Py4J enables Python programs running in a Python "
"interpreter to dynamically "
"access Java objects in a Java Virtual Machine. "
"Methods are called as if the Java "
"objects resided in the Python interpreter and Java "
"collections can be accessed "
"through standard Python collection methods. Py4J also "
"enables Java programs to call back Python objects.",
url="https://www.py4j.org/",
author="Barthelemy Dagenais",
author_email="[email protected]",
license="BSD License",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Java",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Object Brokering",
],
)