labscript-suite / labscript-utils

Shared modules used by the 𝘭𝘒𝘣𝘴𝘀𝘳π˜ͺ𝘱𝘡 𝘴𝘢π˜ͺ𝘡𝘦. Includes a graphical exception handler, debug tools, configuration management, cross platform filepath conversions, unit conversions and custom GUI widgets.
http://labscriptsuite.org
Other
2 stars 45 forks source link

Packaging changes #30

Closed chrisjbillington closed 4 years ago

chrisjbillington commented 4 years ago

This makes labscript_utils a regular Python package, as well as adding code to build conda packages.

This can be pip installed with:

pip install --index-url https://test.pypi.org/simple/ labscript_utils

However, one will get error messages upon trying to use any of the submodules that rely on the labscript suite profile directory or labconfig, due to the labscript suite profile directory not being set up.

Creating the labscript suite profile is currently done by the metapackage that the installer is evolving into (I'm working on it at the moment). So this package is of limited usefulness until that package exists! However, since the path to the labscript suite profile directory will now be hard-coded, it is arguable that labscript_utils should create it on import if it does not exist, instead of the metapackage. I am leaning in that direction, but I would like to see this merged first to help cleanly separate mere repackaging of the existing package from that change.

chrisjbillington commented 4 years ago

Ok, so I've made it so that the labscript profile is created at first import. There is also a command line program you can run to create a profile.

Yet to do is to automate running this script at install time so that the profile is created immediately upon installation. However, just a few kinks to work out here so that the profile is created in the user's home directory on unix even if they are running with sudo.

But merging this so future work can resume on top