You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am probably a little bit late to the discussion, but I will try it nevertheless.
Your plugin makes it possible to add python packages (from a remote) via pypackage jython { pypackage 'python-dateutil:2.4.2','arrow:0.7.0', 'six:1.10.0' }
In my project i have some local packages I need to add to the classpath:
MyProject
├── dir1
│ ├── lib1.py
│ └── lib2.jar
└── dir2
└── lib3.py`
Is there any possibility to specify a local repository for pypackage to use?
Using pypackage with local files does result in an error (not surprisingly): jython { pypackage 'resources\activation.py' }
Execution failed for task ':createClassPath'. Could not find method pypackage() for arguments [resources\activation.py] on extension 'jython' of type jython.JythonExtension.
Kind regards
Tobias
The text was updated successfully, but these errors were encountered:
Hi Tobias, pypackage specifies a name and version of an external module which is available in the public Python repository. So its role is to specifiy what is needed, and not where it is. In this perspective, allowing something like pypackage '<local file path>' would drastically change the intent of the instruction.
However, if you have the source of your package inside your project, you should not need to refer to it in the build script: it should be enough to put the source code into src/main/jython directory, and import it in the main script.
On the other hand, if you have your own package that you use in several projects, and do not want to replicate its source in each project, I suggest you use a self-hosted repository, and use the standard pypackage declaration. At present, this still would not work in the current version of the plugin, as the url of the Python repository is hardcoded by design. However I might add the option to override this url (or to add another url to it, and search the repositories in order).
Hi rzabini,
I am probably a little bit late to the discussion, but I will try it nevertheless.
Your plugin makes it possible to add python packages (from a remote) via pypackage
jython { pypackage 'python-dateutil:2.4.2','arrow:0.7.0', 'six:1.10.0' }
In my project i have some local packages I need to add to the classpath:
MyProject
├── dir1
│ ├── lib1.py
│ └── lib2.jar
└── dir2
└── lib3.py`
Is there any possibility to specify a local repository for pypackage to use?
Using pypackage with local files does result in an error (not surprisingly):
jython { pypackage 'resources\activation.py' }
Execution failed for task ':createClassPath'. Could not find method pypackage() for arguments [resources\activation.py] on extension 'jython' of type jython.JythonExtension.
Kind regards
Tobias
The text was updated successfully, but these errors were encountered: