Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make published macOS wheels portable #78

Merged
merged 4 commits into from
Aug 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build JPY distributions

on:
pull_request:
branches: [ 'master' ]
branches: [ 'master', 'release/v*' ]
push:
branches: [ 'master', 'release/v*' ]

Expand Down
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# jpy Changelog

## Version 0.11.1
* [#79](https://github.com/jpy-consortium/jpy/issues/79) Produce usable / distributable macosx wheels

## Version 0.11.0
* Publish artifacts to [PyPi](https://pypi.org/project/jpy/). Source tarball and binary wheels for Python 3.6 - 3.10 for Linux, Mac, and Windows (x86_64).
* Publish release to Maven Central with group id `org.jpyconsortium` and artifact id `jpy`. Java-8 compatible jars.
Expand Down
2 changes: 1 addition & 1 deletion jpyutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
__author__ = "Norman Fomferra (Brockmann Consult GmbH) and contributors"
__copyright__ = "Copyright 2015-2018 Brockmann Consult GmbH and contributors"
__license__ = "Apache 2.0"
__version__ = "0.11.0"
__version__ = "0.11.1"


# Setup a dedicated logger for jpyutil.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<groupId>org.jpyconsortium</groupId>
<artifactId>jpy</artifactId>
<version>0.11.0</version>
<version>0.11.1</version>
<packaging>jar</packaging>
<name>Java-Python Bridge</name>

Expand Down
13 changes: 10 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,16 @@
extra_link_args += ['-Xlinker', '-rpath', jvm_dll_dir]
elif platform.system() == 'Darwin':
include_dirs += [os.path.join(jdk_home_dir, 'include', 'darwin')]
library_dirs += [os.path.join(sys.exec_prefix, 'lib')]
extra_link_args += ['-Xlinker', '-rpath', jvm_dll_dir]

if is_ci:
# This has the effect of removing the non-portable LC_LOAD_DYLIB and LC_RPATH directives for libjvm.dylib from the .so files.
# See https://github.com/jpy-consortium/jpy/issues/79 for details.
libraries = None
library_dirs = None
else:
# Remove local build workaround for non-portable macOS wheels
# TODO: https://github.com/jpy-consortium/jpy/issues/80
library_dirs += [os.path.join(sys.exec_prefix, 'lib')]
extra_link_args += ['-Xlinker', '-rpath', jvm_dll_dir]

# ----------- Functions -------------
def _build_dir():
Expand Down