libe3py 0.2.3__tar.gz → 0.2.5__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.3
3
+ Version: 0.2.5
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
@@ -21,8 +21,17 @@ E3 interface between a RAN node and its dApps. The [dApp library](https://github
21
21
  (`pip install dapps`) uses it for E3AP; see
22
22
  [`swig/README.md`](https://github.com/wineslab/libe3/blob/main/swig/README.md) for the API.
23
23
 
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:
24
+ On Linux (x86_64 and aarch64, glibc 2.28 or newer, Python 3.10 to 3.13) `pip install libe3py` installs a
25
+ prebuilt wheel that contains libe3: no libe3, compiler or SWIG is needed, so a machine that only runs a dApp
26
+ needs nothing else.
27
+
28
+ ```bash
29
+ pip install libe3py
30
+ python -c "import libe3py; print(libe3py.__version__)"
31
+ ```
32
+
33
+ On any other platform pip builds the module from the source distribution, against the libe3 installed on the
34
+ machine, and it must be the same version. Install libe3 once:
26
35
 
27
36
  ```bash
28
37
  git clone --branch <version> https://github.com/wineslab/libe3 && cd libe3
@@ -33,6 +42,5 @@ git clone --branch <version> https://github.com/wineslab/libe3 && cd libe3
33
42
  then, in any virtual environment and without root:
34
43
 
35
44
  ```bash
36
- pip install libe3py==<version>
37
- python -c "import libe3py; print(libe3py.__version__)"
45
+ pip install --no-binary libe3py libe3py==<version>
38
46
  ```
libe3py-0.2.5/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.2.5
@@ -42,3 +42,25 @@ sdist.include = [
42
42
  provider = "scikit_build_core.metadata.regex"
43
43
  input = "VERSION"
44
44
  regex = "^(?P<value>\\d+\\.\\d+\\.\\d+)"
45
+
46
+ # Prebuilt wheels (manylinux_2_28), built by .github/workflows/build-wheels.yml. Unlike the
47
+ # sdist, a wheel is built from the full checkout and contains libe3 itself (all encodings,
48
+ # and libzmq, protobuf linked statically), so `pip install libe3py`
49
+ # needs no libe3, compiler or SWIG on the machine.
50
+ [tool.cibuildwheel]
51
+ build = "cp310-* cp311-* cp312-* cp313-*"
52
+ skip = "*-musllinux_*"
53
+ manylinux-x86_64-image = "manylinux_2_28"
54
+ manylinux-aarch64-image = "manylinux_2_28"
55
+ before-all = "bash {project}/scripts/wheel_deps.sh"
56
+ environment = { CMAKE_PREFIX_PATH = "/opt/protobuf", PATH = "/opt/protobuf/bin:$PATH", PKG_CONFIG_PATH = "/opt/zeromq/lib64/pkgconfig:/opt/zeromq/lib/pkgconfig" }
57
+
58
+ [tool.cibuildwheel.config-settings]
59
+ "cmake.source-dir" = "."
60
+ "cmake.define.LIBE3_ENABLE_SWIG" = "ON"
61
+ "cmake.define.LIBE3_ENABLE_ASN1" = "ON"
62
+ "cmake.define.LIBE3_ENABLE_JSON" = "ON"
63
+ "cmake.define.LIBE3_ENABLE_PROTOBUF" = "ON"
64
+ "cmake.define.LIBE3_BUILD_TESTS" = "OFF"
65
+ "cmake.define.LIBE3_BUILD_EXAMPLES" = "OFF"
66
+ "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
@@ -196,22 +196,22 @@ std::vector<uint8_t> DAppSession::setup_ran_function_data(std::size_t i) const {
196
196
  return impl_->setup.ran_function_list[i].ran_function_data;
197
197
  }
198
198
 
199
- int DAppSession::subscribe(uint32_t ran_function_id,
200
- std::vector<uint32_t> telemetry_ids,
201
- std::vector<uint32_t> control_ids,
202
- int sub_time_ms,
203
- int periodicity) {
199
+ int64_t DAppSession::subscribe(uint32_t ran_function_id,
200
+ std::vector<uint32_t> telemetry_ids,
201
+ std::vector<uint32_t> control_ids,
202
+ int sub_time_ms,
203
+ int periodicity) {
204
204
  uint32_t request_id = 0;
205
205
  ErrorCode rc = impl_->agent->subscribe(
206
206
  ran_function_id, std::move(telemetry_ids), std::move(control_ids),
207
207
  opt_u32(sub_time_ms), opt_u32(periodicity), &request_id);
208
- // On success return the assigned request id (positive, 1..1000) so Python
208
+ // On success return the assigned request id (positive, 1..4294967295) so Python
209
209
  // can correlate the SubscriptionResponse by id; on failure return the
210
210
  // ErrorCode (all error codes are negative, SUCCESS is 0).
211
211
  if (rc == ErrorCode::SUCCESS) {
212
- return static_cast<int>(request_id);
212
+ return static_cast<int64_t>(request_id);
213
213
  }
214
- return static_cast<int>(rc);
214
+ return static_cast<int64_t>(rc);
215
215
  }
216
216
 
217
217
  int DAppSession::unsubscribe(uint32_t ran_function_id) {
@@ -146,11 +146,11 @@ public:
146
146
  * @brief Subscribe to a RAN function (after a positive setup).
147
147
  * @param sub_time_ms subscription time, or -1 for unset.
148
148
  * @param periodicity delivery periodicity (µs), or -1 for unset.
149
- * @return the assigned request id (positive, 1..1000) on success, so the
150
- * caller can correlate the SubscriptionResponse by its request_id;
151
- * a negative ErrorCode on failure.
149
+ * @return the assigned request id (positive, 1..4294967295) on success, so
150
+ * the caller can correlate the SubscriptionResponse by its
151
+ * request_id; a negative ErrorCode on failure.
152
152
  */
153
- int subscribe(uint32_t ran_function_id,
153
+ int64_t subscribe(uint32_t ran_function_id,
154
154
  std::vector<uint32_t> telemetry_ids,
155
155
  std::vector<uint32_t> control_ids,
156
156
  int sub_time_ms,
@@ -174,7 +174,8 @@ public:
174
174
  /**
175
175
  * @brief Send a dApp report to the RAN.
176
176
  * @param sequence_id correlation id this dApp assigns to the detection;
177
- * mandatory on the wire.
177
+ * mandatory on the wire, 1..4294967295 (0 is refused with
178
+ * INVALID_PARAM).
178
179
  * @return the assigned message id (positive, 1..4294967295) on success, so
179
180
  * the caller can correlate a later ack/response by id; a negative
180
181
  * ErrorCode on failure.
libe3py-0.2.3/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.2.3
File without changes
File without changes
File without changes
File without changes
File without changes