-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Cantera/cantera
#1295Labels
documentationImprovements or additions to documentationImprovements or additions to documentationwork-in-progressAn enhancement that someone is currently working onAn enhancement that someone is currently working on
Description
Abstract
Deprecate and remove the two setup_cantera and setup_cantera.csh scripts. Deprecation to occur in v2.6, removal thereafter.
Motivation
I don't think anyone uses these scripts. They pose a minor maintenance burden on SConstruct and they possibly encourage old-school practices such as exporting PYTHONPATH to the environment.
Possible Solutions
- Deprecate both scripts by
printfstatements - Remove them after v2.6 is released
Reversion plan
This issue also exists to collect feedback from folks who are using those scripts. If you use the setup_cantera scripts, please leave a comment here indicating how you use the script! Thank you 😄
The complete setup_cantera script is copied below. The list here gives advice for each of the environment variables previously set in the script.
LD_LIBRARY_PATH: The default is for Cantera to install libraries into/usr/local/libwhich is part of the default search path for the linker and you don't need to modifyLD_LIBRARY_PATH. This environment variable controls where the linker finds libraries. It should be handled by theSConstruct/Makefile/CMAKEconfiguration for each of the examples, and you should copy one of those example files if you need this variable.PKG_CONFIG_PATH: Same asLD_LIBRARY_PATHbut applies to thepkgconfigprogram insteadPYTHON_CMD: This environment variable is used to look up which version of Python should be used to runctml_writerto convert CTI to CTML input internally. With Cantera 2.6, these input types are deprecated and will be removed after Cantera 3.0. The replacement input file format, YAML, does not require a separate converter so doesn't need Python for this purpose.PATH: Cantera no longer installs binaries as such. All the conversion scripts for input files are installed as part of the full or minimal Python interfaces and those installations are handled bypipafter Add package workflow cantera#1158.pipshould install things into a place that is on yourPATH, or if not, it will warn you to add that location to yourPATH.MATLABPATH: We recommend that you configure yourstartup.mscript to add the Cantera toolbox location.PYTHONPATH: Adds a search location for Python packages. Highly recommended not to use in a case where you're installing the Python package; instead, letpipinstall to a location that is already on Python's default search path.
Hope that helps!
The full script
if [ -z $LD_LIBRARY_PATH ]; then
LD_LIBRARY_PATH=@ct_libdir@
else
LD_LIBRARY_PATH=@ct_libdir@:$LD_LIBRARY_PATH
fi
export LD_LIBRARY_PATH
if [ -z $PKG_CONFIG_PATH ]; then
PKG_CONFIG_PATH=@ct_libdir@/pkgconfig
else
PKG_CONFIG_PATH=@ct_libdir@/pkgconfig:$PKG_CONFIG_PATH
fi
export PKG_CONFIG_PATH
PYTHON_CMD=@python_cmd@
export PYTHON_CMD
PATH=@ct_bindir@:$PATH
export PATH
if [ "@python_cmd@" != "`which python`" ]; then
alias ctpython=@python_cmd@
fi
if [ "@matlab_toolbox@" = "y" ]; then
if [ -z $MATLABPATH ]; then
MATLABPATH=@ct_matlab_dir@:@ct_matlab_dir@/1D
else
MATLABPATH=$MATLABPATH:@ct_matlab_dir@:@ct_matlab_dir@/1D
fi
export MATLABPATH
fi
if [ "@python_module_loc_sc@" != "" ]; then
if [ -z $PYTHONPATH ]; then
PYTHONPATH=@python_module_loc_sc@
else
PYTHONPATH=@python_module_loc_sc@:$PYTHONPATH
fi
fi
export PYTHONPATHReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationwork-in-progressAn enhancement that someone is currently working onAn enhancement that someone is currently working on