ck-env icon indicating copy to clipboard operation
ck-env copied to clipboard

parse_version() is called twice (instead of once)

Open ens-lg4 opened this issue 7 years ago • 1 comments

When detecting soft entries it seems that their version-detection code runs twice with the same input parameters (and thus with the same results). Here is the output of one full detection run :

$ ck detect soft --tags=lib,pyquil

  Searching for Rigetti pyQuil library (pyquil/__init__.py) to automatically register in the CK - it may take some time, pl  Searching for Rigetti pyQuil library (pyquil/__init__.py) to automatically register in the CK - it may take some time, pl  Searching for Rigetti pyQuil library (pyquil/__init__.py) to automatically register in the CK - it may take some time, pl  Searching for Rigetti pyQuil library (pyquil/__init__.py) to automatically register in the CK - it may take some time, please wait ...

    * Searching in /usr ...
    * Searching in /opt ...
    * Searching in /usr/local/Cellar ...
    * Searching in /Users/lg4 ...
    * Searching in /Users/lg4/Library/Python ...

  Search completed in 57.9 secs. Found 1 target files (may be pruned) ...

  Detecting and sorting versions (ignore some work output) ...


  Prepared CMD to detect version: PYTHONPATH=/Users/lg4/Library/Python/3.6/lib/python/site-packages python3 -c 'import pyquil ; print(pyquil.__version__)' >/var/folders/26/xh863tq54n59h5rnrk3c7mtw0000gn/T/B7mJmI ...

Executing "bash -c "chmod 755 /var/folders/26/xh863tq54n59h5rnrk3c7mtw0000gn/T/tmp-GTVbSa.sh; . /var/folders/26/xh863tq54n59h5rnrk3c7mtw0000gn/T/tmp-GTVbSa.sh"" ...

Version detected: 1.9.0
    * /Users/lg4/Library/Python/3.6/lib/python/site-packages/pyquil/__init__.py   (Version 1.9.0)


  Registering in the CK (/Users/lg4/Library/Python/3.6/lib/python/site-packages/pyquil/__init__.py) ...

  Software entry found: lib.pyquil (7a688556e84d7c47)

  Attempting to detect version automatically (if supported) ...

  Prepared CMD to detect version: PYTHONPATH=/Users/lg4/Library/Python/3.6/lib/python/site-packages python3 -c 'import pyquil ; print(pyquil.__version__)' >/var/folders/26/xh863tq54n59h5rnrk3c7mtw0000gn/T/07h7jr ...

Executing "bash -c "chmod 755 /var/folders/26/xh863tq54n59h5rnrk3c7mtw0000gn/T/tmp-oyMCqQ.sh; . /var/folders/26/xh863tq54n59h5rnrk3c7mtw0000gn/T/tmp-oyMCqQ.sh"" ...

Version detected: 1.9.0

  Detected version: 1.9.0

Searching if environment already exists using:
  * Tags: lib,quantum,rigetti,pyquil,host-os-macos-64,target-os-macos-64,64bits,v1,v1.9,v1.9.0

    Environment with above tags is not yet registered in CK ...

Environment entry added (58b160288a164bc2)!
  Successfully registered with UID: 58b160288a164bc2

ens-lg4 avatar Nov 30 '18 14:11 ens-lg4

Hmm, strange indeed. Need to check ...

gfursin avatar Nov 30 '18 23:11 gfursin