Installing python packages in Jython

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Installing python packages in Jython

Krzysiek Płachno
Hello!

I'm contributing to XWiki open source project http://www.xwiki.org/. XWiki platform apart from many wonderful features allows for scripting in python on its pages. Under the hood it's Jython execute the python script.

My current task is to enable installing packages form PyPi repository (making them available for Java classloader in XWiki instance) so that they can be imported by Jython in any python script. 
The doubt that I have is what the version of package should be for given version of Jython. 

1) The version of Jython that we use is 2.7.1. Then, should the python packages be compatible with python 2.7?
2) Is there any documentation page where I could get to know more on this topic?
3) Does it make any difference if package is in .egg or .whl format?

Thanks in advance for help!
Best,
Krzysztof Płachno

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users
Reply | Threaded
Open this post in threaded view
|

Re: Installing python packages in Jython

Krzysiek Płachno
To clarify the case: what I have already done is successful import of python library via Jython. Now question that I have is which version of python library will be the safest to use with Jython 2.7.1.

Best,
Krzysztof

2017-07-19 23:27 GMT+02:00 Krzysiek Płachno <[hidden email]>:
Hello!

I'm contributing to XWiki open source project http://www.xwiki.org/. XWiki platform apart from many wonderful features allows for scripting in python on its pages. Under the hood it's Jython execute the python script.

My current task is to enable installing packages form PyPi repository (making them available for Java classloader in XWiki instance) so that they can be imported by Jython in any python script. 
The doubt that I have is what the version of package should be for given version of Jython. 

1) The version of Jython that we use is 2.7.1. Then, should the python packages be compatible with python 2.7?
2) Is there any documentation page where I could get to know more on this topic?
3) Does it make any difference if package is in .egg or .whl format?

Thanks in advance for help!
Best,
Krzysztof Płachno


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users
Reply | Threaded
Open this post in threaded view
|

Re: Installing python packages in Jython

Jim Baker-2
Eggs and wheels are both pure Python package formats and work well on Jython 2.7. In particular, the distribution of Jython 2.7.1 uses the standard wheels for both pip and setuptools from upstream PyPA development.

But if I had to pick, I would go for the wheel format.

On Thu, Jul 20, 2017 at 2:37 AM, Krzysiek Płachno <[hidden email]> wrote:
To clarify the case: what I have already done is successful import of python library via Jython. Now question that I have is which version of python library will be the safest to use with Jython 2.7.1.

Best,
Krzysztof

2017-07-19 23:27 GMT+02:00 Krzysiek Płachno <[hidden email]>:
Hello!

I'm contributing to XWiki open source project http://www.xwiki.org/. XWiki platform apart from many wonderful features allows for scripting in python on its pages. Under the hood it's Jython execute the python script.

My current task is to enable installing packages form PyPi repository (making them available for Java classloader in XWiki instance) so that they can be imported by Jython in any python script. 
The doubt that I have is what the version of package should be for given version of Jython. 

1) The version of Jython that we use is 2.7.1. Then, should the python packages be compatible with python 2.7?
2) Is there any documentation page where I could get to know more on this topic?
3) Does it make any difference if package is in .egg or .whl format?

Thanks in advance for help!
Best,
Krzysztof Płachno


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users
Reply | Threaded
Open this post in threaded view
|

Re: Installing python packages in Jython

Krzysiek Płachno
But which version of python packages if indented to use with Jython 2.7.1? Is it Python 2.7?
Any others are possible?

Best,
Krzysztof

2017-07-20 16:36 GMT+02:00 Jim Baker <[hidden email]>:
Eggs and wheels are both pure Python package formats and work well on Jython 2.7. In particular, the distribution of Jython 2.7.1 uses the standard wheels for both pip and setuptools from upstream PyPA development.

But if I had to pick, I would go for the wheel format.

On Thu, Jul 20, 2017 at 2:37 AM, Krzysiek Płachno <[hidden email]> wrote:
To clarify the case: what I have already done is successful import of python library via Jython. Now question that I have is which version of python library will be the safest to use with Jython 2.7.1.

Best,
Krzysztof

2017-07-19 23:27 GMT+02:00 Krzysiek Płachno <[hidden email]>:
Hello!

I'm contributing to XWiki open source project http://www.xwiki.org/. XWiki platform apart from many wonderful features allows for scripting in python on its pages. Under the hood it's Jython execute the python script.

My current task is to enable installing packages form PyPi repository (making them available for Java classloader in XWiki instance) so that they can be imported by Jython in any python script. 
The doubt that I have is what the version of package should be for given version of Jython. 

1) The version of Jython that we use is 2.7.1. Then, should the python packages be compatible with python 2.7?
2) Is there any documentation page where I could get to know more on this topic?
3) Does it make any difference if package is in .egg or .whl format?

Thanks in advance for help!
Best,
Krzysztof Płachno


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users
Reply | Threaded
Open this post in threaded view
|

Re: Installing python packages in Jython

Jim Baker-2
Jython 2.7.1 is the implementation of Python 2.7, so that's what you should be using. 

On Thu, Jul 20, 2017 at 9:08 AM, Krzysiek Płachno <[hidden email]> wrote:
But which version of python packages if indented to use with Jython 2.7.1? Is it Python 2.7?
Any others are possible?

Best,
Krzysztof

2017-07-20 16:36 GMT+02:00 Jim Baker <[hidden email]>:
Eggs and wheels are both pure Python package formats and work well on Jython 2.7. In particular, the distribution of Jython 2.7.1 uses the standard wheels for both pip and setuptools from upstream PyPA development.

But if I had to pick, I would go for the wheel format.

On Thu, Jul 20, 2017 at 2:37 AM, Krzysiek Płachno <[hidden email]> wrote:
To clarify the case: what I have already done is successful import of python library via Jython. Now question that I have is which version of python library will be the safest to use with Jython 2.7.1.

Best,
Krzysztof

2017-07-19 23:27 GMT+02:00 Krzysiek Płachno <[hidden email]>:
Hello!

I'm contributing to XWiki open source project http://www.xwiki.org/. XWiki platform apart from many wonderful features allows for scripting in python on its pages. Under the hood it's Jython execute the python script.

My current task is to enable installing packages form PyPi repository (making them available for Java classloader in XWiki instance) so that they can be imported by Jython in any python script. 
The doubt that I have is what the version of package should be for given version of Jython. 

1) The version of Jython that we use is 2.7.1. Then, should the python packages be compatible with python 2.7?
2) Is there any documentation page where I could get to know more on this topic?
3) Does it make any difference if package is in .egg or .whl format?

Thanks in advance for help!
Best,
Krzysztof Płachno


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users