diff options
author | Matt Rendina <rendinam@users.noreply.github.com> | 2020-12-23 11:02:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-23 11:02:18 -0500 |
commit | 5e35c676dcf3f9d1a30f1b7eb5cf9eb64c1216ca (patch) | |
tree | e1e5e039b307dae28cd3b5db5b909bf26736dfbe /jwstdp | |
parent | 4d04a752546db35c4f42a1519af58e8ad95b02f6 (diff) | |
download | astroconda-releases-testing-5e35c676dcf3f9d1a30f1b7eb5cf9eb64c1216ca.tar.gz |
Modify jwst specification in environment dump to use a pip release by default. (#134)
Diffstat (limited to 'jwstdp')
-rwxr-xr-x | jwstdp/utils/jwst_delivery_prep | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/jwstdp/utils/jwst_delivery_prep b/jwstdp/utils/jwst_delivery_prep index 742adec..8183eff 100755 --- a/jwstdp/utils/jwst_delivery_prep +++ b/jwstdp/utils/jwst_delivery_prep @@ -15,7 +15,7 @@ import re import configparser -def modify_dep(line, text): +def modify_dep(line, text, jwstpip=True): '''Replace value appearing after the last '@' in the pip spec line for the 'jwst' package with the provided text.''' line = line.strip() @@ -23,9 +23,12 @@ def modify_dep(line, text): if line[0:2] == '-e': print('editable install dependency spec') if line[0:4] == 'jwst': - delim = line.rfind('@') - line = line[:delim+1] - line = line + text + if jwstpip: + line = f'jwst=={text}' + else: + delim = line.rfind('@') + line = line[:delim+1] + line = line + text return(line) |