electrumsv / headless-sdk

Produce bundled portable python distributions ready for executing all SDK components in a fully self-contained way
2 stars 2 forks source link

Redundant copies of Python libraries #6

Open rt121212121 opened 2 years ago

rt121212121 commented 2 years ago

All the Python dependencies for the components appear to be installed in the python\site-packages directory, as well as in the individual component SDK_HOME_DIR\python_libs sub-directories.

e.g. Duplicate python\site-packages\electrumsv_node and SDK_HOME_DIR\python_libs\node\electrumsv_node

AustEcon commented 2 years ago

Yes I think I should be able to basically do a second pass in the headless-sdk pipeline to "de-duplicate" any python packages.

Basically it would scan all of the python_lib directories and site-packages directory and if there are no conflicting version numbers, it could safely move the package from all of the python_lib dirs -> common site-packages directory (thereby de-duplicating).

For any packages where there is a version conflict they would be left in the python_lib directory (so each python app is still launched with the correct version of the package).

This was a necessary evil because python doesn't have any other way of running different package versions for the same python instance.