Skip to content

Commit

Permalink
avoid legacy compilation failures on recent ubuntu machines that only…
Browse files Browse the repository at this point in the history
… have python3-config
  • Loading branch information
akohlmey committed Aug 12, 2023
1 parent eda6a39 commit dd18de1
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/python/Makefile.lammps
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Settings that the LAMMPS build will import when this package library is used
# See the README file for more explanation
ifeq ($(shell type python3 >/dev/null 2>&1; echo $$?), 0)
PYTHON=python3
PYTHONCONFIG = python3-config
else
PYTHONCONFIG = python-config
PYTHON=python
endif


python_SYSINC = $(shell which python-config > /dev/null 2>&1 && python-config --includes || :)
python_SYSLIB = $(shell which python-config > /dev/null 2>&1 && python-config --ldflags --embed > /dev/null 2>&1 && python-config --ldflags --embed || (which python-config > /dev/null 2>&1 && python-config --ldflags || :) )
python_SYSINC = $(shell which $(PYTHONCONFIG) > /dev/null 2>&1 && $(PYTHONCONFIG) --includes || :)
python_SYSLIB = $(shell which $(PYTHONCONFIG) > /dev/null 2>&1 && $(PYTHONCONFIG) --ldflags --embed > /dev/null 2>&1 && $(PYTHONCONFIG) --ldflags --embed || (which $(PYTHONCONFIG) > /dev/null 2>&1 && $(PYTHONCONFIG) --ldflags || :) )
python_SYSPATH =
PYTHON=python
1 change: 1 addition & 0 deletions tools/singularity/ubuntu20.04.def
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ From: ubuntu:20.04
python3-setuptools \
python3-virtualenv \
python3-venv \
python-is-python3 \
rsync \
ssh \
texlive \
Expand Down
1 change: 1 addition & 0 deletions tools/singularity/ubuntu20.04_amd_rocm.def
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ From: ubuntu:20.04
python3-setuptools \
python3-virtualenv \
python3-venv \
python-is-python3 \
rsync \
ssh \
vim-nox \
Expand Down
1 change: 1 addition & 0 deletions tools/singularity/ubuntu20.04_gpu.def
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ From: ubuntu:20.04
python3-setuptools \
python3-virtualenv \
python3-venv \
python-is-python3 \
rsync \
ssh \
vim-nox \
Expand Down
1 change: 1 addition & 0 deletions tools/singularity/ubuntu20.04_intel_opencl.def
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ From: ubuntu:20.04
python3-setuptools \
python3-virtualenv \
python3-venv \
python-is-python3 \
rsync \
ssh \
vim-nox \
Expand Down
1 change: 1 addition & 0 deletions tools/singularity/ubuntu20.04_nvidia.def
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ From: nvidia/cuda:11.6.2-devel-ubuntu20.04
python3-setuptools \
python3-virtualenv \
python3-venv \
python-is-python3 \
rsync \
ssh \
vim-nox \
Expand Down
1 change: 1 addition & 0 deletions tools/singularity/ubuntu20.04_oneapi.def
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ From: ubuntu:20.04
python3-setuptools \
python3-virtualenv \
python3-venv \
python-is-python3 \
rsync \
ssh \
texlive \
Expand Down
1 change: 1 addition & 0 deletions tools/singularity/ubuntu22.04.def
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ From: ubuntu:22.04
python3-setuptools \
python3-virtualenv \
python3-venv \
python-is-python3 \
rsync \
ssh \
texlive \
Expand Down

0 comments on commit dd18de1

Please sign in to comment.