electronic-structure / SIRIUS

Domain specific library for electronic structure calculations
BSD 3-Clause "New" or "Revised" License
121 stars 40 forks source link

Python executable in installed files should be supplied by the caller #758

Open yurivict opened 2 years ago

yurivict commented 2 years ago

For example in apps/upf/upf_to_json python should be replaced with cmake's variable PYTHON3_COMMAND or similar.

simonpintarelli commented 2 years ago

At the moment SIRIUS only depends explicitly on python when the python module is built (cf https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/sirius/package.py). In most cases the python module isn't required. Spack has become the preferred way for installing SIRIUS. On HPC systems this would then often require to build python from source, if we would make it a hard dependency. The typical user will run the conversion script locally (input file creation) and later run the computation on a cluster. The typical end user will most likely not compile sirius locally, but run the conversion script directly from the source repo.

Is there no python exectuable called python on freebsd?

We have the conversion script in a separate repository. aiida needs it to be installable via pip. The release on pypi is currently a python module only https://pypi.org/project/upf-to-json, without an executable. I've added a python click interface https://github.com/simonpintarelli/upf_to_json/tree/click, I can make a release of this one on pypi if that would help. Then we could also add an option to cmake, to turn off the installation of the upf_to_json script (which seems to be broken on freebsd due to name of the python exectuable).

yurivict commented 2 years ago

Is there no python exectuable called python on freebsd?

No. Multiple Python versions can be installed concurrently, each having its unique name/path. FreeBSD port has some Python version as default and it has the PYTHON_CMD variable containing the path.