Skip to content
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

Make Lima a python namespace package #116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tiagocoutinho
Copy link
Contributor

@tiagocoutinho tiagocoutinho commented May 17, 2020

rationale

It would be nice for external lima python software to share the Lima namespace.

Example: If someone is writing a python camera plugin for Lima it would be nice if after installing,
it could be used with:

import Lima.MyDetector
det = Lima.MyDetector.MyDetector('localhost', 5000)
...

It could be done if Lima becomes a python namespace package (see here).

But for this it is necessary that all packages (including Lima itself) reduce their Lima/__init__.py
to a single line:

__path__ = __import__('pkgutil').extend_path(__path__, __name__)

Check here for a sample project using this python feature.

I propose also to add this information to the documentaion if the idea behind this PR is accepted so please don't merge the PR until I do!

Doubts

Seems the existing code in Lima/__init__.py is never activated because get_os seems to be always None. I assumed this was some old code that can be removed.`

Also, it forces LIMA_LINK_STRICT_VERSION. I search the entire Lima project and I could not find any place where it could be used so I also assumed it can be removed.

@laurent-claustre
Copy link
Contributor

Hi @tiagocoutinho , do you thing this is still necessary? I can appove your PR then wait for the doc.

@tiagocoutinho
Copy link
Contributor Author

tiagocoutinho commented Mar 24, 2022

Hi @laurent-claustre ,
6 months ago I have left ALBA so I am no longer working on the project that could use this feature.
To be honest I don't have time inspect and say if this PR is still relevant.

There could be some use for it in https://github.com/tiagocoutinho/lima-toolbox but that would require some backward incompatible changes (not blocking since I was the only one using it :-) and since I left ALBA I am not working on it anymore... unless someone asks me for some freelance work on it ;-)

@rhomspuron, @jairomoldes, @fbecheri you're the only ones I know at ALBA that could possibly profit from this. If you have interest in this please let lima team know

On my side you could reject this PR if nobody else is interested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants