Dependencies building script

Along with the setup script, was created as a script that builds Ganeti Web Manager dependencies, both compiled and not, and packages them as .whl archives.

You can find the build script in Ganeti Web Manager‘s script directory at ./scripts/

Folder Structure

Wheels are put in subfolders in this pattern:


The Setup script‘s -w flag expects the wheels to be in this folder structure. So using to create these is required, unless you create the directory structure yourself.


What this script does:

  1. Detects operating system (only Ubuntu, Debian and CentOS are supported) and it’s architecture.
  2. Tries to install necessary dependencies [requires sudo priviledge]:
    • python
    • python-dev
    • python-virtualenv
    • libpq-dev, libmysqlclient-dev on Ubuntu and Debian
    • postgresql-devel, mysql-devel on CentOS
    • git
  3. Removes existing virtual environment installation.
  4. Creates new virtual environment in the same destination.
  5. Upgrades pip, setuptools and wheel (Python packages) in that virtual environment.
  6. Installs Ganeti Web Manager into that virtual environment, while creating proper wheel packages.
  7. Removes virtual environment.


Remember to keep wheels output directory and virtual environment apart.


The only existing dependency you need is bash. This script takes care of installing anything additional. However, if you have some troubles with dependencies, take a look at Can’t install or run dependencies.

To use the script, you simply run it. If you want to build wheels packages for a different version of Ganeti Web Manager, you simply need to git checkout the branch or tag that you want to build the wheels packages for.

Directory structure

Directories you’ll need:

  • venv for virtual environment installation,
  • gwm for Ganeti Web Manager source code,
  • wheels for wheel packages.


You can totally customize paths to these directories.

These directories will be created after you run

Command line arguments

By specifying additional arguments you can change this script’s behavior and some paths it’s using.

Note will work graciously without any additional arguments!

-e <virtual environment directory>

Path where the script should create a temporary Python virtual environment.

-w <wheels output directory>

Path where output wheel packages are stored.


Skip installing system dependencies.


Default options::
$ ./scripts/

Here’s another way to do the above, specifiying the locations:

$ ./scripts/ -e ./venv -w ./wheels

Build wheels without dependencies (an unsupported OS), and upload the wheels:

$ ./scripts/ -N
$ rsync ./wheels rsync@server:/srv/www/wheels


Can’t install or run dependencies

If you’re using operating system different from Ubuntu, Debian or CentOS, you might have troubles installing necessary dependencies.

What this script is looking for:

  • /usr/bin/sudo
  • /bin/rm
  • /usr/bin/virtualenv (usually python-virtualen package provides it)
  • /usr/bin/git (usually git package provides it)

Make sure you have these files present in your system and then run the script with -N command line argument.

Can’t run permission denied

This script needs to be executable, you can make it by issuing this command:

$ chmod +x