bindings,docs: Update docs and script to support Cppyy 3
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -103,9 +103,14 @@ Please see below subsections for Python-related package requirements.
|
||||
Python bindings
|
||||
===============
|
||||
|
||||
Python requires `Cppyy, <https://cppyy.readthedocs.io/en/latest/installation.html>` and specifically, version 2.4.2 is the latest version known to work with ns-3 at this time.
|
||||
Python requires `Cppyy, <https://cppyy.readthedocs.io/en/latest/installation.html>` 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
|
||||
|
||||
|
||||
@@ -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 <https://cppyy.readthedocs.io/en/latest/>`_. 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 <https://cppyy.readthedocs.io/en/latest/>`_. 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 <https://github.com/wlav/cppyy/issues/150>`_, Python bindings do not work on macOS machines with Apple silicon (M1 and M2 processors).
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -40,5 +40,5 @@ classifiers =
|
||||
zip_safe = False
|
||||
python_requires = >=3.6
|
||||
install_requires =
|
||||
cppyy==2.4.2
|
||||
cppyy==3.1.2
|
||||
|
||||
|
||||
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user