Installation — PyCLP productive documentation

# Installation

At this moment only Linux and MINGW64 platforms are supported.

## Linux

Tested platform Ubuntu 24.04

### Requirements

Following packages shall be preinstalled before proceeding the installation of PyCLP

- Python 3.11 or greater

- Poetry 2.0.0 or greater

- gcc

- ECLiPSe Constraint Programming System 7.0

### Compilation & Installation

Setup Environmental variables for ECLiPSe:

ECLIPSEDIR environmental variable shall be set to the folder where is located ECLiPSe system. This is required for compiling and using PyCLP.

LD_LIBRARY_PATH environmental variable shall contains the path of folder that contains the ECLiPSe sharable library. E.g. <eclipsedir>/lib/<platform>.

#### Installation from PyPi

    pip install pyclp

#### Compilation and installation from sources

Download source files from PyCLP sources

#### Generate wheel and source package

    poetry build

Generated wheel packaged in folder `dist` can be installed using regular `pip install`

#### Regression test

    poetry install
    poetry run python  ./test/test.py

#### Generate documentation

    poetry install
    cd doc
    poetry run make html

### Tested environment

The present version of pyclp is tested on

- Ubuntu 20.04 (64bit) , Python 3.11

However it is expected working on other platform that fullfil previous requirements.

## Windows (MSYS2 MINGW64)

EclipseCLP 7.0 is built using gcc and the headers files cannot be compiled with Microsoft C compiler.

So it is assumed the following environment:

### Environment Requirements

- Python 3.11 or greater

- ECLiPSe Constraint Programming System 7.0

### Environment variables

Setup Environmental variables for ECLiPSe:

ECLIPSEDIR environmental variable shall be set to the folder where is located ECLiPSe system. This is required for compiling and using PyCLP.

### Binary installation

#### Download & Install

Download wheel package from PyCLP binaries and install using `pip install`

### Build distribution packages from sources

#### Extra requirements

Following packages shall be preinstalled using `pacman`

- mingw-w64-x86_64-toolchain

- mingw-w64-x86_64-python-pkginfo

- mingw-w64-x86_64-python-poetry

- mingw-w64-x86_64-python-pip

#### Download

Download source files from PyCLP sources

#### Create wheel and source package

    poetry build

Wheel distribution will be available in `dist` folder

#### Regression test

    poetry install
    poetry run python  ./test/test.py

#### Generate documentation

    poetry install
    cd doc
    poetry run make html

### Tested environment

The present version of pyclp is tested on

- Windows 11 (64bit) / (MSYS2 MINGW64), Python 3.12

However it is expected working on other platform that fullfil the requirements.