Generalizing the CentOS 8 Build

  • to get going on centos 7:
    • use centos8 branch for build scripts
    • use version_centos8.xml
    • build on ifarm1901
    • see what blows up: it is evio trying to use scons-3, which does not exist on centos 7. stop here.
  • use python_chooser branch of build_scripts
    • build on centos 8
    • python_chooser branch of build_scripts starts with master configuration
    • must redo changes made on centos8 branch to put them on python_chooser branch, but solution known by comparing master branch with centos8 branch. solution will be different in cases where python_chooser.sh can be used.
    • work on ifarm1901 in /scratch/marki/c8_4
      • singularity shell –cleanenv –bind /scratch $DIST/gluex_centos-8.2.2004.sif
  • There are three options for implementing the three versions of SCons-related files that are needed (which can be thought of as CentOS 7, Fedora 32, and CentOS 8):
    • 1. Implement three versions of the files where necessary. For example sbms2.py, sbms3a.py, and sbms3b.py. Here sbms.py is actually not in repository, need to make link to make real one that is used. Disadvantage is that any change needs to be made in three places.
    • 2. Write the scripts with C-preprocessor-like commands to keep all versions in a single file. Example of command that creates a combined file of P2 and P3 source with merge markings:
diff -e SConstruct SConstruct3 | grep c$ | sed s/c/d/ > ed_script.tmp
echo w SConstruct.gap >> ed_script.tmp
echo q >> ed_script.tmp
ed SConstruct < ed_script.tmp
diff3 -m SConstruct SConstruct.gap SConstruct3 > SConstruct.raw
  • (“three options” continued)
    • 2 (continued). This does not actually work with the C-preprocessor because of changes to the spacing. This is a no-go with the indentation-has-meaning paradigm of Python. There might be a way to do this with m4, but did not get to an understanding of an m4 solution.
    • 3. Futurize the Python code. Actually pasteurize it.
  • Pasteurization is the way forward!
    • pasteurize the Python 3 version of the files and give them the nominal file name, i.e., no multiple versions of the same file, i.e., no sbms2.py, no sbms3.py, only sbms.py.
    • The result of pasteurization is the same on RHEL7 and Fedora 32.
    • By-hand editing needed: os.getcwdu, which results from pasteurization, needs to be changed back to os.getcwd.

Leave a comment