Open arporter opened 4 years ago
@deardenchris I know you've played with containers. Have you used Singularity?
Hi Andy, yes I've used Singularity previously
I don't suppose you have a Singularity container handy that you could test the installation in do you?
I'd need a Singularity definition file that contains the build recipe - if such a thing exists for PSyclone, I should be able to test the installation
In the case of WSL2, it's definitely the use of root privileges that causes trouble. When I do this, psyclone
is installed to /usr/local/bin
and the config file is put in /usr/local/share/psyclone/
but the list of directories searched is:
[PWD, ~/.local/share/psyclone, /usr/share/psyclone]
If I startup python3 with sudo then I can see that sys.prefix
is /usr
. This matches with the list of directories being searched but not with where PSyclone has been installed.
Having googled, it seems there's no hard-and-fast rule as to where pip
will install system-wide packages - it depends upon the Linux distribution. The simple solution in this particular case is therefore to add sys.prefix + /share
to the list of searched locations.
Alternatively, could we do what a lot of packages do and install the config file when PSyclone is run for the first time?
Obviously, to install it we'd need to be able to find it or create it. I can imagine that we could programmatically incorporate the src of the distributed config file within PSyclone somehow. Or maybe, we don't distribute the config file separately and change to having PSyclone 'generate' it?
During the tutorial there were two cases identified where we fail to find the installed PSyclone configuration file:
In case 1., the config file is installed to
/usr/local/share/psyclone/psyclone.cfg
and PSyclone does not look there: