From ea24a047445492b01500bc26e3a444c8d94d4917 Mon Sep 17 00:00:00 2001 From: Jim Chiang Date: Fri, 5 Oct 2018 16:09:45 -0700 Subject: [PATCH 1/5] py3/Stack v16 updates --- packageLists/IR2_JH_versions.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packageLists/IR2_JH_versions.txt b/packageLists/IR2_JH_versions.txt index 8ec64f8..c8c2dc9 100644 --- a/packageLists/IR2_JH_versions.txt +++ b/packageLists/IR2_JH_versions.txt @@ -1,24 +1,24 @@ [jh] harnessed-jobs = 0.4.66 -lcatr-harness = 0.15.1 -lcatr-schema = 0.5.2 +lcatr-harness = 0.16.0 +lcatr-schema = 0.6.0 lcatr-modulefiles = 0.3.1 [eups_packages] -eotest = 0.0.31 +eotest = 0.1.0 [packages] eTraveler-clientAPI = 1.7.1 metrology-data-analysis = 0.0.14 -camera-model = 0.0.7 +camera-model = 0.1.0 config_files = 0.0.12 -jh-ccs-utils = 0.0.11 +jh-ccs-utils = 0.1.0 IandT-jobs = 0.1.8 jh-dev-tools = 0.0.1 -EO-analysis-jobs = 0.0.12 +EO-analysis-jobs = 0.1.0 [dmstack] -stack_dir = /lsst/dh/software/centos7-gcc48/anaconda/py-2.7/envs/v12_0 +stack_dir = /lsst/dh/software/centos7-gcc48/stack/v16_py3 [datacat] datacatdir = /lsst/dh/software/centos7-gcc48/dev/datacat/0.4 From cf6d86451079d4d8d34d21a1607c3d3284062ddb Mon Sep 17 00:00:00 2001 From: James Chiang Date: Wed, 10 Oct 2018 21:30:17 -0700 Subject: [PATCH 2/5] python 3 compatibility + enable python executable used for lcatr package installs to be given explicitly --- bin/install.py | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/bin/install.py b/bin/install.py index fcaf2ec..bfa40b0 100755 --- a/bin/install.py +++ b/bin/install.py @@ -5,12 +5,15 @@ import shutil import subprocess import warnings -import ConfigParser +try: + import ConfigParser as configparser +except ImportError: + import configparser class Parfile(dict): def __init__(self, infile, section): super(Parfile, self).__init__() - parser = ConfigParser.ConfigParser() + parser = configparser.ConfigParser() parser.optionxform = str parser.read(infile) for key, value in parser.items(section): @@ -32,13 +35,14 @@ class Installer(object): _executable = '/bin/bash' _github_org = 'https://github.com/lsst-camera-dh' _github_elec_org = 'https://github.com/lsst-camera-electronics' - def __init__(self, version_file, inst_dir='.', + def __init__(self, version_file, inst_dir='.', python_exec='python', hj_folders=('BNL_T03',), site='BNL'): self.version_file = os.path.abspath(version_file) if inst_dir is not None: self.inst_dir = os.path.abspath(inst_dir) shutil.copy(self.version_file, os.path.join(self.inst_dir, 'installed_versions.txt')) + self.python_exec = python_exec self.hj_folders = hj_folders self.site = site self._package_dirs = None @@ -47,7 +51,7 @@ def __init__(self, version_file, inst_dir='.', self.curdir = os.path.abspath('.') try: self.pars = Parfile(self.version_file, 'jh') - except ConfigParser.NoSectionError: + except configparser.NoSectionError: pass def modules_install(self): @@ -96,7 +100,8 @@ def lcatr_install(self, package_name): version = self.pars[package_name] self.github_download(package_name, version) inst_dir = self.inst_dir - command = "cd %(package_name)s-%(version)s/; python setup.py install --prefix=%(inst_dir)s" % locals() + python_exec = self.python_exec + command = "cd %(package_name)s-%(version)s/; %(python_exec)s setup.py install --prefix=%(inst_dir)s" % locals() subprocess.call(command, shell=True, executable=self._executable) @property @@ -109,7 +114,7 @@ def package_dirs(self): package_dir = "%(package)s-%(version)s" % locals() self._package_dirs[package] = os.path.join(self.inst_dir, package_dir) - except ConfigParser.NoSectionError: + except configparser.NoSectionError: pass return self._package_dirs @@ -119,7 +124,7 @@ def stack_dir(self): try: pars = Parfile(self.version_file, 'dmstack') self._stack_dir = pars['stack_dir'] - except ConfigParser.NoSectionError: + except configparser.NoSectionError: pass return self._stack_dir @@ -128,7 +133,7 @@ def datacat_pars(self): if self._datacat_pars is None: try: self._datacat_pars = Parfile(self.version_file, 'datacat') - except ConfigParser.NoSectionError: + except configparser.NoSectionError: pass return self._datacat_pars @@ -154,7 +159,7 @@ def write_setup(self): def _eups_config(self): try: pars = Parfile(self.version_file, 'eups_packages') - except ConfigParser.NoSectionError: + except configparser.NoSectionError: return '' return '\n'.join(['setup %s' % package for package in pars]) + '\n' @@ -240,7 +245,7 @@ def jh(self): def eups_package_installer(self): try: pars = Parfile(self.version_file, 'eups_packages') - except ConfigParser.NoSectionError: + except configparser.NoSectionError: return inst_dir = self.inst_dir stack_dir = self.stack_dir.rstrip(os.path.sep) @@ -255,7 +260,7 @@ def eups_package_installer(self): def package_installer(self): try: pars = Parfile(self.version_file, 'packages') - except ConfigParser.NoSectionError: + except configparser.NoSectionError: return inst_dir = self.inst_dir for package, version in pars.items(): @@ -276,7 +281,7 @@ def jh_test(self): command = 'source ./setup.sh; python harnessed-jobs-%(hj_version)s/tests/setup_test.py' % locals() subprocess.call(command, shell=True, executable=self._executable) os.chdir(self.curdir) - except (ConfigParser.NoSectionError, KeyError): + except (configparser.NoSectionError, KeyError): pass def _ccs_download(self, package_name, package_version): @@ -376,7 +381,7 @@ def ccs(self, args, section='ccs'): self.ccs_symlink("update.py", os.path.abspath(os.path.join(self.curdir,__file__))) try: pars = Parfile(self.version_file, section) - except ConfigParser.NoSectionError: + except configparser.NoSectionError: return # Loop over the content of the [ccs] section to find either @@ -426,6 +431,7 @@ def ccs(self, args, section='ccs'): parser.add_argument('--site', type=str, default='SLAC', help='Site (SLAC, BNL, etc.)') parser.add_argument('--hj_folders', type=str, default="SLAC") + parser.add_argument('--python_exec', type=str, default='python') parser.add_argument('--ccs_inst_dir', type=str, default=None) parser.add_argument('--dev', action='store_true') @@ -440,11 +446,12 @@ def ccs(self, args, section='ccs'): args = parser.parse_args(installerArguments) installer = Installer(args.version_file, inst_dir=args.inst_dir, + python_exec=args.python_exec, hj_folders=args.hj_folders.split(), site=args.site) if args.inst_dir is not None: installer.jh() - installer.jh_test() + #installer.jh_test() if args.ccs_inst_dir is not None: installer.ccs(args) From 5d587225dfb30025274babd822d28b30c5543b18 Mon Sep 17 00:00:00 2001 From: James Chiang Date: Wed, 10 Oct 2018 21:30:41 -0700 Subject: [PATCH 3/5] promote version of lcatr-modulefiles for python 3 compatibility --- packageLists/IR2_JH_versions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packageLists/IR2_JH_versions.txt b/packageLists/IR2_JH_versions.txt index c8c2dc9..e4c3c32 100644 --- a/packageLists/IR2_JH_versions.txt +++ b/packageLists/IR2_JH_versions.txt @@ -2,7 +2,7 @@ harnessed-jobs = 0.4.66 lcatr-harness = 0.16.0 lcatr-schema = 0.6.0 -lcatr-modulefiles = 0.3.1 +lcatr-modulefiles = 0.4.0 [eups_packages] eotest = 0.1.0 From b2693ec8ea0bdaa38f1a22c6a75d7799dd6ffd6a Mon Sep 17 00:00:00 2001 From: James Chiang Date: Thu, 11 Oct 2018 17:46:27 -0700 Subject: [PATCH 4/5] BOT acq simulation code --- packageLists/IR2_JH_versions.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packageLists/IR2_JH_versions.txt b/packageLists/IR2_JH_versions.txt index e4c3c32..c12e17f 100644 --- a/packageLists/IR2_JH_versions.txt +++ b/packageLists/IR2_JH_versions.txt @@ -10,11 +10,11 @@ eotest = 0.1.0 [packages] eTraveler-clientAPI = 1.7.1 metrology-data-analysis = 0.0.14 -camera-model = 0.1.0 +camera-model = 0.1.1 config_files = 0.0.12 jh-ccs-utils = 0.1.0 -IandT-jobs = 0.1.8 -jh-dev-tools = 0.0.1 +IandT-jobs = 0.1.9 +jh-dev-tools = 0.1.0 EO-analysis-jobs = 0.1.0 [dmstack] From 0a8eaacb61f264495cb21cc4bc4aad6c253a8252 Mon Sep 17 00:00:00 2001 From: Jim Chiang Date: Mon, 22 Oct 2018 12:57:21 -0700 Subject: [PATCH 5/5] promote jh-ccs-utils to 0.1.1 with PythonBinding.py changes --- packageLists/IR2_JH_versions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packageLists/IR2_JH_versions.txt b/packageLists/IR2_JH_versions.txt index c12e17f..5c90a9d 100644 --- a/packageLists/IR2_JH_versions.txt +++ b/packageLists/IR2_JH_versions.txt @@ -12,7 +12,7 @@ eTraveler-clientAPI = 1.7.1 metrology-data-analysis = 0.0.14 camera-model = 0.1.1 config_files = 0.0.12 -jh-ccs-utils = 0.1.0 +jh-ccs-utils = 0.1.1 IandT-jobs = 0.1.9 jh-dev-tools = 0.1.0 EO-analysis-jobs = 0.1.0