Compiling fudopv tool

The result of this procedure is fudopv application with Python interpreter included.

Note

For information on deploying fudopv without compiling sources files, refer to the Deploying fudopv without compiling source files topic.

Python

Windows

Download and install Python version 2.7.9 or newer:

https://www.python.org/downloads/

Note

Make sure to select the option to add python.exe to the execution path.

Linux

Install Python environment according to the guide provided by the manufacturer.

Exemplary configuration for RedHat 6.7 system:

./configure \
  --prefix=/opt/python-2.7.14 \
  --with-ensurepip=install \
  --disable-optimizations \
  --enable-shared

Note

  • --disable-optimizations - optimizations may result in build failures,
  • --with-ensurepip=install - installs tools for managing Python’s packages,
  • --enable-shared - one of the fudopv's dependencies requires the Python interpreter .so library.

Virtual environment

Compiling the package requires the virtualenv module.

  1. Execute pip install virtualenv or easy_install virtualenv command.
  2. In the fudopv/ execute the virtualenv deps command.

The environment required for building fudopv will be created in the deps/ folder.


Windows

Run the deps\Scripts\Activate command to activate the environment.


Linux

In case of the interpreter build from the source code you can use the included pip and easy_install tools. You must also set the path to the shared libraries and run the virtualenv with the -p option:

export LD_LIBRARY_PATH=/opt/python-2.7.14/lib
virtualenv -p /opt/python-2.7.14/bin/python deps
LD_LIBRARY_PATH=/opt/python-2.7.14/lib
/opt/python-2.7.14/bin/pip install virtualenv
/opt/python-2.7.14/bin/virtualenv -p /opt/python-2.7.14/bin/python deps

To activate the environment, run the source deps/bin/activate command.

Fetching dependencies

In active virtual environment run the pip install -r requirements.txt to install fudopv dependencies. Dependencies are installed in the deps/

Note

If the ImportError: No module named _markerlib problem occurs, execute pip install --upgrade distribute and install dependencies once again.

Windows

Download and install pywin32: https://sourceforge.net/projects/pywin32/files/

Note

Make sure to select the installer for Python 2.7.

After activating the virtualenv environment, execute the following command with the path to the pywin32:

easy_install path\to\pywin32

Linux

Linux operating system does not require taking any additional actions.


Package creation script

Execute the python setup.py command, which will create package in the fudopv folder.

Note

The PyInstaller does not support package creation on a privileged account. If the ERROR: You are running PyInstaller as user root. This is not supported. error occurs, you can change the check_not_running_as_root() function in the ./deps/lib/python2.7/site-packages/PyInstaller/utils/misc.py so that it return the result without checking anything.

Related topics: