Skip to content

Commit

Permalink
*sigh*
Browse files Browse the repository at this point in the history
  • Loading branch information
safijari committed Jan 18, 2024
1 parent 07ee052 commit badce4e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
12 changes: 4 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,10 @@

cmake_minimum_required(VERSION 2.8.12)
project(yag-slam)
# Note: The lines below allows a pip install pybind11 to be found by cmake.
# Do not remove.
execute_process(COMMAND python -c
"import pybind11_cmake; print(pybind11_cmake.__path__[0])"
OUTPUT_VARIABLE pybind11_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
# set(pybind11_DIR /usr/lib/python3.7/site-packages/pybind11_cmake)

add_subdirectory(pybind11)

include_directories(include)
find_package(pybind11 REQUIRED)
# find_package(Boost COMPONENTS thread REQUIRED)
pybind11_add_module(yag_slam_cpp src/PythonInterface.cpp src/Impls.cpp src/ScanMatcher.cpp)
# target_link_libraries(yag_slam_cpp PRIVATE Boost::thread)
target_link_libraries(yag_slam_cpp PRIVATE)
13 changes: 6 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
#!/bin/bash

rm /usr/bin/python
ln -s /opt/python/cp311-cp311/bin/python /usr/bin/python
/opt/python/cp311-cp311/bin/pip install -U auditwheel

cd /repo

rm -r build
rm -r dist

set -e

yum install boost-thread boost-devel -y

/opt/python/cp311-cp311/bin/pip install -U auditwheel

for folder in /opt/python/cp311*
do
echo $folder
rm /usr/bin/python
ln -s $folder/bin/python /usr/bin/python
$folder/bin/pip install pybind11 pybind11-cmake
$folder/bin/python setup.py bdist_wheel
done

cd dist

ln -s /opt/python/cp311-cp311m/bin/python /usr/bin/python
for file in ./*
do
/opt/python/cp311-cp311/bin/auditwheel -v repair --plat manylinux_2_28_x86_64 $file
Expand Down

0 comments on commit badce4e

Please sign in to comment.