From 5e35c676dcf3f9d1a30f1b7eb5cf9eb64c1216ca Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Wed, 23 Dec 2020 11:02:18 -0500 Subject: Modify jwst specification in environment dump to use a pip release by default. (#134) --- jwstdp/utils/jwst_delivery_prep | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'jwstdp/utils') 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) -- cgit