-
Notifications
You must be signed in to change notification settings - Fork 61
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
general: switch from flat layout to src layout #414
Conversation
this is long overdue and much friendlier to python tooling ecosystem should be backwards compatible with existing editable installs, with a warning to reinstall properly see #316
Nice, will probably update my modules accordingly at some point. I've been half understanding how all the python tooling has changed to (basically) not support editable installs, so to confirm, this is still a namespace package, but its no longer using editable to allow you to override. Is there a strategy to allow overriding modules, how does discovery work for conflicting files, is it just the one you installed latest overrides the old files? |
Yep, still namespace package! Nono, this would still be editable! If you encounter any problems with editable setup after this change, please let me know! If anything this should work better with editable installs now (this is one of the reasons I did a change).
since it's dynamic, it's hard for tooling (in particular for mypy) to pick it up With src layout is used, there is only a static
So this makes it much easier to integrate with tooling without executing code dynamically. Relevant discussions: python/mypy#13392 (comment) pypa/setuptools#3518 |
karlicoss#414 additional directory changes: https://github.com/karlicoss/HPI/tree/master/src/my/reddit https://github.com/karlicoss/HPI/tree/master/src/my/fbmessenger https://github.com/karlicoss/HPI/blob/master/src/my/lastfm.py https://github.com/karlicoss/HPI/blob/master/src/my/bluemaestro.py
GitHub doesn't follow the symbolic link: karlicoss#414 additional directory changes: https://github.com/karlicoss/HPI/tree/master/src/my/reddit https://github.com/karlicoss/HPI/tree/master/src/my/fbmessenger https://github.com/karlicoss/HPI/blob/master/src/my/lastfm.py https://github.com/karlicoss/HPI/blob/master/src/my/bluemaestro.py
GitHub doesn't follow the symbolic link: #414 additional directory changes: https://github.com/karlicoss/HPI/tree/master/src/my/reddit https://github.com/karlicoss/HPI/tree/master/src/my/fbmessenger https://github.com/karlicoss/HPI/blob/master/src/my/lastfm.py https://github.com/karlicoss/HPI/blob/master/src/my/bluemaestro.py
Gotcha, can confirm I it creates a file like as a temp fix I can prepend my own repos in that file:
I suppose this would be something maybe I could edit reorder_editable to hack around (so that things like for now this is ok (will just not re-install all the time), but will try and figure out something else -- it may have to be a whole separate command from reorder_editable because I dont want to break backwards compatability for locating the editable files. |
Just to confirm, it's no different from before Currently I'm just using an extra |
Yeah, I dont see any major breaks yet, ran a I think most of the reorder_editable logic can remain the same, it may just be as easy of a fix of pointing it at a |
Yeah, I've been thinking about it the other day and tried something else as an experiment:
And it seems to work as expected? Not sure if there is anything I'm missing, so will test it more.
|
this is long overdue and much friendlier to python tooling ecosystem
should be backwards compatible with existing editable installs, with a warning to reinstall properly
see #316