Skip to content

Commit

Permalink
Merge 6 into 7
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <[email protected]>
  • Loading branch information
azeey committed Jan 18, 2024
2 parents 82ef851 + c5c3fc4 commit 2ff6611
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 21 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
name: Ubuntu CI

on: [push, pull_request]
on:
pull_request:
push:
branches:
- 'ign-math[0-9]'
- 'gz-math[0-9]'
- 'main'

jobs:
focal-ci:
runs-on: ubuntu-latest
name: Ubuntu Focal CI
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Compile and test
id: ci
uses: gazebo-tooling/action-gz-ci@focal
Expand All @@ -22,7 +28,7 @@ jobs:
name: Ubuntu Jammy CI
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Compile and test
id: ci
uses: gazebo-tooling/action-gz-ci@jammy
1 change: 0 additions & 1 deletion .github/workflows/triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ jobs:
with:
project-url: https://github.com/orgs/gazebosim/projects/7
github-token: ${{ secrets.TRIAGE_TOKEN }}

30 changes: 23 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,32 @@ endif()
if (SKIP_PYBIND11)
message(STATUS "SKIP_PYBIND11 set - disabling python bindings")
else()
include(GzPython)
find_package(PythonLibs QUIET)
if (NOT PYTHONLIBS_FOUND)
GZ_BUILD_WARNING("Python is missing: Python interfaces are disabled.")
message (STATUS "Searching for Python - not found.")
#include(GzPython) TODO: allow to specify for what it should search and then
# the code below can be removed; e.g. pybind needs Interpreter and Development components
# see https://pybind11.readthedocs.io/en/stable/cmake/index.html#new-findpython-mode
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
set(GZ_PYTHON_VERSION "3")
find_package(PythonInterp ${GZ_PYTHON_VERSION} QUIET)
if(PYTHONINTERP_FOUND)
set(Python3_FOUND ${PYTHONINTERP_FOUND})
set(Python3_Interpreter_FOUND ${PYTHONINTERP_FOUND})
set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE})
find_package(PythonLibs QUIET)
# we found the interpreter but did we also find the libs? both are required
set(Python3_FOUND ${PYTHONLIBS_FOUND})
set(Python3_VERSION ${PYTHONLIBS_VERSION_STRING})
endif()
else()
find_package(Python3 QUIET COMPONENTS Interpreter Development)
endif()

if (NOT Python3_FOUND)
GZ_BUILD_WARNING("Python3 is missing: Python interfaces are disabled.")
message (STATUS "Searching for Python3 - not found.")
else()
message (STATUS "Searching for Python - found version ${PYTHONLIBS_VERSION_STRING}.")
message (STATUS "Searching for Python3 - found version ${Python3_VERSION}.")

set(PYBIND11_PYTHON_VERSION 3)
find_package(Python3 QUIET COMPONENTS Interpreter Development)
find_package(pybind11 2.2 QUIET)

if (${pybind11_FOUND})
Expand Down
22 changes: 22 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,28 @@

## Gazebo Math 6.x

## Gazebo Math 6.15.1 (2024-01-05)

1. Replace CMake Python variables with new ones from FindPython3 module
* [Pull request #402](https://github.com/gazebosim/gz-math/pull/402)

1. Suppress warnings on MSVC
* [Pull request #564](https://github.com/gazebosim/gz-math/pull/564)

1. Infrastructure
* [Pull request #569](https://github.com/gazebosim/gz-math/pull/569)

## Gazebo Math 6.15.0 (2023-09-01)

1. Fixes for testing in non standard architectures
* [Pull request #546](https://github.com/gazebosim/gz-math/pull/546)

1. MecanumDriveOdometry to handle odometry estimation of Mecanum wheeled models
* [Pull request #486](https://github.com/gazebosim/gz-math/pull/486)

1. Infrastructure
* [Pull request #547](https://github.com/gazebosim/gz-math/pull/547)

## Gazebo Math 6.14.0 (2023-04-14)

1. Disable pybind11 on windows by default
Expand Down
21 changes: 11 additions & 10 deletions src/python_pybind11/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug")
# pybind11 logic for setting up a debug build when both a debug and release
# python interpreter are present in the system seems to be pretty much broken.
# This works around the issue.
set(PYTHON_LIBRARIES "${PYTHON_DEBUG_LIBRARIES}")
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
# TODO: remove once the minimum CMake version is increased
if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug")
# pybind11 logic for setting up a debug build when both a debug and release
# python interpreter are present in the system seems to be pretty much broken.
# This works around the issue.
set(PYTHON_LIBRARIES "${PYTHON_DEBUG_LIBRARIES}")
endif()
endif()

message(STATUS "Building pybind11 interfaces")
Expand Down Expand Up @@ -73,17 +76,15 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
endif()

if(USE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION)
# Get install variable from Python3 module
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
# Python3_SITEARCH is available via FindPython3 from 3.12 on, workaround if needed
execute_process(
COMMAND "${PYTHON_EXECUTABLE}" -c "if True:
COMMAND "${Python3_EXECUTABLE}" -c "if True:
from distutils import sysconfig as sc
print(sc.get_python_lib(plat_specific=True))"
OUTPUT_VARIABLE Python3_SITEARCH
OUTPUT_STRIP_TRAILING_WHITESPACE)
else()
# Get install variable from Python3 module
# Python3_SITEARCH is available from 3.12 on, workaround if needed:
find_package(Python3 COMPONENTS Interpreter)
endif()

if(USE_DIST_PACKAGES_FOR_PYTHON)
Expand Down

0 comments on commit 2ff6611

Please sign in to comment.