libe3py 0.2.4__tar.gz → 0.2.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: libe3py
3
- Version: 0.2.4
3
+ Version: 0.2.6
4
4
  Summary: Python binding of libe3, the O-RAN E3 interface library
5
5
  Author: Northeastern University
6
6
  License-Expression: Apache-2.0
@@ -11,6 +11,7 @@ Classifier: Programming Language :: C++
11
11
  Classifier: Operating System :: POSIX :: Linux
12
12
  Project-URL: Homepage, https://github.com/wineslab/libe3
13
13
  Project-URL: Documentation, https://github.com/wineslab/libe3/blob/main/swig/README.md
14
+ Project-URL: Changelog, https://github.com/wineslab/libe3/releases
14
15
  Requires-Python: >=3.10
15
16
  Description-Content-Type: text/markdown
16
17
 
@@ -21,8 +22,17 @@ E3 interface between a RAN node and its dApps. The [dApp library](https://github
21
22
  (`pip install dapps`) uses it for E3AP; see
22
23
  [`swig/README.md`](https://github.com/wineslab/libe3/blob/main/swig/README.md) for the API.
23
24
 
24
- libe3py is built when you install it, against the libe3 installed on the machine, and it must be the same
25
- version. Install libe3 once:
25
+ On Linux (x86_64 and aarch64, glibc 2.28 or newer, Python 3.10 to 3.13) `pip install libe3py` installs a
26
+ prebuilt wheel that contains libe3: no libe3, compiler or SWIG is needed, so a machine that only runs a dApp
27
+ needs nothing else.
28
+
29
+ ```bash
30
+ pip install libe3py
31
+ python -c "import libe3py; print(libe3py.__version__)"
32
+ ```
33
+
34
+ On any other platform pip builds the module from the source distribution, against the libe3 installed on the
35
+ machine, and it must be the same version. Install libe3 once:
26
36
 
27
37
  ```bash
28
38
  git clone --branch <version> https://github.com/wineslab/libe3 && cd libe3
@@ -33,6 +43,5 @@ git clone --branch <version> https://github.com/wineslab/libe3 && cd libe3
33
43
  then, in any virtual environment and without root:
34
44
 
35
45
  ```bash
36
- pip install libe3py==<version>
37
- python -c "import libe3py; print(libe3py.__version__)"
46
+ pip install --no-binary libe3py libe3py==<version>
38
47
  ```
libe3py-0.2.6/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.2.6
@@ -25,6 +25,7 @@ classifiers = [
25
25
  [project.urls]
26
26
  Homepage = "https://github.com/wineslab/libe3"
27
27
  Documentation = "https://github.com/wineslab/libe3/blob/main/swig/README.md"
28
+ Changelog = "https://github.com/wineslab/libe3/releases"
28
29
 
29
30
  [tool.scikit-build]
30
31
  cmake.version = ">=3.18"
@@ -42,3 +43,25 @@ sdist.include = [
42
43
  provider = "scikit_build_core.metadata.regex"
43
44
  input = "VERSION"
44
45
  regex = "^(?P<value>\\d+\\.\\d+\\.\\d+)"
46
+
47
+ # Prebuilt wheels (manylinux_2_28), built by .github/workflows/build-wheels.yml. Unlike the
48
+ # sdist, a wheel is built from the full checkout and contains libe3 itself (all encodings,
49
+ # and libzmq, protobuf linked statically), so `pip install libe3py`
50
+ # needs no libe3, compiler or SWIG on the machine.
51
+ [tool.cibuildwheel]
52
+ build = "cp310-* cp311-* cp312-* cp313-*"
53
+ skip = "*-musllinux_*"
54
+ manylinux-x86_64-image = "manylinux_2_28"
55
+ manylinux-aarch64-image = "manylinux_2_28"
56
+ before-all = "bash {project}/scripts/wheel_deps.sh"
57
+ environment = { CMAKE_PREFIX_PATH = "/opt/protobuf", PATH = "/opt/protobuf/bin:$PATH", PKG_CONFIG_PATH = "/opt/zeromq/lib64/pkgconfig:/opt/zeromq/lib/pkgconfig" }
58
+
59
+ [tool.cibuildwheel.config-settings]
60
+ "cmake.source-dir" = "."
61
+ "cmake.define.LIBE3_ENABLE_SWIG" = "ON"
62
+ "cmake.define.LIBE3_ENABLE_ASN1" = "ON"
63
+ "cmake.define.LIBE3_ENABLE_JSON" = "ON"
64
+ "cmake.define.LIBE3_ENABLE_PROTOBUF" = "ON"
65
+ "cmake.define.LIBE3_BUILD_TESTS" = "OFF"
66
+ "cmake.define.LIBE3_BUILD_EXAMPLES" = "OFF"
67
+ "install.components" = "libe3py"
@@ -5,8 +5,17 @@ E3 interface between a RAN node and its dApps. The [dApp library](https://github
5
5
  (`pip install dapps`) uses it for E3AP; see
6
6
  [`swig/README.md`](https://github.com/wineslab/libe3/blob/main/swig/README.md) for the API.
7
7
 
8
- libe3py is built when you install it, against the libe3 installed on the machine, and it must be the same
9
- version. Install libe3 once:
8
+ On Linux (x86_64 and aarch64, glibc 2.28 or newer, Python 3.10 to 3.13) `pip install libe3py` installs a
9
+ prebuilt wheel that contains libe3: no libe3, compiler or SWIG is needed, so a machine that only runs a dApp
10
+ needs nothing else.
11
+
12
+ ```bash
13
+ pip install libe3py
14
+ python -c "import libe3py; print(libe3py.__version__)"
15
+ ```
16
+
17
+ On any other platform pip builds the module from the source distribution, against the libe3 installed on the
18
+ machine, and it must be the same version. Install libe3 once:
10
19
 
11
20
  ```bash
12
21
  git clone --branch <version> https://github.com/wineslab/libe3 && cd libe3
@@ -17,6 +26,5 @@ git clone --branch <version> https://github.com/wineslab/libe3 && cd libe3
17
26
  then, in any virtual environment and without root:
18
27
 
19
28
  ```bash
20
- pip install libe3py==<version>
21
- python -c "import libe3py; print(libe3py.__version__)"
29
+ pip install --no-binary libe3py libe3py==<version>
22
30
  ```
@@ -103,18 +103,19 @@ while True:
103
103
 
104
104
  ## Build & install
105
105
 
106
- Install libe3 once (`./build_libe3 --all-encodings --install`, see the main README), then the binding
107
- with pip, in any virtual environment:
106
+ On Linux (x86_64 and aarch64, glibc 2.28 or newer, Python 3.10 to 3.13) the binding is a prebuilt wheel that
107
+ contains libe3, so one command in any virtual environment is enough, with no libe3 installed:
108
108
 
109
109
  ```bash
110
- pip install libe3py # or, from the libe3 checkout: pip install .
110
+ pip install libe3py
111
111
  python -c "import libe3py; print('libe3py OK', libe3py.__version__)"
112
112
  ```
113
113
 
114
- pip builds the module from these sources against the installed libe3 (`python/CMakeLists.txt`); it
114
+ Elsewhere, and from a checkout (`pip install .`), install libe3 once (`./build_libe3 --all-encodings --install`,
115
+ see the main README) and pip builds the module from these sources against the installed libe3 (`python/CMakeLists.txt`); it
115
116
  needs `swig >= 4.0`, the Python headers and a C++17 compiler (`./build_libe3 -I` installs them), and it
116
117
  stops with an error if the installed libe3 is not the same version. For a libe3 outside `/usr` and
117
- `/usr/local`: `pip install libe3py --config-settings=cmake.define.CMAKE_PREFIX_PATH=<prefix>`.
118
+ `/usr/local`: `pip install --no-binary libe3py libe3py --config-settings=cmake.define.CMAKE_PREFIX_PATH=<prefix>`.
118
119
 
119
120
  For development, `./build_libe3 --enable-swig` builds the module in `build/swig` (run the smoke test with
120
121
  `PYTHONPATH=build/swig python3 tests/test_swig_smoke.py`); `cmake --install` installs it only if
@@ -96,6 +96,16 @@ DAppSession::DAppSession(libe3::E3Config config, std::size_t queue_capacity) {
96
96
  ev.request_id = r.request_id;
97
97
  ev.subscription_id = r.subscription_id.value_or(0);
98
98
  ev.response_code = static_cast<int>(r.response_code);
99
+ ev.ran_function_id = r.ran_function_identifier.value_or(0);
100
+ ev.periodicity = r.periodicity ? static_cast<long>(*r.periodicity) : -1;
101
+ if (r.telemetry_identifier_list) {
102
+ ev.has_telemetry_granted = true;
103
+ ev.telemetry_granted = *r.telemetry_identifier_list;
104
+ }
105
+ if (r.control_identifier_list) {
106
+ ev.has_control_granted = true;
107
+ ev.control_granted = *r.control_identifier_list;
108
+ }
99
109
  impl->enqueue(std::move(ev));
100
110
  });
101
111
 
@@ -71,21 +71,30 @@ enum E3EventKind {
71
71
  * `payload` carries the opaque E3SM bytes for indications
72
72
  * (protocol_data) and xApp controls (xapp_control_data); it is empty for
73
73
  * subscription/setup responses and acks. Fields not relevant to a given
74
- * `kind` are left zero.
74
+ * `kind` are left zero, except where noted.
75
+ *
76
+ * A subscription response also carries the grant: `ran_function_id` (0 = not
77
+ * reported), `periodicity`, and the id lists, valid only when their has_* flag is set.
75
78
  */
76
79
  struct E3Event {
77
80
  int kind{E3_EVENT_NONE}; ///< one of @ref E3EventKind
78
81
  uint32_t dapp_id{0}; ///< dApp identifier the message targets
79
- uint32_t ran_function_id{0}; ///< RAN function (indication / xApp control)
82
+ uint32_t ran_function_id{0}; ///< RAN function (indication / xApp control / subscription response)
80
83
  uint32_t subscription_id{0}; ///< subscription id (subscription response)
81
84
  uint32_t request_id{0}; ///< request/message id (subscription response / ack / xApp control)
82
85
  uint32_t sequence_id{0}; ///< loop correlation id (xApp control); echo it on the control you re-issue
83
86
  int response_code{-1}; ///< 0=positive, 1=negative, -1=n/a
84
87
  std::vector<uint8_t> payload; ///< opaque E3SM bytes (indication / xApp control)
88
+ long periodicity{-1}; ///< granted interval in microseconds (subscription response), -1 = not reported
89
+ bool has_telemetry_granted{false}; ///< telemetry_granted was reported
90
+ bool has_control_granted{false}; ///< control_granted was reported
91
+ std::vector<uint32_t> telemetry_granted; ///< granted telemetry ids
92
+ std::vector<uint32_t> control_granted; ///< granted control ids
85
93
  uint64_t trace_seq{0}; ///< set when queued; keys the [latrec] LQ-stage records
86
94
  // NOTE: in Python (libe3py) the payload is read via ev.get_payload(), which
87
95
  // returns native `bytes`. SWIG member getters return a wrapped vector, so the
88
- // binding exposes the payload as a by-value method instead (see swig/libe3.i).
96
+ // binding exposes the payload as a by-value method instead (see swig/libe3.i);
97
+ // likewise the granted lists, via get_telemetry_granted() / get_control_granted().
89
98
  };
90
99
 
91
100
  /**
@@ -137,8 +137,12 @@ namespace std {
137
137
  * expose the payload through a by-value method instead — methods use the
138
138
  * std::vector<uint8_t> -> bytes `out` typemap above. Python reads ev.get_payload(). */
139
139
  %ignore libe3::py::E3Event::payload;
140
+ %ignore libe3::py::E3Event::telemetry_granted;
141
+ %ignore libe3::py::E3Event::control_granted;
140
142
  %extend libe3::py::E3Event {
141
143
  std::vector<uint8_t> get_payload() const { return $self->payload; }
144
+ std::vector<uint32_t> get_telemetry_granted() const { return $self->telemetry_granted; }
145
+ std::vector<uint32_t> get_control_granted() const { return $self->control_granted; }
142
146
  }
143
147
 
144
148
  /* The full dApp seam: DAppSession + E3Event. The batch returned by
libe3py-0.2.4/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.2.4
File without changes
File without changes
File without changes
File without changes