File tree Expand file tree Collapse file tree 17 files changed +2568
-34
lines changed
Expand file tree Collapse file tree 17 files changed +2568
-34
lines changed Original file line number Diff line number Diff line change @@ -162,3 +162,6 @@ cython_debug/
162162# and can be added to the global gitignore or merged into this file. For a more nuclear
163163# option (not recommended) you can uncomment the following to ignore the entire idea folder.
164164# .idea/
165+
166+ archive.tar.gz
167+ examples /
Original file line number Diff line number Diff line change 1+ [submodule "pyorbbecsdk "]
2+ path = pyorbbecsdk
3+ url = https://github.com/orbbec/pyorbbecsdk.git
4+ branch = v2-main
Original file line number Diff line number Diff line change 1+ 3.9
Original file line number Diff line number Diff line change 11setup :
22 ./setup.sh
33
4- dist/ archive.tar.gz : setup
4+ archive.tar.gz : setup
55 ./build.sh
Original file line number Diff line number Diff line change @@ -5,13 +5,17 @@ set -euo pipefail
55cd $( dirname $0 )
66
77export PATH=$PATH :$HOME /.local/bin
8- VENV_NAME=" ./ venv-build "
8+ VENV_NAME=" .venv"
99
1010source " ./$VENV_NAME /bin/activate"
1111
12- if ! uv pip install pyinstaller -q; then
13- exit 1
14- fi
12+ # if ! uv pip install pyinstaller -q; then
13+ # exit 1
14+ # fi
1515
16- uv run pyinstaller --onefile -p src src/main.py
17- tar -czvf dist/archive.tar.gz ./dist/main meta.json
16+ uv build --wheel
17+
18+ cp ./pyorbbecsdk/dist/* .whl ./dist/
19+
20+ # uv run pyinstaller --onefile -p src src/main.py
21+ tar -czvf archive.tar.gz ./dist/ meta.json first_run.sh run.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ # Check if pyorbbecsdk directory exists
5+ if [ ! -d " pyorbbecsdk" ]; then
6+ echo " Error: pyorbbecsdk directory not found."
7+ echo " Please run: git submodule update --init --recursive"
8+ exit 1
9+ fi
10+
11+ sudo apt install -y cmake gcc
12+
13+ # Build pyorbbecsdk
14+ cd pyorbbecsdk
15+ if [ -d " build" ]; then
16+ rm -rf build
17+ fi
18+ mkdir -p build
19+ cd build
20+ cmake -Dpybind11_DIR=$( pybind11-config --cmakedir) ..
21+ make -j4
22+ make install
23+ cd ..
24+
25+ # Build wheel
26+ # uv pip install wheel
27+ python setup.py bdist_wheel
28+
29+ # Install the wheel
30+ uv pip install dist/* .whl
31+
32+ echo " pyorbbecsdk built and installed successfully!"
33+ cd ..
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -euo pipefail
4+
5+ cd $( dirname $0 )
6+
7+ VENV_NAME=" ${VIAM_MODULE_DATA} /.venv"
8+
9+ # Create a virtual environment to run our code
10+ export PATH=$PATH :$HOME /.local/bin
11+
12+ if [ ! " $( command -v uv) " ]; then
13+ if [ ! " $( command -v curl) " ]; then
14+ echo " curl is required to install UV. please install curl on this system to continue."
15+ exit 1
16+ fi
17+ echo " Installing uv command"
18+ curl -LsSf https://astral.sh/uv/install.sh | sh
19+ fi
20+
21+ if ! uv venv $VENV_NAME --python 3.10; then
22+ echo " unable to create required virtual environment"
23+ exit 1
24+ fi
25+
26+ source " $VENV_NAME /bin/activate"
27+
28+ # if ! uv pip install -r requirements.txt; then
29+ # echo "unable to sync requirements to venv"
30+ # exit 1
31+ # fi
32+
33+ # uv pip install
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ # Initialize and update the git submodule
5+ git submodule update --init --recursive
6+
7+ # Check if the submodule is on the correct branch
8+ cd pyorbbecsdk
9+ CURRENT_BRANCH=$( git rev-parse --abbrev-ref HEAD)
10+ if [ " $CURRENT_BRANCH " != " v2-main" ]; then
11+ echo " Switching pyorbbecsdk to v2-main branch"
12+ git checkout v2-main
13+ fi
14+ cd ..
Original file line number Diff line number Diff line change 1+ def main ():
2+ print ("Hello from orbbec-camera!" )
3+
4+
5+ if __name__ == "__main__" :
6+ main ()
Original file line number Diff line number Diff line change 1414 ],
1515 "applications" : null ,
1616 "markdown_link" : " README.md" ,
17- "entrypoint" : " dist/main " ,
18- "first_run" : " " ,
17+ "entrypoint" : " ./run.sh " ,
18+ "first_run" : " ./first_run.sh " ,
1919 "build" : {
2020 "build" : " ./build.sh" ,
2121 "setup" : " ./setup.sh" ,
22- "path" : " dist/ archive.tar.gz" ,
22+ "path" : " archive.tar.gz" ,
2323 "arch" : [
2424 " linux/amd64" ,
2525 " linux/arm64"
You can’t perform that action at this time.
0 commit comments