Go to file
Sylvain Tricot 74f970e7dd
epsi-builds/msspec_python3/pipeline/head There was a failure building this commit Details
Add pandas to the list
2021-07-20 16:48:29 +02:00
CI Fix bugs in packaging procedure. 2020-03-12 16:16:28 +01:00
doc Changed installation instructions. 2021-07-20 16:42:46 +02:00
src Add pandas to the list 2021-07-20 16:48:29 +02:00
tests/sprkkr Fix bug in atom_types. 2021-02-22 20:22:58 +01:00
utils Work on continuous integration 2019-11-20 18:14:00 +01:00
.gitattributes Add .gitattributes 2019-11-15 16:53:41 +01:00
.gitignore Update gitignore. 2021-03-04 11:01:54 +01:00
Dockerfile Concatenated the last RUN in a single one. 2021-07-02 18:21:10 +02:00
Jenkinsfile Work on documentation:installation section 2021-07-05 17:50:49 +02:00
Makefile Update Makefile doc rule. 2021-02-23 10:26:22 +01:00
README.md Change list formatting. 2021-02-22 15:55:04 +01:00
license.txt iUpdate the license info 2019-11-15 16:24:12 +01:00

README.md

Introduction

This is the Python MsSpec version with support for Python 3.x and dynamic memory allocation for Phagen and Spec

Installation of the devel package

Requirements

To compile MsSpec shared libraries, you need:

  • Python >= 3.6
  • gfortran compiler
  • cairo library (runtime files and header files)

Depending on your OS and Python version, you may need all the requirements (runtime libraries and header files) to build wxPython (please consult your distribution's package list for the appropriate package names) and their dependencies:

  • python-dev (for your version of python)
  • gtk (preferably version 3, but depends on your needs)
  • gstreamer
  • gstreamer-plugins-base
  • glut
  • libwebkitgtk (matching your gtk version)
  • libjpeg
  • libpng
  • libtiff
  • libsdl
  • libnotify
  • libsm

You also need a tool to create and manage Python virtual environments. For now only virtualenv is supported. So if you plan to install msspec with the one-step command, you need to install it.

Fetching the code

You first need to clone the devel branch with either 2 commands below:

git clone https://git.ipr.univ-rennes1.fr/epsi/msspec_python3.git
git checkout devel
git clone --branch devel https://git.ipr.univ-rennes1.fr/epsi/msspec_python3.git

This will create a msspec_python3 folder with a local copy of the repository.

One step install

The command below will do all the stuff to install msspec in its dedicated Python virtual environment provided all the above requirements are fullfilled

cd msspec_python3
make devel

This will:

  • Create a Python virtual environment in the "_venv" folder inside the msspec_python3 folder.
  • Install all the required Python packages in this virtual environment.
  • Install (or even maybe build) wxPython for your OS and Python version in this virtual environment.
  • Build the msspec shared librarires.
  • Install msspec in edit mode in this virtual environment.

You can tweak the process by specifying space separated key=value pairs on the command line. Allowed keys are:

  • PYTHON, to give the executable name of the python interpreter to use rather than the default (python)
  • VERBOSE, set to 1 if you want the install process to be more verbose
  • NO_VENV, set to 1 to not create a virtual environment
  • VENV_PATH, specify the path to a virtual environment root folder
  • DEBUG, set to 1 to add debugging symbols
  • BUILDDIR, to set a different name than the default to store building artifacts (./build)
  • FC, the Fortran compiler to use (gfortran)
  • F2PY

Work with msspec

All you need to do each time you want to work with msspec is activating the virtual environment.

For example, if virtualenv was used to create the virtual environment:

source msspec_python3/_venv/bin/activate

Then you can launch your script with

python myscript.py

See the online tutorials for more information on how to use msspec.

When you're done, you can deactivate the virtual environment with

deactivate

Uninstall MsSpec

When Installed in "devel mode", nothing is created outside the msspec_python3 folder, so you just have to remove that folder to get rid of msspec on your computer

Manual control over the install

If for any reason you want to control each step of the building process (for example you do not have virtualenv but you are using conda), here is how:

  • Create a virtual environment or use an existing one and activate it
  • Install the list of requirements that are listed in the src/pip.freeze file
  • Install wxPython
  • Build the msspec shared librarires with the command "make pybinding"
  • Install the msspec Python package with "pip install -e src/"

The last step can be replaced by adding the src/ path to your PYTHONPATH, but bear in mind that the package will then be also visible to other virtual environments no matter they fit the msspec requirements.