-
Notifications
You must be signed in to change notification settings - Fork 1
DLS lightweight-venv + python -m setup bdist_wheel doesn't work #7
Comments
As reported in DiamondLightSource/pythonSoftIOC#31 |
Could you use e.g. |
You could do, but you still need the import for |
I played around with this for a while
but, couldn't get it to work, I think at least partially for this reason. It is frustrating that there isn't a better way to do this... |
The third party imports issue is the main problem here. That's why I put I did originally try an execfile approach, which I might have a go with again... |
The thing is, this works fine (note that you do have to have the full path - I guess this allows it to be found without relying on
It is only when I add the cmdclass to |
At the moment |
I have split them into classes, currently. See here if you're intersted: /dls_sw/work/python3/RHEL7-x86_64/odinprocservcontrol/odinprocservcontrol/_version_git.py |
Ok, but even if we got that working, it would still try and import |
Do you know if it is expected behaviour that importing |
It looks like it tries to parse AST for |
The changes required for a working
|
I don't see any way around this, and I think the majority of modules will pull in some third party import when importing the top level |
This is safer than recursing down the directory structure and avoids putting all the other modules in that dir on the path Fixes #7
At the moment in
setup.py
we find_version_git.py
by walking from the parent dir ofsetup.py
and stopping when we find a_version_git.py
:If we make a lightweight-venv then do
python -m setup bdist_wheel
then the structure whensetup.py
is called looks something like this:Sometimes
os.walk
will findother_package/_version_git.py
instead ofmy_package/_version_git.py
. A more correct approach would be to only look one directory deep:The text was updated successfully, but these errors were encountered: