Skip to content

A couple of necessary changes required to allow TIRL to be built as a python/conda package

Paul McCarthy requested to merge paulmc/tirl:mnt/adjust-build into master
  • The tirl package cannot be imported in setup.py because setup.py is executed at build time - when setup.py is executed, tirl will not have been installed into the environment in which setup.py is being executed, and there is no guarantee that it will be available on the python module path. Instead, in order to extract the TIRL version number, tirl/__init__.py is read in as a text file.

  • Move TIRL config file initialisation from setup.py into tirl/settings.py - for reasons related to the above, setup.py is executed at build time, and is almost certainly executed on a different machine than that on which TIRL will be installed and used. So it doesn't make sense to install and initialise user-specific configuration files in setup.py - this must be done at installation or run-time.

  • Move the tirl.yml and tirlscripts.yml templates into the tirl/ package directory so that they are installed into the TIRL package, and can be used for one-time initialisation of the user-specific TIRL configuration file and tirlscripts registry.

  • Use $TMPDIR rather than /tmp/ for the TIRL working directory

  • Add a pyproject.toml file so that build-time dependencies (cython and numpy) can be installed before setup.py is executed

Edited by Paul McCarthy

Merge request reports