-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cylc command error when running in Anaconda or virtualenv (or both) #2991
Comments
If we drop the git suffix, and use the version like |
And even though dropping the git suffix will solve part of the problem, the test battery also uses the So that one is also failing and blocking |
|
That part appears to be simpler to fix @hjoliver . What about this one https://github.com/cylc/cylc/blob/f5dbc9653353438129c3769ae1d421fde0e85c0f/lib/cylc/profiling/__init__.py#L26? It is also failing. It calls Unless there was another function to try - and fail nicely - to retrieve the |
Our built-in |
Ahh! That would explain it! Thanks @hjoliver . Will look at this tomorrow with more calm and look around the code to see if there's an easy solution that does not break the profile-battery. |
Apologies for the profile battery! I'll sort it out one day... |
No apologies needed @oliver-sanders , I spent most of my day reading its code today, and the great comments. It is a very interesting piece of software within Cylc. I think the issue happened more due to the way the version is used in Cylc. I found a way to fix the profile battery, but it requires to change how Cylc version is retrieved/stored. Might need your help reviewing what I've done to see if that makes sense. |
…and update documentation
…and update documentation
When Cylc is packaged with
setuptools
, and we execute thecylc
entry command, it may get confused and fail, depending on the values of the$PATH
variable.In my case, I have copied
./usr/bin/cylc
to~/bin/cylc
. And if that script is the first match forcylc
, then everything works.Now, after enabling Anaconda Python 3, creating a virtualenv, and installing with the code from #2990 , running
cylc version --long
fails with:The issue is that the function to find Cylc's version uses the location of the
cylc
utility to guess where is Cylc's home. Then tries to open thegit
folder to confirm it exists, and finally executes the git command to retrieve the version.But when we create the scripts via
setuptools
,cylc
gets installed in the user PATH automatically. And in the case where the user has Anaconda Python, it gets installed in some directory within Anaconda installation. Or if using virtualenv, it might be within thevenv
folder, added to the$PATH
automagically too.This is breaking the Travis-CI tests in the
setup.py
pull request, and caused the unit tests to fail in my environment for a while until I realized what was going on.The text was updated successfully, but these errors were encountered: