Merge branch 'devel' of vmgit.ipr.univ-rennes1.fr:epsi/msspec_python3 into devel
epsi-builds/msspec_python3/pipeline/head This commit looks good Details

This commit is contained in:
Sylvain Tricot 2021-01-25 14:03:02 +01:00
commit 4096a5f738
6 changed files with 60 additions and 64 deletions

30
Dockerfile Normal file
View File

@ -0,0 +1,30 @@
# Get the base Python image
FROM python:3.7
# Set the working directory in the container
RUN useradd -ms /bin/bash msspec
WORKDIR /code
# Fetch the code
COPY fresh .
ENV LANG=en_US.UTF-8
ENV PATH=/opt/bin:$PATH
# Install system dependencies
RUN apt-get update && \
apt-get install -y virtualenv gfortran locales python3-wxgtk4.0
# Reconfigure the locales
RUN sed -i -e "s/# $LANG.*/$LANG UTF-8/" /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=$LANG
# Install msspec
RUN make install VERBOSE=1 INSTALL_PREFIX=/opt
#RUN echo "/usr/lib/python3/dist-packages" > /opt/src/msspec_venv_*/lib/python3.7/site-packages/system_packages.pth
USER msspec
ENTRYPOINT ["msspec"]

View File

@ -1,38 +1,38 @@
include src/options.mk include src/options.mk
PYTHON = python PYTHON = python
PYMAJ = 3
PYMIN = 6
# Checking Python version # Checking Python path and version
PYTHON_EXE := $(shell command -v $(PYTHON) 2> /dev/null) PYTHON_EXE := $(shell command -v $(PYTHON) 2> /dev/null)
ifndef PYTHON_EXE ifndef PYTHON_EXE
$(error Unable to find the $(PYTHON) executable!) $(error Unable to find the $(PYTHON) executable!)
endif endif
PYTHON_VERSION_MAJOR := $(shell $(PYTHON_EXE) --version 2>&1 | cut -d" " -f2 | cut -d. -f1) ifeq ($(shell $(PYTHON_EXE) -c "import sys; exit(sys.version_info >= ($(PYMAJ),$(PYMIN)))"; echo $$?),0)
PYTHON_VERSION_MINOR := $(shell $(PYTHON_EXE) --version 2>&1 | cut -d" " -f2 | cut -d. -f2) $(error Python version >= $(PYMAJ).$(PYMIN) is needed!)
ifneq ($(shell test $(PYTHON_VERSION_MAJOR) -ge 3 -a $(PYTHON_VERSION_MINOR) -ge 6; echo $$?),0)
$(error Python version >= 3.6 is needed!)
endif endif
.PHONY: pybinding install devel venv doc clean .PHONY: pybinding install devel venv doc clean
pybinding: pybinding: venv
@+$(MAKE) -C src pybinding @+. $(VENV_PATH)/bin/activate && $(MAKE) -C src pybinding
venv: venv:
virtualenv --python=$(PYTHON_EXE) --prompt="(msspec-$(VERSION)) " $(VENV_PATH) @virtualenv --python=$(PYTHON_EXE) --prompt="(msspec-$(VERSION)) " $(VENV_PATH)
. $(VENV_PATH)/bin/activate && pip install --upgrade pip && pip install -r src/pip.freeze @. $(VENV_PATH)/bin/activate && pip install --upgrade pip && pip install -r src/pip.freeze
install: pybinding venv install: pybinding
@+$(MAKE) -C src sdist @+. $(VENV_PATH)/bin/activate && $(MAKE) -C src sdist
@+$(MAKE) -C src frontend @+. $(VENV_PATH)/bin/activate && $(MAKE) -C src frontend
@. $(VENV_PATH)/bin/activate && pip install src/dist/msspec-$(VERSION).tar.gz @+. $(VENV_PATH)/bin/activate && pip install src/dist/msspec-$(VERSION).tar.gz
@echo "Do not forget to check that $(INSTALL_PREFIX)/bin is set in your \$$PATH"
devel: VENV_PATH = ./_venv devel: VENV_PATH = ./_venv
@ -52,3 +52,7 @@ doc:
clean:: clean::
@+$(MAKE) -C src/ clean @+$(MAKE) -C src/ clean
help:
@echo "Top Makefile help message"

View File

@ -16,8 +16,10 @@ dist/msspec-$(VERSION).tar.gz: VERSION
$(INSTALL_PREFIX)/bin/msspec: msspec.sh.template VERSION $(INSTALL_PREFIX)/bin/msspec: msspec.sh.template VERSION
@echo "Installing frontend command..." @echo "Installing frontend command..."
@cat $< | sed 's/__VERSION__/$(VERSION)/' > $@ @mkdir -p $(dir $@)
@chmod u+x $@ @cat $< | sed -e 's/__VERSION__/$(VERSION)/' -e 's#__VENV_PATH__#$(VENV_PATH)#' > $@
#@cat $< | sed 's/__VERSION__/$(VERSION)/' > $@
@chmod 755 $@
pybinding: pybinding:
@ -56,5 +58,5 @@ clean::
help: help:
@echo "help message" @echo "SRC Makefile help message"

View File

@ -3,7 +3,7 @@
SCRIPT_PATH="$0" SCRIPT_PATH="$0"
SCRIPT_NAME=$(basename "$SCRIPT_PATH") SCRIPT_NAME=$(basename "$SCRIPT_PATH")
VERSION="__VERSION__" VERSION="__VERSION__"
VENV_PATH="$HOME/.local/src/msspec_venv_$VERSION" VENV_PATH="__VENV_PATH__"
# Check venv path # Check venv path
if ! [ -d "$VENV_PATH" ]; then if ! [ -d "$VENV_PATH" ]; then

View File

@ -69,6 +69,9 @@ OBJS = $(addprefix $(BUILDDIR)/, $(patsubst %.f,%.o, $(filter-out $(MAIN_F), $(S
.PHONY: clean obj all info .PHONY: clean obj all info
help:
info: info:
@echo "Compilation information for msspec $(VERSION)" @echo "Compilation information for msspec $(VERSION)"
@echo "FC : $(FC)" @echo "FC : $(FC)"

View File

@ -1,57 +1,14 @@
alabaster==0.7.12
ase==3.19.1 ase==3.19.1
Babel==2.8.0
backcall==0.1.0
certifi==2020.4.5.1
chardet==3.0.4
coverage==5.1
cycler==0.10.0
decorator==4.4.2
docutils==0.16
h5py==2.10.0 h5py==2.10.0
idna==2.9
imagesize==1.2.0
ipython==7.13.0 ipython==7.13.0
ipython-genutils==0.2.0
jedi==0.17.0
Jinja2==2.11.2
lxml==4.5.0 lxml==4.5.0
MarkupSafe==1.1.1
matplotlib==2.1.1 matplotlib==2.1.1
numpy==1.18.2 numpy==1.18.2
packaging==20.3
parso==0.7.0
pex==2.1.11
pexpect==4.8.0
pickleshare==0.7.5
Pillow==7.1.1
Pint==0.11 Pint==0.11
pip==20.0.2 #pip==20.0.2
prompt-toolkit==3.0.5
ptyprocess==0.6.0
pycairo==1.19.1 pycairo==1.19.1
Pygments==2.6.1
pyparsing==2.4.7
python-dateutil==2.8.1
pytz==2019.3
requests==2.23.0
scipy==1.4.1 scipy==1.4.1
scons==3.1.2
setuptools==46.1.3
setuptools-scm==3.5.0 setuptools-scm==3.5.0
six==1.14.0
snowballstemmer==2.0.0
spglib==1.14.1.post0
Sphinx==3.0.1
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==1.0.3
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.4
terminaltables==3.1.0 terminaltables==3.1.0
traitlets==4.3.3 #wxPython@https://extras.wxpython.org/wxPython4/extras/linux/gtk3/debian-10/wxPython-4.1.0-cp37-cp37m-linux_x86_64.whl
urllib3==1.25.8 #wxPython@https://extras.wxpython.org/wxPython4/extras/linux/gtk3/debian-9/wxPython-4.0.7.post2-cp35-cp35m-linux_x86_64.whl
wcwidth==0.1.9
wheel==0.34.2
#wxPython@https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04/wxPython-4.0.7.post2-cp36-cp36m-linux_x86_64.whl