aboutsummaryrefslogtreecommitdiff
path: root/jwstdp
diff options
context:
space:
mode:
authorMatt Rendina <rendinam@users.noreply.github.com>2020-12-23 11:02:18 -0500
committerGitHub <noreply@github.com>2020-12-23 11:02:18 -0500
commit5e35c676dcf3f9d1a30f1b7eb5cf9eb64c1216ca (patch)
treee1e5e039b307dae28cd3b5db5b909bf26736dfbe /jwstdp
parent4d04a752546db35c4f42a1519af58e8ad95b02f6 (diff)
downloadastroconda-releases-5e35c676dcf3f9d1a30f1b7eb5cf9eb64c1216ca.tar.gz
Modify jwst specification in environment dump to use a pip release by default. (#134)
Diffstat (limited to 'jwstdp')
-rwxr-xr-xjwstdp/utils/jwst_delivery_prep11
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)