[More extension repositories] Pypi
Last modified by Krzysztof Płachno on 2017/06/30 15:10
Downloading extension
- Pypi repository api is not well documented and there's no Java library for connecting it yet
- endpoint for getting package info: https://wiki.python.org/moin/PyPIJSON
- endpoint to download packages: https://wiki.python.org/moin/PyPISimple
- As point of reference how to integrate with pypi: http://mavenjython.sourceforge.net/ that connects Pypi
Integration
- imported packages are meant to be used generally in scripts - not only python but e.g. in groovy as well (the goal is to load the python libraries in the classloader - then use them where you want)
- example (since the pygments package is already in classloader - groovy will find it)
{{groovy}}
this.getClass().getResource( '/pygments/\_\_init\_\_.py').text
{{/groovy}} - as regards .egg files - the way is to tell EM that's it's actually a JAR and the JAR extension handler will register it,
- it's already done in simillar way with "Pygments" python library
- as regards whl files the way to handle it is to be investigated
- package id convention
- python packages don't follow maven like id convention: groupId:artifactId
- the suggestion is to take package name as artifactId and to put some common prefix as groupId e.g. org.python