[Chapel Merge] install all of util/config and byte-compile python

Branch: refs/heads/master
Revision: 607ff03
Author: mppf
Log Message:

Merge pull request #17858 from mppf/install-all-of-util-config

install all of util/config and byte-compile python code before installing

Resolves #17856.

This PR takes two steps.

First, for #17856, it changes install.sh to install all of util/config
instead of particular files.

Second, this PR adjusts configure to compile the Python programs in
util/config and util/chplenv.

There are the __pycache__ directories in util/config and I was
wondering if these should be installed. These directories store the
compiled byte-code for Python programs using Python 3.

My understanding is that once the Python files are installed, the
destination might not be writable anymore. So if we would like these
Python programs to have the benefit of compiled byte-code, we need to
make sure to compile them before or during installation. This is one of
the purposes of the Python package
compileall. We
could, in theory, run it during install.sh but that script is meant to
be run as root (when installing system-wide) and we don't want to run
Python code in that setting if we don't have to. Additionally, this step
isn't really necessary for people using Chapel from a source release. So,
I adjusted configure to run a new make rule with make compile-util-python to do the byte compilation.

Note that in the context of a Debian package, the compiled byte code
should not be installed directly but should rather be generated as a
post-install action. But, since configure / make install doesn't have
a post-install action, we can't easily use that same strategy in other
settings. (A Debian package effort can just delete the compiled byte code
when creating the package and then recompile with a post-install action).

  • [x] configure, make install, and compile and run Hello works on Mac OS
    X (with Python 3)
  • [x] same steps on a SLES 12 system
  • [x] observed non-fatal "missing compileall" error with python 2.7

Reviewed by @Maxrimus and @lydia-duncan - thanks!

Modified Files:
M Makefile

M configure
M util/buildRelease/install.sh

Compare: https://github.com/chapel-lang/chapel/compare/585b7d5393c5...607ff034e333