9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-21 11:03:29 +01:00

Simpler installation

This commit is contained in:
Anthony Scemama 2021-07-05 19:14:59 +02:00
parent 6773acac06
commit 906d96c4df
2 changed files with 25 additions and 20 deletions

View File

@ -20,13 +20,15 @@ Before anything, go into your :file:`quantum_package` directory and run
This script will create the :file:`quantum_package.rc` bash script, which
sets all the environment variables required for the normal operation of the
*Quantum Package*.
*Quantum Package*. It will also initialize the git submodules that are
required, and tell you which external dependencies are missing and need to be
installed. The required dependencies are located in the
`external/qp2-dependencies` directory, such that once QP is configured the
internet connection is not needed any more.
Running this script will also tell you which external dependencies are missing
and need to be installed.
When all dependencies have been installed, ( the :command:`configure` will tell you)
source the :file:`quantum_package.rc` in order to load all environment variables and compile the |QP|.
When all dependencies have been installed, (the :command:`configure` will
inform you) source the :file:`quantum_package.rc` in order to load all
environment variables and compile the |QP|.
Now all the requirements are met, you can compile the programs using
@ -51,8 +53,6 @@ Requirements
- |ZeroMQ| : networking library
- `GMP <https://gmplib.org/>`_ : Gnu Multiple Precision Arithmetic Library
- |OCaml| compiler with |OPAM| package manager
- `Bubblewrap <https://github.com/projectatomic/bubblewrap>`_ : Sandboxing tool required by Opam
- `libcap <https://git.kernel.org/pub/scm/linux/kernel/git/morgan/libcap.git>`_ : POSIX capabilities required by Bubblewrap
- |Ninja| : a parallel build system
- |pkg-config| : a tool which returns information about installed libraries
@ -95,9 +95,7 @@ The following packages are supported by the :command:`configure` installer:
* zeromq
* f77zmq
* gmp
* libcap
* bwrap
* ocaml ( :math:`\approx` 10 minutes)
* ocaml (:math:`\approx` 5 minutes)
* ezfio
* docopt
* resultsFile
@ -111,19 +109,21 @@ Example:
.. note::
When installing the ocaml package, you will be asked the location of where it should be installed.
A safe option is to enter the path proposed by the |QP|:
When installing the ocaml package, you will be asked the location of where
it should be installed. A safe option is to enter the path proposed by the
|QP|:
QP>> Please install it here: /your_quantum_package_directory/bin
QP>> Please install it here: /your_quantum_package_directory/bin
So just enter the proposition of the |QP| and press enter.
So just enter the proposition of the |QP| and press enter.
If the :command:`configure` executable fails to install a specific dependency
-----------------------------------------------------------------------------
If the :command:`configure` executable does not succeed to install a specific dependency,
there are some proposition of how to download and install the minimal dependencies to compile and use the |QP|.
If the :command:`configure` executable does not succeed to install a specific
dependency, there are some proposition of how to download and install the
minimal dependencies to compile and use the |QP|.
Before doing anything below, try to install the packages with your package manager

11
configure vendored
View File

@ -151,6 +151,10 @@ function find_dir() {
fi
}
# Make program believe stdin is a tty
function faketty() {
script -qfc "$(printf "%q " "$@")" /dev/null
}
# Install IRPF90 if needed
IRPF90=$(find_exe irpf90)
@ -190,7 +194,7 @@ for PACKAGE in ${PACKAGES} ; do
execute << EOF
rm -f "\${QP_ROOT}"/bin/ninja
unzip "\${QP_ROOT}"/external/qp2-dependencies/ninja.zip -d "\${QP_ROOT}"/bin
unzip "\${QP_ROOT}"/external/qp2-dependencies/ninja-linux.zip -d "\${QP_ROOT}"/bin
EOF
@ -238,8 +242,9 @@ EOF
source "${QP_ROOT}"/quantum_package.rc
cd "${QP_ROOT}"/external/
tar --gunzip --extract --file qp2-dependencies/ocaml-bundle_x86.tar.gz
echo | ./ocaml-bundle/compile.sh "${QP_ROOT}"
echo "" | faketty ./ocaml-bundle/bootstrap.sh "${QP_ROOT}"
echo n | faketty ./ocaml-bundle/configure.sh "${QP_ROOT}"
echo "" | faketty ./ocaml-bundle/compile.sh "${QP_ROOT}"
EOF
elif [[ ${PACKAGE} = bse ]] ; then