-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial refactoring commit and patching capability
- Loading branch information
Showing
105 changed files
with
3,575 additions
and
2,958 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,16 +1,3 @@ | ||
[submodule "host/py_module/3rdparty/pybind11"] | ||
path = host/py_module/3rdparty/pybind11 | ||
url = https://github.com/pybind/pybind11.git | ||
branch = stable | ||
[submodule "host/core/3rdparty/loguru"] | ||
path = host/core/3rdparty/loguru | ||
url = https://github.com/emilk/loguru.git | ||
[submodule "shared/3rdparty/dldt"] | ||
path = shared/3rdparty/dldt | ||
url = https://github.com/opencv/dldt.git | ||
[submodule "shared/3rdparty/json"] | ||
path = shared/3rdparty/json | ||
url = https://github.com/nlohmann/json.git | ||
[submodule "shared/3rdparty/json-schema-validator"] | ||
path = shared/3rdparty/json-schema-validator | ||
url = https://github.com/pboettch/json-schema-validator.git | ||
[submodule "depthai-cpp/shared/depthai-shared"] | ||
path = depthai-cpp/shared/depthai-shared | ||
url = https://github.com/luxonis/depthai-shared.git |
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,43 @@ | ||
cmake_minimum_required(VERSION 3.2) # For Hunter | ||
|
||
# Set compile with -fPIC (on all targets) | ||
set(CMAKE_POSITION_INDEPENDENT_CODE ON) | ||
|
||
include("cmake/HunterGate.cmake") | ||
HunterGate( | ||
URL "https://github.com/cpp-pm/hunter/archive/v0.23.253.tar.gz" | ||
SHA1 "88ea6d37c897a81a080eb9ae0f69d7807bbb3c73" | ||
FILEPATH ${CMAKE_CURRENT_LIST_DIR}/depthai-cpp/cmake/Hunter/config.cmake # Add depthai-cpp config (hunter limitation) | ||
) | ||
|
||
# Pybindings project | ||
set(TARGET_NAME depthai) | ||
project(${TARGET_NAME}) | ||
|
||
# Add depthai-cpp dependency | ||
add_subdirectory(depthai-cpp EXCLUDE_FROM_ALL) | ||
|
||
# Add pybind11 dependency | ||
#add_subdirectory(pybind11-2.5.0) | ||
hunter_add_package(pybind11) | ||
find_package(pybind11 CONFIG REQUIRED) | ||
# Find python lib | ||
#find_package(PythonLibs REQUIRED) | ||
|
||
# Add files for python module | ||
pybind11_add_module(${TARGET_NAME} | ||
src/py_bindings.cpp | ||
src/host_data_packet_bindings.cpp | ||
src/nnet_packet_bindings.cpp | ||
src/py_tensor_entry_container_iterator.cpp | ||
src/device_bindings.cpp | ||
) | ||
# Link with libraries | ||
target_link_libraries(${TARGET_NAME} | ||
PUBLIC | ||
# pybind11 | ||
pybind11::pybind11 | ||
#pybind11::embed | ||
#pybind11::module | ||
depthai-cpp | ||
) |
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,8 @@ | ||
include README.md LICENSE | ||
global-include CMakeLists.txt *.cmake | ||
recursive-include src * | ||
recursive-include pybind11/include *.h | ||
graft depthai-cpp | ||
prune depthai-cpp/build | ||
prune example-cpp | ||
prune build |
This file was deleted.
Oops, something went wrong.
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,25 @@ | ||
#!/bin/bash | ||
set -e -x | ||
|
||
# Install a system package required by our library | ||
#yum install -y atlas-devel | ||
yum install -y libusb1-devel | ||
#yum remove -y libusb1 | ||
|
||
# Compile wheels | ||
for PYBIN in /opt/python/cp3*/bin; do | ||
#"${PYBIN}/pip" install -r /io/requirements.txt | ||
"${PYBIN}/pip" wheel /io/ -w wheelhouse/ | ||
done | ||
|
||
# Bundle external shared libraries into the wheels | ||
for whl in wheelhouse/*.whl; do | ||
auditwheel repair "$whl" --plat $PLAT -w /io/wheelhouse/ \ | ||
|| echo "Skipping non-platform wheel $whl" | ||
done | ||
|
||
# Install packages and test | ||
#for PYBIN in /opt/python/*/bin/; do | ||
# "${PYBIN}/pip" install python-manylinux-demo --no-index -f /io/wheelhouse | ||
# (cd "$HOME"; "${PYBIN}/nosetests" pymanylinuxdemo) | ||
#done |
Oops, something went wrong.