File: platform.rst

package info (click to toggle)
guidata 3.13.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,764 kB
  • sloc: python: 20,091; makefile: 17
file content (123 lines) | stat: -rw-r--r-- 3,600 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
Reference test platforms
------------------------

About requirements
^^^^^^^^^^^^^^^^^^

The ``requirements.txt`` mentioned in the following sections is a text file which
contains the list of all the Python packages required for building up the projet
environment. It is used by the ``pip`` command to install all the dependencies.

The ``requirements.txt`` file is generated automatically by the ``guidata-genreqs``
tool. It is based on the ``pyproject.toml`` file which is the reference file for the
project dependencies.

.. warning::

    Please note that the generation is not systematic and the ``requirements.txt``
    file may not be up-to-date.

To update the ``requirements.txt`` file, use the Visual Studio task
``Update requirements.txt`` or execute the following command:

.. code-block:: bash

    python -m guidata.utils.genreqs txt


Microsoft Windows 10
^^^^^^^^^^^^^^^^^^^^

First, install the latest version of Python 3.10 from the WinPython project.

.. note::

    At the time of writing, the latest version is 3.10.11.1 which can be
    download from `here <https://sourceforge.net/projects/winpython/files/WinPython_3.10/3.10.11.1/Winpython64-3.10.11.1dot.exe/download>`_.

Then install all the requirements using the following command from the WinPython
command prompt:

.. code-block:: bash

    pip install -r requirements.txt

That's it, you can now run the tests using the following command:

.. code-block:: bash

    pytest

CentOS Stream 8.8
^^^^^^^^^^^^^^^^^

.. note::

    The following instructions have been tested on CentOS Stream which is the
    reference platform for the project. However, they should work on
    any other Linux distribution relying on the ``yum`` package manager.
    As for the other distributions, you may need to adapt the instructions
    to your specific environment (e.g. use ``apt-get`` instead of ``yum``).

First, install the prerequisites:

.. code-block:: bash

    sudo yum install groupinstall "Development Tools" -y
    sudo yum install openssl-devel.i686 libffi-devel.i686 bzip2-devel.i686 sqlite-devel -y

Check that ``gcc`` is installed and available in the ``PATH`` environment variable:

.. code-block:: bash

    gcc --version

Install OpenSSL 1.1.1:

.. code-block:: bash

    wget https://www.openssl.org/source/openssl-1.1.1v.tar.gz
    tar -xvf openssl-1.1.1v.tar.gz
    cd openssl-1.1.1v
    ./config --prefix=/usr --openssldir=/etc/ssl --libdir=lib no-shared zlib-dynamic
    make
    sudo make install
    openssl version
    which openssl
    cd ..

Install Python 3.10.13 (the latest 3.10 version at the time of writing):

.. code-block:: bash

    wget https://www.python.org/ftp/python/3.10.13/Python-3.10.13.tgz
    tar -xvf Python-3.10.13.tgz
    cd Python-3.10.13
    ./configure --enable-optimizations --with-openssl=/usr --enable-loadable-sqlite-extensions
    sudo make altinstall
    cd ..

Eventually add the ``/usr/local/bin`` directory to the ``PATH`` environment variable
if Python has warned you about it:

.. code-block:: bash

    sudo echo 'pathmunge /usr/local/bin' > /etc/profile.d/py310.sh
    chmod +x /etc/profile.d/py310.sh
    . /etc/profile  # or logout and login again (reload the environment variables)
    echo $PATH  # check that /usr/local/bin is in the PATH

Create a virtual environment and install the requirements:

.. code-block:: bash

    python3.10 -m venv guidata-venv
    source guidata-venv/bin/activate
    pip install --upgrade pip
    pip install -r requirements.txt

That's it, you can now run the tests using the following command:

.. code-block:: bash

    pytest