-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add PyJNIus recipe #6091
Add PyJNIus recipe #6091
Conversation
Hi! This is the friendly automated conda-forge-linting service. I wanted to let you know that I linted all conda-recipes in your PR ( Here's what I've got... For recipes/pyjnius:
|
recipes/pyjnius/meta.yaml
Outdated
version: {{tagged_version}} | ||
|
||
source: | ||
git_url: https://github.com/kivy/pyjnius.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you point to a git archive for this instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now we need this, we have asked upstream for a new release. ( kivy/pyjnius#342 ) The last one is too old (from a year ago).
Since there are some build issues that need to get sorted here, we are hoping to work on this asynchronously while the release is being sorted out. Hopefully we can incorporate it at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should add that once we do have a release, we will be able to drop the Jinja above, which should fix the linter issue as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could take a git archive from an arbitrary sha. Though i guess that doesn't differ much
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's true. Not to worried about it as this should be transient anyways.
recipes/pyjnius/meta.yaml
Outdated
|
||
build: | ||
number: 0 | ||
string: py{{py}}_{{PKG_BUILDNUM}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove the build string
recipes/pyjnius/meta.yaml
Outdated
- {{ compiler('cxx') }} | ||
host: | ||
- openjdk >=8 | ||
- python {{PY_VER}}* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the {{PYVER}}*
bit here since we don't need it
recipes/pyjnius/meta.yaml
Outdated
host: | ||
- openjdk >=8 | ||
- python {{PY_VER}}* | ||
- cython |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'll want to add pip
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think this is causing the build failure on Linux
recipes/pyjnius/meta.yaml
Outdated
- ant | ||
run: | ||
- openjdk >=8 | ||
- python {{PY_VER}}* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one should be dropped too
recipes/pyjnius/meta.yaml
Outdated
about: | ||
home: https://github.com/kivy/pyjnius | ||
license: MIT | ||
license_file: LICENSE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also needs the maintainers section with your GitHub handle. Snippet from the example below.
staged-recipes/recipes/example/meta.yaml
Lines 75 to 80 in a6f81a0
extra: | |
recipe-maintainers: | |
# GitHub IDs for maintainers of the recipe. | |
# Always check with the people listed below if they are OK becoming maintainers of the recipe. (There will be spam!) | |
- LisaSimpson | |
- LandoCalrissian |
- ignore python2 - add separate activate/deactivate files - fix PATH variable on Windows
We were able to fix the issues with the Windows build. Shoutout to @jjahanip and @jakirkham for their help! @jjahanip setting |
Thanks for working on this, Phil. Glad we were able to get Windows building. 😄 |
SET "JDK_HOME_BACKUP=%JDK_HOME%" | ||
SET "JDK_HOME=%JAVA_HOME%" | ||
SET "PATH_BACKUP=%PATH%" | ||
SET "PATH=%JDK_HOME%\jre\bin\server;%JDK_HOME%\bin;%PATH%" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since %JDK_HOME%
is just the %LIBRARY_PREFIX%
, %JDK_HOME%\bin
is already on the %PATH%
as conda
adds that for us. Given this, it appears the critical thing is having %JDK_HOME%\jre\bin\server
added. Inspecting that directory reveals only one library, which is jvm.dll
(needed by libraries using JNI). This explains the loading error and why we needed to add this to the %PATH%
. Have submitted PR ( conda-forge/openjdk-feedstock#30 ) to have openjdk
do this for us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another thing worth checking, it appears on macOS and Linux set JAVA_LD_LIBRARY_PATH
to the equivalent location. Maybe setting this alone would also solve the issue on Windows?
SET "PYJNIUS_JAR_BACKUP=%PYJNIUS_JAR%" | ||
SET "PYJNIUS_JAR=%CONDA_PREFIX%\share\pyjnius\pyjnius.jar" | ||
SET "JDK_HOME_BACKUP=%JDK_HOME%" | ||
SET "JDK_HOME=%JAVA_HOME%" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be curious to see if we can just drop the %JDK_HOME%
stuff given we didn't need it on Unix and it seems like we have a better understanding of the problem now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PyJNIus doc states that we should set it, so I'd just leave it in there.
http://pyjnius.readthedocs.io/en/latest/installation.html#installation-for-windows
recipes/pyjnius/activate.sh
Outdated
@@ -0,0 +1,2 @@ | |||
export PYJNIUS_JAR_BACKUP=$PYJNIUS_JAR | |||
export PYJNIUS_JAR=$CONDA_PREFIX/share/pyjnius/pyjnius.jar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment: Would be good to quote these paths in the event the user has spaces in them.
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
I udpated |
Seems fine to me. Thoughts @conda-forge/staged-recipes? |
LGTM Thanks! |
Closes #5075
conda-forge recipe for PyJNIus. Currently WIP, trying to figure out Windows build.