OS support spring cleaning spree (#6386)

This commit is contained in:
Jakub Kuczys
2024-06-30 21:11:02 +02:00
committed by GitHub
parent 4242a7adf2
commit ad1e1aa2ba
15 changed files with 20 additions and 186 deletions

View File

@@ -1,19 +0,0 @@
To install/update pyenv, run the following command:
.. prompt:: bash
command -v pyenv && pyenv update || curl https://pyenv.run | bash
After this command, you will see a warning about 'pyenv' not being in the load path. To address this,
you should run these commands:
.. prompt:: bash
profile=$([ -n "$ZSH_VERSION" ] && echo ~/.zprofile || ([ -f ~/.bash_profile ] && echo ~/.bash_profile || echo ~/.profile))
rcfile=$([ -n "$ZSH_VERSION" ] && echo ~/.zshrc || echo ~/.bashrc)
printf '%s\n%s\n%s\n' 'export PYENV_ROOT="$HOME/.pyenv"' 'export PATH="$PYENV_ROOT/bin:$PATH"' "$([ -f "$profile" ] && cat "$profile")" > "$profile"
echo 'eval "$(pyenv init --path)"' >> "$profile"
echo 'eval "$(pyenv init -)"' >> "$rcfile"
echo 'eval "$(pyenv virtualenv-init -)"' >> "$rcfile"
Then **log out and log back in** and run the following command:

View File

@@ -1,44 +0,0 @@
------------------------------
Creating a Virtual Environment
------------------------------
.. tip::
If you want to learn more about virtual environments, see page: `about-venvs`
We require installing Red into a virtual environment. Don't be scared, it's very
straightforward.
**************************
Using ``pyenv virtualenv``
**************************
Using ``pyenv virtualenv`` saves you the headache of remembering where you installed your virtual
environments. This option is only available if you installed Python with pyenv.
First, ensure your pyenv interpreter is set to python 3.8.1 or greater with the following command:
.. prompt:: bash
pyenv version
Now, create a virtual environment with the following command:
.. prompt:: bash
pyenv virtualenv <name>
Replace ``<name>`` with whatever you like. If you ever forget what you named it,
you can always use the command ``pyenv versions`` to list all virtual environments.
Now activate your virtualenv with the following command:
.. prompt:: bash
pyenv shell <name>
.. important::
You must activate the virtual environment with the above command every time you open a new
shell to run, install or update Red. You can check out other commands like ``pyenv local`` and
``pyenv global`` if you wish to keep the virtualenv activated all the time.

View File

@@ -6,16 +6,14 @@
Installing the pre-requirements
-------------------------------
Red Hat Enterprise Linux (RHEL) 8.6-8.x and its derivatives have all required packages available in official repositories.
Red Hat Enterprise Linux (RHEL) 8.8-8.x and its derivatives have all required packages available in official repositories.
Install them with dnf:
.. TODO: Use Python 3.11 once RHEL 8.6 goes EOL in 2024.
.. prompt:: bash
sudo dnf -y update
sudo dnf -y group install development
sudo dnf -y install python39 python39-devel java-17-openjdk-headless nano git
sudo dnf -y install python3.11 python3.11-devel java-17-openjdk-headless nano git
Set ``java`` executable to point to Java 17:
@@ -25,6 +23,6 @@ Set ``java`` executable to point to Java 17:
.. Include common instructions:
.. include:: _includes/create-env-with-venv3.9.rst
.. include:: _includes/create-env-with-venv3.11.rst
.. include:: _includes/install-and-setup-red-unix.rst

View File

@@ -6,17 +6,15 @@
Installing the pre-requirements
-------------------------------
Red Hat Enterprise Linux (RHEL) 9 and its derivatives have all required packages available in official repositories.
Red Hat Enterprise Linux (RHEL) 9.2-9.x and its derivatives have all required packages available in official repositories.
Install them with dnf:
.. TODO: Use Python 3.11 once RHEL 9.0 goes EOL in 2024.
.. prompt:: bash
sudo dnf -y install python39 python3-devel git java-17-openjdk-headless @development nano
sudo dnf -y install python3.11 python3.11-devel git java-17-openjdk-headless @development nano
.. Include common instructions:
.. include:: _includes/create-env-with-venv3.9.rst
.. include:: _includes/create-env-with-venv3.11.rst
.. include:: _includes/install-and-setup-red-unix.rst

View File

@@ -1,27 +0,0 @@
----------------------------
Installing Python with pyenv
----------------------------
On distributions where Python 3.9 needs to be compiled from source, we recommend the use of pyenv.
This simplifies the compilation process and has the added bonus of simplifying setting up Red in a
virtual environment.
.. include:: _includes/_install-pyenv-and-setup-path.rst
.. prompt:: bash
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.9.18 -v
This may take a long time to complete, depending on your hardware. For some machines (such as
Raspberry Pis and micro-tier VPSes), it may take over an hour; in this case, you may wish to remove
the ``CONFIGURE_OPTS=--enable-optimizations`` part from the front of the command, which will
drastically reduce the install time. However, be aware that this will make Python run about 10%
slower.
After that is finished, run:
.. prompt:: bash
pyenv global 3.9.18
Pyenv is now installed and your system should be configured to run Python 3.9.