zproject
zproject copied to clipboard
Unable to reference other projects api files if installed at non-standard location
In resolve_container_dependencies in zproject_class_api.gsl the path /usr/local/share/zproject is hard-coded, which means that attempting to generate zyre files when installing at any other location is not possible.
It seems there's no way within GSL to get the path to the script being executed, either, so I don't see a solution.
Using the script path won't help (it's an executable so could be in e. g. /usr/bin or c:\whatever).
This hardcoded script path was a temporary solution, clearly it has to disappear.
The approach I'd started using in some of the backends, e.g. zproject_nodejs.gsl, was to enforce a structure on dependencies, so zyre could assume czmq and libzmq were checked out in sibling directories. This works. We could use the same approach more broadly IMO.
On 12 Jul 2016 12:21 am, "twhittock" [email protected] wrote:
In resolve_container_dependencies in zproject_class_api.gsl the path /usr/local/share/zproject is hard-coded, which means that attempting to generate zyre files when installing at any other location is not possible.
It seems there's no way within GSL to get the path to the script being executed, either, so I don't see a solution.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
The sibling directories @hintjens described are already implemented to find dependencies. Currently the hard-coded path takes precedence though. Removing the hard-coded path should not have too much implications on users IMO, as that feature is not yet documented.
The reason I wanted the script path was that I could search $(scriptPath)/../share/zproject
On 12 July 2016 at 07:21, Kevin Sapper [email protected] wrote:
The sibling directories @hintjens https://github.com/hintjens described are already implemented to find dependencies. Currently the hard-coded path takes precedence though. Removing the hard-coded path should not have too much implications on users IMO, as that feature is not yet documented.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zeromq/zproject/issues/655#issuecomment-231947787, or mute the thread https://github.com/notifications/unsubscribe/AGDEB3UFKrLGbrEn_ujOkUCRDP-ow7Dyks5qUzJWgaJpZM4JJ28n .
Ah. You don't need to search for scripts; you can load them using the 'gsl' command and detect if that fails. Then the script simply has to be on the path.
On Wed, Jul 13, 2016 at 12:03 PM, twhittock [email protected] wrote:
The reason I wanted the script path was that I could search $(scriptPath)/../share/zproject
On 12 July 2016 at 07:21, Kevin Sapper [email protected] wrote:
The sibling directories @hintjens https://github.com/hintjens described are already implemented to find dependencies. Currently the hard-coded path takes precedence though. Removing the hard-coded path should not have too much implications on users IMO, as that feature is not yet documented.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zeromq/zproject/issues/655#issuecomment-231947787, or mute the thread < https://github.com/notifications/unsubscribe/AGDEB3UFKrLGbrEn_ujOkUCRDP-ow7Dyks5qUzJWgaJpZM4JJ28n
.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zeromq/zproject/issues/655#issuecomment-232312424, or mute the thread https://github.com/notifications/unsubscribe/AASzCC5KPtu1b8X7xWeDt9ycatoeTnR-ks5qVLfjgaJpZM4JJ28n .
We're not searching for scripts, we're searching for API definitions, which are stored outside the bin directory, so are not in the PATH.
On 13 July 2016 at 11:24, Pieter Hintjens [email protected] wrote:
Ah. You don't need to search for scripts; you can load them using the 'gsl' command and detect if that fails. Then the script simply has to be on the path.
On Wed, Jul 13, 2016 at 12:03 PM, twhittock [email protected] wrote:
The reason I wanted the script path was that I could search $(scriptPath)/../share/zproject
On 12 July 2016 at 07:21, Kevin Sapper [email protected] wrote:
The sibling directories @hintjens https://github.com/hintjens described are already implemented to find dependencies. Currently the hard-coded path takes precedence though. Removing the hard-coded path should not have too much implications on users IMO, as that feature is not yet documented.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <https://github.com/zeromq/zproject/issues/655#issuecomment-231947787 , or mute the thread <
https://github.com/notifications/unsubscribe/AGDEB3UFKrLGbrEn_ujOkUCRDP-ow7Dyks5qUzJWgaJpZM4JJ28n
.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zeromq/zproject/issues/655#issuecomment-232312424, or mute the thread < https://github.com/notifications/unsubscribe/AASzCC5KPtu1b8X7xWeDt9ycatoeTnR-ks5qVLfjgaJpZM4JJ28n
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zeromq/zproject/issues/655#issuecomment-232316885, or mute the thread https://github.com/notifications/unsubscribe/AGDEBz6K5VGjFxbtPJcVU4H9cKHZZr1Cks5qVLzlgaJpZM4JJ28n .
The load_file () method will search on the PATH, so this is trivially solved by installing the API definitions together with the scripts that need them.