-
Notifications
You must be signed in to change notification settings - Fork 7
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
Adding support for editable namespace packages #29
Conversation
@Thf772 Are you able to enable github actions runs in your personal repository? I don't want my having to (re)approve GHA runs to be an impediment to you getting feedback. |
I've tried setting it up, but apparently I can't run it manually so I don't know if it'll work Edit: it's working, the workflow is running |
Understood. I will try to check more often to see when GH insists that I re-approve... |
Thanks, apparently workflows work in my fork so it should not be as important. Thank you for the help so far. Also apparently you were right about |
Alright, finally I managed to fix the workflow completely. There was another weird bug and I had to dig far too deep and too greedily into Setuptools code to understand... Basically: when building in editable mode, |
An masterful summary of my entire experience with setuptools! |
With newer setuptools that is coming via https://lab.nexedi.com/nexedi/slapos/-/merge_requests/1550 (44.1.1 -> 67.8.0) we will need a fix from setuptools-dso 2.10 to handle `python setup develop` well: Previously with setutools-dso 2.9 and setuptools 67.8.0 built shared libraries were not copied back into the working tree upon develop install which made anything using pygolang to fail as e.g. $ ../bin/gpython Traceback (most recent call last): File ".../../bin/gpython", line 20, in <module> sys.exit(gpython.main()) File ".../pygolang/gpython/__init__.py", line 456, in main pymain(argv, init) File ".../pygolang/gpython/__init__.py", line 223, in pymain init() File ".../pygolang/gpython/__init__.py", line 447, in init import golang File ".../pygolang/golang/__init__.py", line 41, in <module> from golang._gopath import gimport # make gimport available from golang File ".../pygolang/golang/_gopath.py", line 65, in <module> from golang import sync File ".../pygolang/golang/sync.py", line 36, in <module> from golang._sync import \ ImportError: liblibgolang.so.0.1: cannot open shared object file: No such file or directory See epics-base/setuptools_dso#29 (comment) and epics-base/setuptools_dso@2fdf75f2 for details. P.S. NOTE that changing version of a setup-egg required egg currently does _not_ force a rebuild. In other words pushing this change into testnodes won't make pygolang t o be rebuilt at all. I think this is simply a bug in slapos.buildout to fix. /reported-by @xavier_thompson /cc @jerome, @tomo, @Kazuhiko
With newer setuptools that is coming via https://lab.nexedi.com/nexedi/slapos/-/merge_requests/1550 (44.1.1 -> 67.8.0) we will need a fix from setuptools-dso 2.10 to handle `python setup develop` well: Previously with setutools-dso 2.9 and setuptools 67.8.0 built shared libraries were not copied back into the working tree upon develop install which made anything using pygolang to fail as e.g. $ ../bin/gpython Traceback (most recent call last): File ".../../bin/gpython", line 20, in <module> sys.exit(gpython.main()) File ".../pygolang/gpython/__init__.py", line 456, in main pymain(argv, init) File ".../pygolang/gpython/__init__.py", line 223, in pymain init() File ".../pygolang/gpython/__init__.py", line 447, in init import golang File ".../pygolang/golang/__init__.py", line 41, in <module> from golang._gopath import gimport # make gimport available from golang File ".../pygolang/golang/_gopath.py", line 65, in <module> from golang import sync File ".../pygolang/golang/sync.py", line 36, in <module> from golang._sync import \ ImportError: liblibgolang.so.0.1: cannot open shared object file: No such file or directory See epics-base/setuptools_dso#29 (comment) and epics-base/setuptools_dso@2fdf75f2 for details. P.S. NOTE that changing version of a setup-egg required egg currently does _not_ force a rebuild. In other words pushing this change into testnodes won't make pygolang t o be rebuilt at all. I think this is simply a bug in slapos.buildout to fix. /reported-by @xavier_thompson /cc @jerome, @tomo, @Kazuhiko /reviewed-on https://lab.nexedi.com/nexedi/slapos/-/merge_requests/1585
Namespace packages installed as editable have no
__file__
which causes a crash when installing Extensions and DSOs that depend on other DSOs located insde them. Now instead of only looking at the root package to find a DSO, we look for the first package with a non-None__file__
.Fixes #28