diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 0b61ac9f5..b42a861e1 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -20,6 +20,9 @@ In this release, we have introduced pedantic warnings to enhance C++ standard co ### Supported platforms +Python API requires [Cppyy](https://cppyy.readthedocs.io/en/latest/installation.html) and has only +been tested on Linux. The latest known version to work with ns-3 is cppyy==3.1.2. + ### New user-visible features - (network) !1828 - Added a common helper to create and install applications diff --git a/doc/installation/source/linux.rst b/doc/installation/source/linux.rst index 663eb66b8..3d728101f 100644 --- a/doc/installation/source/linux.rst +++ b/doc/installation/source/linux.rst @@ -103,9 +103,14 @@ Please see below subsections for Python-related package requirements. Python bindings =============== -Python requires `Cppyy, ` and specifically, version 2.4.2 is the latest version known to work with ns-3 at this time. +Python requires `Cppyy, ` and specifically, +version 3.1.2 is the latest version known to work with ns-3 at this time. -ns-3.37 and newer:: +ns-3.42 and newer:: + + python3 -m pip install --user cppyy==3.1.2 + +ns-3.37-3.41:: python3 -m pip install --user cppyy==2.4.2 diff --git a/doc/installation/source/system.rst b/doc/installation/source/system.rst index 1641022ac..eac22f778 100644 --- a/doc/installation/source/system.rst +++ b/doc/installation/source/system.rst @@ -140,8 +140,10 @@ if you are running LTE or NR simulations (which make use of SQLite databases): Python bindings (ns-3.37 and newer) =================================== -|ns3| Python support now uses `cppyy `_. Version 2.4.2 -is the most recent supported cppyy release; version 3.0.0 is not currently supported. +|ns3| Python support now uses `cppyy `_. Version 3.1.2 +is the most recent supported cppyy release since ns-3.42. + +Cppyy version 2.4.2 should be used from ns-3.37 up to 3.41. Due to an `upstream limitation with cppyy `_, Python bindings do not work on macOS machines with Apple silicon (M1 and M2 processors). diff --git a/doc/manual/source/python.rst b/doc/manual/source/python.rst index 5b1a13173..27b7b7fb6 100644 --- a/doc/manual/source/python.rst +++ b/doc/manual/source/python.rst @@ -111,11 +111,11 @@ simple modules in python, jump to the `Using the pip wheel`_ section. Using the bindings from the ns-3 source ======================================= -The main prerequisite is to install `cppyy`, with version no later than 2.4.2. +The main prerequisite is to install `cppyy`, with version 3.1.2. Depending on how you may manage Python extensions, the installation instructions may vary, but you can first check if it installed by seeing if the `cppyy` module can be -successfully imported and the version is no later than 2.4.2: +successfully imported and the version 3.1.2: .. sourcecode:: bash @@ -125,7 +125,7 @@ successfully imported and the version is no later than 2.4.2: Type "help", "copyright", "credits" or "license" for more information. >>> import cppyy >>> print("%s" % cppyy.__version) - 2.4.2 + 3.1.2 >>> If not, you may try to install via `pip` or whatever other manager you are @@ -133,7 +133,7 @@ using; e.g.: .. sourcecode:: bash - $ python3 -m pip install --user cppyy==2.4.2 + $ python3 -m pip install --user cppyy==3.1.2 First, we need to enable the build of Python bindings: diff --git a/pyproject.toml b/pyproject.toml index 18b1293c1..754779410 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ requires = [ "setuptools>=45", "setuptools_scm[toml]>=6.0", "cmake-build-extension>=0.4", - "cppyy==2.4.2", + "cppyy==3.1.2", ] [tool.setuptools_scm] diff --git a/setup.cfg b/setup.cfg index 679a7d3d9..342e29711 100644 --- a/setup.cfg +++ b/setup.cfg @@ -40,5 +40,5 @@ classifiers = zip_safe = False python_requires = >=3.6 install_requires = - cppyy==2.4.2 + cppyy==3.1.2 diff --git a/utils/tests/gitlab-ci-cppyy.yml b/utils/tests/gitlab-ci-cppyy.yml index 930196053..bfdab3500 100644 --- a/utils/tests/gitlab-ci-cppyy.yml +++ b/utils/tests/gitlab-ci-cppyy.yml @@ -11,7 +11,7 @@ cppyy-22.04: python3 python3-pip libboost-dev libgsl-dev libgtk-3-dev git wget - - pip install cppyy==2.4.2 matplotlib numpy + - pip install cppyy==3.1.2 matplotlib numpy script: - ./ns3 configure -G Ninja --enable-python-bindings - ./ns3 build @@ -42,7 +42,7 @@ cppyy-20.04: python3 python3-pip libboost-dev libgsl-dev libgtk-3-dev git wget - - pip install cppyy==2.4.2 + - pip install cppyy==3.1.2 script: - ./ns3 configure -G Ninja --enable-python-bindings - ./ns3 build @@ -69,7 +69,7 @@ cppyy-20.04: # Upgrade the pip version to reuse the pre-build cppyy - python -m pip install pip --upgrade - python -m pip install setuptools setuptools_scm wheel --upgrade - - python -m pip install auditwheel cmake-build-extension cppyy==2.4.2 + - python -m pip install auditwheel cmake-build-extension cppyy==3.1.2 # Configure and build wheel - python setup.py bdist_wheel build_ext - export EXCLUDE_INTERNAL_LIBRARIES=`python ./build-support/pip-wheel/auditwheel-exclude-list.py`