Skip to content

Commit 777b6ee

Browse files
authoredMar 12, 2025··
Merge pull request #295 from branfosj/eb5
update installation and Python compat pages for EasyBuild 5.0
2 parents 22ec0b2 + e9977e6 commit 777b6ee

File tree

3 files changed

+33
-176
lines changed

3 files changed

+33
-176
lines changed
 

‎docs/installation.md

+19-42
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ The only strict requirements are:
1919
* a **GNU/Linux** distribution as operating system
2020
* some common shell tools are expected to be available, see [Required shell tools][required_shell_tools]
2121
* [Python](https://python.org):
22-
* Python 2.7, or Python 3.x (>= 3.5);
23-
* since [Python 2 is end-of-life](https://www.python.org/doc/sunset-python-2/) we strongly recommend
24-
using Python 3 if it is available;
25-
* only EasyBuild v4.0 (or newer) is compatible with Python 3, earlier EasyBuild releases require Python 2;
26-
* EasyBuild 5.0 will require Python >= 3.6;
22+
* Python >= 3.6 is required for EasyBuild 5.0;
2723
* no third-party Python packages are strictly required (the Python standard library is sufficient);
2824
* for some *specific* EasyBuild features additional Python packages are required however, see [Optional Python packages][optional_python_packages];
2925
* a **modules tool**: Tcl(/C) environment modules or Lmod
@@ -58,23 +54,10 @@ Compare the version of `eb`, the main EasyBuild command, with the version of the
5854
For example::
5955

6056
``` console
61-
$ module load EasyBuild
62-
$ module list
63-
64-
Currently Loaded Modules:
65-
1) EasyBuild/4.8.0
66-
6757
$ eb --version
68-
This is EasyBuild 4.8.0 (framework: 4.8.0, easyblocks: 4.8.0) on host example.local
58+
This is EasyBuild 5.0.0 (framework: 5.0.0, easyblocks: 5.0.0) on host example.local
6959
```
7060

71-
!!! tip
72-
The Tcl/C Environment Modules (version <= 3.2.10) does its default sorting differently than
73-
newer versions of Environment Modules and Lmod. The former will normally sort in the
74-
lexicographic order, while the latters follow an approach that is closer to Python's construct
75-
`LooseVersion` way of ordering. Such aspects may make a big difference, if you have installed
76-
both versions 1.9.0 and 1.15.2, with respect to what is the version being loaded by default.
77-
7861
You can also run `eb --show-system-info` to see system information relevant to EasyBuild,
7962
or run`eb --show-config` to see the default EasyBuild configuration (see also [Configuring EasyBuild][configuring_easybuild]).
8063

@@ -90,12 +73,6 @@ To upgrade to a newer EasyBuild version than the one currently installed:
9073

9174
For the `pip` install, you may wish to slightly change this command depending on the context and your personal preferences:
9275

93-
* to install EasyBuild *system-wide*, you can use `sudo` (if you have admin privileges):
94-
95-
``` shell
96-
sudo pip install easybuild
97-
```
98-
9976
* To install EasyBuild *in your personal home directory*, you can use the `--user` option:
10077

10178
``` shell
@@ -131,7 +108,7 @@ above:
131108
pip3 install easybuild
132109
```
133110

134-
If you want to ensure that you are using the `pip` installation that corresponds to the Python 3 installation
111+
If you want to ensure that you are using the `pip` installation that corresponds a specific Python installation
135112
that you intend to use, you can use `python3 -m pip` rather than `pip3`.
136113

137114
``` shell
@@ -225,10 +202,10 @@ you can define the `$EB_VERBOSE` environment variable. For example:
225202
``` console
226203
$ EB_VERBOSE=1 eb --version
227204
>> Considering 'python3.6'...
228-
>> 'python3' version: 3.6.8, which matches Python 3 version requirement (>= 3.5)
205+
>> 'python3' version: 3.6.8, which matches Python 3 version requirement (>= 3.6)
229206
>> Selected Python command: python3 (/usr/bin/python3.6)
230207
>> python3.6 -m easybuild.main --version
231-
This is EasyBuild 4.8.0 (framework: 4.8.0, easyblocks: 4.8.0) on host example
208+
This is EasyBuild 5.0.0 (framework: 5.0.0, easyblocks: 5.0.0) on host example
232209
```
233210

234211

@@ -299,7 +276,14 @@ module use _PREFIX_/modules/all
299276
Then, load the EasyBuild module to update your environment and make EasyBuild available for use:
300277
301278
``` shell
302-
module load EasyBuild
279+
$ module load EasyBuild
280+
$ module list
281+
282+
Currently Loaded Modules:
283+
1) EasyBuild/5.0.0
284+
285+
$ eb --version
286+
This is EasyBuild 5.0.0 (framework: 5.0.0, easyblocks: 5.0.0) on host example.local
303287
```
304288
305289
!!! note
@@ -340,16 +324,14 @@ Hence, a modules tool must be available to consume module files with.
340324

341325
Supported module tools:
342326

343-
* [Tcl/C environment-modules](https://modules.sourceforge.net/) (version >= 3.2.10)
344-
* [Tcl-only variant of environment modules](https://sourceforge.net/projects/modules/files/Modules-Tcl)
345-
* [Lmod](https://lmod.sourceforge.net) (version >= 6.5.1), *highly recommended*
327+
* [Tcl/C environment-modules](https://modules.sourceforge.net/) (version >= 4.3.0)
328+
* [Lmod](https://lmod.sourceforge.net) (version >= 8.0.0)
346329

347330
!!! note
348331
The path to the actual modules tool binary/script used *must* be included in `$PATH`,
349332
to make it readily available to EasyBuild.
350333

351334
* for Tcl/C environment modules: `modulecmd`
352-
* for Tcl-only environment modules: `modulecmd.tcl`
353335
* for Lmod: `lmod`
354336

355337
The path where the modules tool binary/script is located can be determined via the definition of
@@ -359,9 +341,6 @@ Supported module tools:
359341
For Lmod, EasyBuild will try to fall back to finding the `lmod` binary via the `$LMOD_CMD`
360342
environment variable, in case `lmod` is not available in `$PATH`.
361343

362-
In EasyBuild versions *prior* to 2.1.1, the path specified by `$LMOD_CMD` was (erroneously) preferred over the
363-
(first) `lmod` binary available via `$PATH`.
364-
365344
For modern Tcl-only environment modules (version >= 4.0.0), EasyBuild will try to fall back to finding the
366345
`modulecmd.tcl` binary via the `$MODULES_CMD` environment variable, in case `modulecmd.tcl` is not available
367346
in `$PATH`.
@@ -382,7 +361,7 @@ Additional notes:
382361

383362
### Required Python packages {: #required_python_packages }
384363

385-
Since EasyBuild v4.0, *no* Python packages outside of the Python standard library are required.
364+
EasyBuild requires *no* Python packages outside of the Python standard library.
386365

387366
## Optional dependencies
388367

@@ -391,8 +370,6 @@ Some dependencies are optional and are only required to support certain features
391370

392371
### Optional Python packages {: #optional_python_packages }
393372

394-
* [GC3Pie](https://pypi.org/project/gc3pie), only needed when using `GC3Pie` as a backend for `--job`,
395-
see also [Submitting jobs using --job][submitting_jobs];
396373
* [GitPython](https://github.com/gitpython-developers/GitPython), only needed if
397374
EasyBuild is hosted in a git repository or if you’re using a git
398375
repository for easyconfig files (.eb);
@@ -412,13 +389,13 @@ Some dependencies are optional and are only required to support certain features
412389
EasyBuild is split up into three different packages, which are available
413390
from the Python Package Index (PyPi):
414391

415-
* [easybuild-framework](http://pypi.python.org/pypi/easybuild-framework) - the EasyBuild framework, which includes the
392+
* [easybuild-framework](https://pypi.python.org/pypi/easybuild-framework) - the EasyBuild framework, which includes the
416393
easybuild.framework and easybuild.tools Python packages that provide
417394
general support for building and installing software
418-
* [easybuild-easyblocks](http://pypi.python.org/pypi/easybuild-easyblocks) - a collection of easyblocks that implement
395+
* [easybuild-easyblocks](https://pypi.python.org/pypi/easybuild-easyblocks) - a collection of easyblocks that implement
419396
support for building and installing (collections of) software
420397
packages
421-
* [easybuild-easyconfigs](http://pypi.python.org/pypi/easybuild-easyconfigs) - a collection of example easyconfig files
398+
* [easybuild-easyconfigs](https://pypi.python.org/pypi/easybuild-easyconfigs) - a collection of example easyconfig files
422399
that specify which software to build, and using which build options;
423400
these easyconfigs will be well tested with the latest compatible
424401
versions of the easybuild-framework and easybuild-easyblocks packages

‎docs/python-2-3-compatibility.md

+13-133
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
# Compatibility with Python 2 and Python 3 {: #py2_py3_compatibility }
1+
# Compatibility with Python 3 {: #py2_py3_compatibility }
22

3-
Starting with EasyBuild v4.0, the EasyBuild framework and easyblocks are
4-
compatible with both Python versions 2 and 3. More specifically, the
5-
following Python versions are currently supported:
3+
Starting with EasyBuild v5.0, the EasyBuild framework and easyblocks require Python >= 3.6.
4+
5+
More specifically, the following Python versions are currently supported:
66

7-
- Python 2.6.x (support was removed in EasyBuild v4.4.0)
8-
- Python 2.7.x ([support will be removed in EasyBuild v5.0.0](easybuild-v5/index.md))
9-
- Python 3.5.x ([support will be removed in EasyBuild v5.0.0](easybuild-v5/index.md))
107
- Python 3.6.x
118
- Python 3.7.x
129
- Python 3.8.x (requires EasyBuild v4.1.0)
1310
- Python 3.9.x (requires EasyBuild v4.3.1)
1411
- Python 3.10.x (requires EasyBuild v4.5.2)
1512
- Python 3.11.x (requires EasyBuild v4.5.2)
13+
- Python 3.12.x (requires EasyBuild v5.0.0)
14+
- Python 3.13.x (requires EasyBuild v5.0.0)
1615

1716
## Determining which Python version EasyBuild is using via `$EB_VERBOSE` {: #py2_py3_compatibility_EB_VERBOSE }
1817

@@ -41,7 +40,6 @@ The commands considered are (in order):
4140

4241
- `python`
4342
- `python3`
44-
- `python2`
4543

4644
Before considering these commands, `eb` will first consider the command
4745
name specified via the `$EB_PYTHON` environment variable (if defined),
@@ -62,130 +60,12 @@ This is EasyBuild 4.0.0 (framework: 4.0.0, easyblocks: 4.0.0) on host example.
6260

6361
## The `easybuild.tools.py2vs3` package
6462

65-
To facilitate this, the `easybuild.tools.py2vs3` package was introduced
66-
in EasyBuild v4.0. When importing a function from this package, you will
67-
automatically get a version of the function that is compatible with the
68-
Python version being used to run EasyBuild.
69-
70-
Through this approach we can hide subtle differences between Python 2
71-
and 3, while avoiding code duplication and Python version checks
72-
throughout the codebase, as well as avoid requiring packages like `six`
73-
or `future` (which facilitate maintaining compatibility with Python 2
74-
and 3, but are also a bit of a burden).
75-
76-
The `easybuild.tools.py2vs3` package provides two major classes of items
77-
(listed below in alphabetical order):
78-
79-
- functions from the Python standard library which should be imported
80-
from different locations in Python 2 and 3
81-
- wrappers for functionality in the Python standard library which
82-
behaves differently in Python 2 and 3
83-
84-
## `ascii_letters` {: #py2vs3_ascii_letters }
85-
86-
- Python 2: corresponds to `string.letters`
87-
- Python 3: corresponds to `string.ascii_letters`
88-
89-
## `ascii_lowercase` {: #py2vs3_ascii_lowercase }
90-
91-
- Python 2: corresponds to `string.lowercase`
92-
- Python 3: corresponds to `string.ascii_lowercase`
93-
94-
## `build_opener` {: #py2vs3_build_opener }
95-
96-
- Python 2: corresponds to `urllib2.build_opener` function
97-
- Python 3: corresponds to `urllib.request.build_opener` function
98-
99-
## `configparser` {: #py2vs3_configparser }
100-
101-
- Python 2: corresponds to `ConfigParser.configparser` module
102-
- Python 3: corresponds to `configparser` module
103-
104-
## `create_base_metaclass` {: #py2vs3_create_base_metaclass }
105-
106-
Function to create a metaclass that can be used as a base class,
107-
implemented in a way that is compatible with both Python 2 and 3.
108-
109-
## `extract_method_name` {: #py2vs3_extract_method_name }
110-
111-
Function to method name from lambda function, implemented in a way that
112-
is compatible with both Python 2 and 3.
113-
114-
## `HTTPError` {: #py2vs3_HTTPError }
115-
116-
- Python 2: corresponds to `urllib2.HTTPError`
117-
- Python 3: corresponds to `urllib.request.HTTPError`
118-
119-
## `HTTPSHandler` {: #py2vs3_HTTPSHandler }
120-
121-
- Python 2: corresponds to `urllib2.HTTPSHandler`
122-
- Python 3: corresponds to `urllib.request.HTTPSHandler`
123-
124-
## `json_loads` {: #py2vs3_json_loads }
125-
126-
- Python 2: wraps `json.loads` function
127-
128-
- Python 3: wraps `json.loads` function, taking into account that for Python versions older than 3.6
129-
- a value of type `string` (rather than `bytes`) is required as argument
130-
131-
## `mk_wrapper_baseclass` {: #py2vs3_mk_wrapper_baseclass }
132-
133-
Function to create a wrapper base class using the specified metaclass,
134-
implemented in a way that is compatible with both Python 2 and 3.
135-
136-
## `OrderedDict` {: #py2vs3_OrderedDict }
137-
138-
- Python 2.6: corresponds to `easybuild.tools.ordereddict.OrderedDict`
139-
- Python 2.7: corresponds to `collections.OrderedDict`
140-
- Python 3: corresponds to `collections.OrderedDict`
141-
142-
## `reload` {: #py2vs3_reload }
143-
144-
- Python 2: corresponds to `reload` built-in function
145-
- Python 3: corresponds to `importlib.reload` function
146-
147-
## `raise_with_traceback` {: #py2vs3_raise_with_traceback }
148-
149-
Function to raise an error with specified message and traceback,
150-
implemented in a way that is compatible with both Python 2 and 3.
151-
152-
## `Request` {: #py2vs3_Request }
153-
154-
- Python 2: corresponds to `urllib2.Request`
155-
- Python 3: corresponds to `urllib.request.Request`
156-
157-
## `subprocess_popen_text` {: #py2vs3_subprocess_popen_text }
158-
159-
- Python 2: wrapper for `subprocess.Popen`
160-
- Python 3: wrapper for `subprocess.Popen` while forcing text mode
161-
(using `universal_newlines=True`)
162-
163-
## `std_urllib` {: #py2vs3_std_urllib }
164-
165-
- Python 2: corresponds to `urllib` package
166-
- Python 3: corresponds to `urllib.request` package
167-
168-
## `string_type` {: #py2vs3_string_type }
169-
170-
- Python 2: corresponds to `basestring` built-in string type
171-
- Python 3: corresponds to `str` built-in string type
172-
173-
## `StringIO` {: #py2vs3_StringIO }
174-
175-
- Python 2: corresponds to `StringIO.StringIO` class
176-
- Python 3: corresponds to `io.StringIO` class
177-
178-
## `urlencode` {: #py2vs3_urlencode }
179-
180-
- Python 2: corresponds to `urllib.urlencode` function
181-
- Python 3: corresponds to `urllib.parse.urlencode` function
182-
183-
## `URLError` {: #py2vs3_URLError }
184-
185-
- Python 2: corresponds to `urllib2.URLError`
186-
- Python 3: corresponds to `urllib.request.URLError`
63+
Support for Python 2.7, and Python 3.5, was removed in EasyBuild v5.0.
18764

188-
## `urlopen` {: #py2vs3_urlopen }
65+
The `easybuild.tools.py2vs3` package was introduced in EasyBuild v4.0 so
66+
that when importing a function from this package, you would automatically
67+
get a version of the function that is compatible with the Python version
68+
being used to run EasyBuild.
18969

190-
- Python 2: corresponds to `urllib2.urlopen`
191-
- Python 3: corresponds to `urllib.request.urlopen`
70+
Use of `easybuild.tools.py2vs3` is deprecated in EasyBuild v5 and will be
71+
removed in the future.

‎mkdocs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ nav:
6060
- Locks: locks.md
6161
- Manipulating dependencies: manipulating-dependencies.md
6262
- Partial installations: partial-installations.md
63-
- Compatibility with Python 2 + 3: python-2-3-compatibility.md
63+
- Compatibility with Python 3: python-2-3-compatibility.md
6464
- Progress bars: progress-bars.md
6565
- Search index for easyconfigs: easyconfigs-search-index.md
6666
- System toolchain: system-toolchain.md

0 commit comments

Comments
 (0)
Please sign in to comment.