-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deephaven specific edits - this should *not* be backported to jpy
- Loading branch information
1 parent
3e1d517
commit b1a2ac1
Showing
3 changed files
with
70 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Deephaven jpy | ||
============= | ||
|
||
This package is a fork of jpy https://github.com/bcdev/jpy.git maintained by Deephaven Data Labs. | ||
|
||
|
||
Installation | ||
------------ | ||
|
||
- Note that "deephaven-jpy" is not compatible with "jpy" as they both install shared libraries with the same name. | ||
- If you already have "jpy" installed, it should be removed before installing "deephaven-jpy" | ||
|
||
``` | ||
# Remove jpy if it is currently installed | ||
pip uninstall jpy | ||
# Install deephaven-jpy | ||
pip install deephaven-jpy | ||
``` | ||
|
||
Usage | ||
----- | ||
|
||
>>> import jpy | ||
>>> ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
# limitations under the License. | ||
import sys | ||
import os | ||
import os.path | ||
import re | ||
import platform | ||
import subprocess | ||
import shutil | ||
|
@@ -37,7 +37,30 @@ | |
__author__ = jpyutil.__author__ | ||
__copyright__ = jpyutil.__copyright__ | ||
__license__ = jpyutil.__license__ | ||
__version__ = jpyutil.__version__ | ||
|
||
def lookup_version(): | ||
uppath = lambda _path, n: os.sep.join(_path.split(os.sep)[:-n]) | ||
iris_root = uppath(os.path.abspath(__file__), 3) | ||
gradle_properties = os.path.join(iris_root, "gradle.properties") | ||
|
||
if not os.path.exists(gradle_properties): | ||
raise ValueError("The gradle.properties file does not exist at {}".format(iris_root)) | ||
|
||
# fetch the version string from the gradle.properties file | ||
with open(gradle_properties, 'r') as f: | ||
check = re.search('versionSource=(.*?)\n', f.read().strip()) | ||
|
||
if check is None: | ||
raise ValueError("The deephaven release version (versionSource=`version`) " | ||
"could not be discovered in {}".format(gradle_properties)) | ||
|
||
release_name = check.group(1) | ||
|
||
release_version = os.path.join(iris_root, 'gradle', 'versions', release_name) | ||
with open(release_version, 'r') as f: | ||
return f.read().strip() | ||
|
||
__version__ = lookup_version() | ||
|
||
base_dir = os.path.dirname(os.path.relpath(__file__)) | ||
src_main_c_dir = os.path.join(base_dir, 'src', 'main', 'c') | ||
|
@@ -53,6 +76,9 @@ | |
print('Note that you can use non-standard global option [--maven] ' | ||
'to force a Java Maven build for the jpy Java API') | ||
|
||
# todo: consider if we actually need to do this | ||
skip_write_jpy_config = True | ||
|
||
sources = [ | ||
os.path.join(src_main_c_dir, 'jpy_module.c'), | ||
os.path.join(src_main_c_dir, 'jpy_diag.c'), | ||
|
@@ -130,7 +156,7 @@ | |
|
||
define_macros = [] | ||
extra_link_args = [] | ||
extra_compile_args = [] | ||
extra_compile_args = ["-std=c99"] | ||
|
||
if platform.system() == 'Windows': | ||
define_macros += [('WIN32', '1')] | ||
|
@@ -221,6 +247,8 @@ def _write_jpy_config(target_dir=None, install_dir=None): | |
Write out a well-formed jpyconfig.properties file for easier Java | ||
integration in a given location. | ||
""" | ||
if skip_write_jpy_config: | ||
return None | ||
if not target_dir: | ||
target_dir = _build_dir() | ||
|
||
|
@@ -310,16 +338,16 @@ def run(self): | |
install.run(self) | ||
|
||
|
||
setup(name='jpy', | ||
description='Bi-directional Python-Java bridge', | ||
long_description=_read('README.md') + '\n\n' + _read('CHANGES.md'), | ||
setup(name='deephaven-jpy', | ||
description='Deephaven fork of jpy Bi-directional Python-Java bridge', | ||
long_description=_read('README-deephaven.md') + '\n\n' + _read('CHANGES.md'), | ||
version=__version__, | ||
long_description_content_type='text/markdown', | ||
platforms='Windows, Linux, Darwin', | ||
author=__author__, | ||
author_email='[email protected]', | ||
maintainer='Brockmann Consult GmbH', | ||
maintainer_email='[email protected]', | ||
author='Deephaven Data Labs', | ||
author_email='[email protected]', | ||
maintainer='Deephaven Data Labs', | ||
maintainer_email='[email protected]', | ||
license=__license__, | ||
url='https://github.com/bcdev/jpy', | ||
download_url='https://pypi.python.org/pypi/jpy/' + __version__, | ||
|
@@ -362,6 +390,6 @@ def run(self): | |
'Programming Language :: Python :: 2', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.3', | ||
'Programming Language :: Python :: 3.4', | ||
'Programming Language :: Python :: 3.5']) | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7']) |