forked from rerun-io/rerun
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61d9a02
commit f9da163
Showing
11 changed files
with
61 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,6 @@ | ||
use std::process::Command; | ||
use std::path::Path; | ||
fn main() { | ||
// Required for `cargo build` to work on mac: https://pyo3.rs/v0.14.2/building_and_distribution.html#macos | ||
pyo3_build_config::add_extension_module_link_args(); | ||
|
||
re_build_build_info::export_env_vars(); | ||
let script_path = Path::new(env!("CARGO_MANIFEST_DIR")).join("select_package.py"); | ||
if !script_path.exists() { | ||
panic!("Pre-build script not found: {:?}", script_path); | ||
} | ||
|
||
println!("Running pre-build script..."); | ||
|
||
// Try `python` first | ||
let python_result = Command::new("python3") | ||
.arg(&script_path) | ||
.status(); | ||
|
||
// If `python` fails, fall back to `python3` | ||
let status = match python_result { | ||
Ok(status) if status.success() => status, | ||
_ => Command::new("python") | ||
.arg(&script_path) | ||
.status() | ||
.expect("Failed to execute pre-build script with both `python` and `python3`"), | ||
}; | ||
|
||
if !status.success() { | ||
panic!("Pre-build script failed with status: {:?}", status); | ||
} | ||
|
||
println!("Pre-build script completed successfully."); | ||
println!("cargo:rerun-if-changed=select_package.py"); | ||
} |
Empty file.
3 changes: 3 additions & 0 deletions
3
rerun_py/depthai_viewer/_backend/obscured_utilities/utilities/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Pyarmor 9.0.6 (pro), 007125, Dynamic-recalibration, 2024-12-05T00:37:10.324494 | ||
from .pyarmor_runtime_007125 import __pyarmor__ | ||
__pyarmor__(__name__, __file__, b'PY007125\x00\x03\n\x00o\r\r\n\x80\x00\x01\x00\x08\x00\x00\x00\x04\x00\x00\x00@\x00\x00\x00\x88\x00\x00\x00\x12\t\x06\x00\xcb\x11|\xd14\x98\xdb\xef\x03\x80B\'\xf7]\x03/\x00\x00\x00\x00\x00\x00\x00\x000\x85\x947\xf2\xe6\x91nH\xd2)\xbb\xb1\xe6\xaf\x1a"K\x03\xbfWZR\xe0\xe9s\xfe\xacL\xd71\x0c\xb27\x8d%\xaf\x98\xde*\xd9K\xeaO\x9b\x17\xf1sL\xed\xd4\xcc[\xb2\xa9\x90\xc0\x8a?n\x80\xcegC\xc1\x19V\xb3cw\x95\xeaO\xb4\xd2y\x0b\xcf\x81\xd0\xc5\xe4\xce\xb8\x19X\xbc\xa5BP\x17\xeb_\x98\x8c\xa9\x18\xd6\xe4D\x0c\x8a\xff+>\xfa<\x12!\x1d9\x97\xb3Gq8\xcf\x9b\x83\xfe\xc1\xcd\x16\xeb\xda/\xe7\x8c\xfaa\xcf\x8eO\xac\x1fA') |
4 changes: 2 additions & 2 deletions
4
rerun_py/depthai_viewer/_backend/obscured_utilities/utilities/calibration_handler.py
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
rerun_py/depthai_viewer/_backend/obscured_utilities/utilities/display_handler.py
Large diffs are not rendered by default.
Oops, something went wrong.
53 changes: 53 additions & 0 deletions
53
...y/depthai_viewer/_backend/obscured_utilities/utilities/pyarmor_runtime_007125/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Pyarmor 9.0.6 (pro), 007125, 2024-12-05T00:57:50.471218 | ||
def __pyarmor__(): | ||
import platform | ||
import sys | ||
from struct import calcsize | ||
|
||
def format_system(): | ||
plat = platform.system().lower() | ||
plat = ('cygwin' if plat.startswith('cygwin') else | ||
'linux' if plat.startswith('linux') else | ||
'freebsd' if plat.startswith( | ||
('freebsd', 'openbsd', 'isilon onefs')) else plat) | ||
if plat == 'linux': | ||
if hasattr(sys, 'getandroidapilevel'): | ||
plat = 'android' | ||
else: | ||
cname, cver = platform.libc_ver() | ||
if cname == 'musl': | ||
plat = 'alpine' | ||
elif cname == 'libc': | ||
plat = 'android' | ||
return plat | ||
|
||
def format_machine(): | ||
mach = platform.machine().lower() | ||
arch_table = ( | ||
('x86', ('i386', 'i486', 'i586', 'i686', 'x86')), | ||
('x86_64', ('x64', 'x86_64', 'amd64', 'intel')), | ||
('arm', ('armv5',)), | ||
('armv6', ('armv6l',)), | ||
('armv7', ('armv7l',)), | ||
('aarch32', ('aarch32',)), | ||
('aarch64', ('aarch64', 'arm64')), | ||
('ppc64le', ('ppc64le',)), | ||
('mips32el', ('mipsel', 'mips32el')), | ||
('mips64el', ('mips64el',)), | ||
('riscv64', ('riscv64',)), | ||
) | ||
for alias, archlist in arch_table: | ||
if mach in archlist: | ||
mach = alias | ||
break | ||
return mach | ||
|
||
plat, mach = format_system(), format_machine() | ||
if plat == 'windows' and mach == 'x86_64': | ||
bitness = calcsize('P'.encode()) * 8 | ||
if bitness == 32: | ||
mach = 'x86' | ||
# mach = 'universal' if plat == 'darwin' else mach | ||
name = '.'.join(['_'.join([plat, mach]), 'pyarmor_runtime']) | ||
return __import__(name, globals(), locals(), ['__pyarmor__'], level=1) | ||
__pyarmor__ = __pyarmor__().__pyarmor__ |
Binary file added
BIN
+853 KB
...kend/obscured_utilities/utilities/pyarmor_runtime_007125/darwin_x86_64/pyarmor_runtime.so
Binary file not shown.
Binary file added
BIN
+774 KB
...ckend/obscured_utilities/utilities/pyarmor_runtime_007125/linux_x86_64/pyarmor_runtime.so
Binary file not shown.
Binary file added
BIN
+618 KB
...nd/obscured_utilities/utilities/pyarmor_runtime_007125/windows_x86_64/pyarmor_runtime.pyd
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters