remove compatibility for compiling LAMMPS with Python 2.x and Python 3.5 and older
This commit is contained in:
@ -1,7 +0,0 @@
|
||||
# Settings that the LAMMPS build will import when this package library is used
|
||||
# See the README file for more explanation
|
||||
|
||||
python_SYSINC = $(shell which python2-config > /dev/null 2>&1 && python2-config --includes || (which python-config > /dev/null 2>&1 && python-config --includes || :))
|
||||
python_SYSLIB = $(shell which python2-config > /dev/null 2>&1 && python2-config --ldflags || (which python-config > /dev/null 2>&1 && python-config --ldflags || :))
|
||||
python_SYSPATH =
|
||||
PYTHON=$(shell which python2 > /dev/null 2>&1 && echo python2 || echo python)
|
||||
@ -9,30 +9,29 @@ installation. If needed, you can copy one of the other provided
|
||||
Makefile.lammps.* files to to Makefile.lammps before building
|
||||
LAMMPS itself.
|
||||
|
||||
The files Makefile.lammps.python2 and Makefile.lammps.python3 are
|
||||
similar to the default file, but meant for the case that both,
|
||||
python 2 and python 3, are installed simultaneously and you want
|
||||
to prefer one over the other. If neither of these files work, you
|
||||
may have to create a custom Makefile.lammps file suitable for
|
||||
the version of Python on your system. To illustrate, these are
|
||||
example settings from the Makefile.lammps.python2.7 file:
|
||||
The file Makefile.lammps.python3 is similar to the default file, but
|
||||
meant for the case that both, python 2 and python 3, are installed
|
||||
simultaneously. LAMMPS only supports python 3. If neither of these
|
||||
files work, you may have to create a custom Makefile.lammps file
|
||||
suitable for the version of Python on your system. To illustrate, these
|
||||
are example settings from the Makefile.lammps.python3.13 file:
|
||||
|
||||
python_SYSINC = -I/usr/local/include/python2.7
|
||||
python_SYSLIB = -lpython2.7 -lnsl -ldl -lreadline -ltermcap -lpthread -lutil -lm
|
||||
python_SYSPATH =
|
||||
PYTHON=python2.7
|
||||
python_SYSINC = -I/usr/local/include/python3.13
|
||||
python_SYSLIB = -lpython3.13 -ldl -lm
|
||||
python_SYSPATH = -L/usr/lib64
|
||||
PYTHON=python3.13
|
||||
|
||||
python_SYSINC refers to the directory where Python's Python.h file is
|
||||
found. LAMMPS includes this file.
|
||||
|
||||
python_SYSLIB refers to the libraries needed to link to from an
|
||||
application (LAMMPS in this case) to "embed" Python in the
|
||||
application. The Python library itself is listed (-lpython2.7) are
|
||||
application. The Python library itself is listed (-lpython3.13) are
|
||||
are several system libraries needed by Python.
|
||||
|
||||
python_SYSPATH refers to the path (e.g. -L/usr/local/lib) where the
|
||||
Python library can be found. You may not need this setting if the
|
||||
path is already included in your LD_LIBRARY_PATH environment variable.
|
||||
path is already included in your LIBRARY_PATH environment variable.
|
||||
|
||||
PYTHON is the name of the python interpreter. It is used for
|
||||
installing the LAMMPS python module with "make install-python"
|
||||
@ -45,7 +44,7 @@ run in embedded mode on your machine.
|
||||
|
||||
Here is what this Python doc page says about it:
|
||||
|
||||
https://docs.python.org/2/extending/embedding.html#compiling-and-linking-under-unix-like-systems
|
||||
https://docs.python.org/3/extending/embedding.html#compiling-and-linking-under-unix-like-systems
|
||||
|
||||
"It is not necessarily trivial to find the right flags to pass to your
|
||||
compiler (and linker) in order to embed the Python interpreter into
|
||||
|
||||
Reference in New Issue
Block a user