Skip to content

Commit

Permalink
Rebase from 'upstream'
Browse files Browse the repository at this point in the history
  • Loading branch information
wxmerkt committed Aug 29, 2024
1 parent 59964cc commit a7fcfca
Show file tree
Hide file tree
Showing 34 changed files with 434 additions and 215 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/conda/environment_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
dependencies:
- eigen
- cmake
- numpy
- numpy<2.0
- pkg-config
- boost
- ccache
Expand Down
6 changes: 4 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
ci:
autoupdate_branch: devel
autofix_prs: false
autoupdate_schedule: quarterly
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.8
rev: v0.5.7
hooks:
- id: ruff
args:
Expand All @@ -20,7 +22,7 @@ repos:
hooks:
- id: toml-sort-fix
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.6
rev: v18.1.8
hooks:
- id: clang-format
args:
Expand Down
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

## [3.8.2] - 2024-08-26

### Fixed
- Fix function signature on Windows ([#494](https://github.com/stack-of-tasks/eigenpy/pull/494))

## [3.8.1] - 2024-08-25

### Fixed
- Fix compatibility issue with NumPy 2.x on Windows ([#492](https://github.com/stack-of-tasks/eigenpy/pull/492))

## [3.8.0] - 2024-08-14

### Added
- Add compatibility with jrl-cmakemodules workspace ([#485](https://github.com/stack-of-tasks/eigenpy/pull/485))
- Remove support of Python 3.7 ([#490](https://github.com/stack-of-tasks/eigenpy/pull/490))

### Fixed
- Remove CMake CMP0167 warnings ([#487](https://github.com/stack-of-tasks/eigenpy/pull/487))
- Fix compilation error on armhf ([#488](https://github.com/stack-of-tasks/eigenpy/pull/488))

## [3.7.0] - 2024-06-11

### Added
Expand Down Expand Up @@ -644,7 +664,10 @@ One can now easily expose C++ struct containing Eigen objects in Python avoiding

## [1.0.0] - 2014-07-18

[Unreleased]: https://github.com/stack-of-tasks/eigenpy/compare/v3.7.0...HEAD
[Unreleased]: https://github.com/stack-of-tasks/eigenpy/compare/v3.8.2...HEAD
[3.8.2]: https://github.com/stack-of-tasks/eigenpy/compare/v3.8.1...v3.8.2
[3.8.1]: https://github.com/stack-of-tasks/eigenpy/compare/v3.8.0...v3.8.1
[3.8.0]: https://github.com/stack-of-tasks/eigenpy/compare/v3.7.0...v3.8.0
[3.7.0]: https://github.com/stack-of-tasks/eigenpy/compare/v3.6.0...v3.7.0
[3.6.0]: https://github.com/stack-of-tasks/eigenpy/compare/v3.5.1...v3.6.0
[3.5.1]: https://github.com/stack-of-tasks/eigenpy/compare/v3.5.0...v3.5.1
Expand Down
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ set(PROJECT_USE_CMAKE_EXPORT TRUE)
set(PROJECT_USE_KEYWORD_LINK_LIBRARIES TRUE)
set(PROJECT_CUSTOM_HEADER_EXTENSION "hpp")
set(PROJECT_COMPATIBILITY_VERSION AnyNewerVersion)
# To enable jrl-cmakemodules compatibility with workspace we must define the two
# following lines
set(PROJECT_AUTO_RUN_FINALIZE FALSE)
set(PROJECT_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR})

# Check if the submodule cmake have been initialized
set(JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR}/cmake")
Expand Down Expand Up @@ -64,6 +68,11 @@ option(SUFFIX_SO_VERSION "Suffix library name with its version" OFF)
option(BUILD_TESTING_SCIPY
"Build the SciPy tests (scipy should be installed on the machine)" ON)

# Use BoostConfig module distributed by boost library instead of using FindBoost
# module distributed by CMake
if(POLICY CMP0167)
cmake_policy(SET CMP0167 NEW)
endif()
include("${JRL_CMAKE_MODULES}/base.cmake")
compute_project_args(PROJECT_ARGS LANGUAGES CXX)
project(${PROJECT_NAME} ${PROJECT_ARGS})
Expand Down Expand Up @@ -344,10 +353,12 @@ set(${PROJECT_NAME}_SOURCES

add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
set_standard_output_directory(${PROJECT_NAME})
target_include_directories(
${PROJECT_NAME} SYSTEM
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)

modernize_target_link_libraries(
Expand Down Expand Up @@ -450,3 +461,5 @@ pkg_config_append_libs(${PROJECT_NAME})
pkg_config_append_cflags("-I${PYTHON_INCLUDE_DIRS}")
pkg_config_append_cflags("-I${NUMPY_INCLUDE_DIRS}")
pkg_config_append_boost_libs(${BOOST_COMPONENTS})

setup_project_finalize()
6 changes: 3 additions & 3 deletions cmake/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ci:
autoupdate_schedule: quarterly
repos:
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
rev: 7.1.0
hooks:
- id: flake8
exclude: |
Expand All @@ -22,7 +22,7 @@ repos:
GNUInstallDirs\.cmake
)$
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.3
rev: v18.1.8
hooks:
- id: clang-format
args:
Expand All @@ -43,7 +43,7 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.4.0
rev: 24.4.2
hooks:
- id: black
exclude: |
Expand Down
52 changes: 39 additions & 13 deletions cmake/base.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,26 @@
# https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html#generating-a-package-version-file
# for further details.
#
# .. variable:: PROJECT_AUTO_RUN_FINALIZE
#
# If set, to true or unset SETUP_PROJECT_FINALIZE run automatically at the end
# of the root CMakeLists.txt. If set to false, SETUP_PROJECT_FINALIZE must be
# called manually. This is helpful when creating a CMake workspace where the
# root CMakelists.txt don't belong to a project.
#
# .. variable:: PROJECT_PACKAGES_IN_WORKSPACE
#
# List of packages in the workspace. This must be defined in the root
# CMakeLists. These packages will not be searched with find_package and all
# target and variables defined in the module should be defined in a workspace
# projects.
#
# .. variable:: PROJECT_PYTHON_PACKAGES_IN_WORKSPACE
#
# List of paths to Python package in the workspace. This must be defined in the
# root CMakeLists.txt. Python package should be generated in a workspace
# projects.
#
# Macros
# ------
#
Expand All @@ -134,6 +154,10 @@ set(PROJECT_JRL_CMAKE_BINARY_DIR
${CMAKE_CURRENT_BINARY_DIR}
CACHE INTERNAL "")

if(NOT DEFINED PROJECT_AUTO_RUN_FINALIZE)
set(PROJECT_AUTO_RUN_FINALIZE TRUE)
endif()

# Please note that functions starting with an underscore are internal functions
# and should not be used directly.

Expand Down Expand Up @@ -218,20 +242,19 @@ set(CMAKE_PROJECT_${PROJECT_NAME}_INCLUDE
# Set a hook to finalize the setup, CMake will set CMAKE_CURRENT_LIST_DIR to ""
# at the end Based off
# https://stackoverflow.com/questions/15760580/execute-command-or-macro-in-cmake-as-the-last-step-before-the-configure-step-f
variable_watch(CMAKE_CURRENT_LIST_DIR SETUP_PROJECT_FINALIZE_HOOK)
function(SETUP_PROJECT_FINALIZE_HOOK VARIABLE ACCESS)
if("${${VARIABLE}}" STREQUAL "")
set(CMAKE_CURRENT_LIST_DIR ${PROJECT_JRL_CMAKE_MODULE_DIR})
set(JRL_CMAKEMODULE_LOGGING_FILENAME
"${PROJECT_JRL_CMAKE_BINARY_DIR}/config.log")
setup_project_finalize()
if(PROJECT_USE_CMAKE_EXPORT)
setup_project_package_finalize()
if(PROJECT_AUTO_RUN_FINALIZE)
variable_watch(CMAKE_CURRENT_LIST_DIR SETUP_PROJECT_FINALIZE_HOOK)
function(SETUP_PROJECT_FINALIZE_HOOK VARIABLE ACCESS)
if("${${VARIABLE}}" STREQUAL "")
set(CMAKE_CURRENT_LIST_DIR ${PROJECT_JRL_CMAKE_MODULE_DIR})
set(JRL_CMAKEMODULE_LOGGING_FILENAME
"${PROJECT_JRL_CMAKE_BINARY_DIR}/config.log")
setup_project_finalize()
set(CMAKE_CURRENT_LIST_DIR "") # restore value
set(JRL_CMAKEMODULE_LOGGING_FILENAME "") # restore value
endif()
set(CMAKE_CURRENT_LIST_DIR "") # restore value
set(JRL_CMAKEMODULE_LOGGING_FILENAME "") # restore value
endif()
endfunction()
endfunction()
endif()

# --------------------- # Project configuration # --------------------- #

Expand Down Expand Up @@ -332,6 +355,9 @@ macro(SETUP_PROJECT_FINALIZE)
_install_project_data()

logging_finalize()
if(PROJECT_USE_CMAKE_EXPORT)
setup_project_package_finalize()
endif()
endmacro(SETUP_PROJECT_FINALIZE)

# .rst: .. ifmode:: user
Expand Down
7 changes: 6 additions & 1 deletion cmake/coverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,16 @@ macro(_SETUP_COVERAGE_FINALIZE)
message(STATUS "Python coverage will be generated")
endif()

if(NOT TARGET coverage)
add_custom_target(coverage
COMMENT "Generating HTML report for code coverage")
endif()
add_custom_target(
coverage
${PROJECT_NAME}-coverage
COMMAND ${_COVERAGE_HTML} -o ${_COVERAGE_DIR} ${_COVERAGE_FILES}
DEPENDS ${_COVERAGE_FILES}
BYPRODUCTS ${_COVERAGE_DIR}
COMMENT "Generating HTML report for code coverage")
add_dependencies(coverage ${PROJECT_NAME}-coverage)
endif()
endmacro()
13 changes: 11 additions & 2 deletions cmake/debian.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,25 @@ endmacro(_SETUP_DEBIAN)

macro(_SETUP_PROJECT_DEB)
if(UNIX AND NOT APPLE)
if(NOT TARGET deb-src)
add_custom_target(deb-src COMMENT "Generating source Debian package...")
endif()
add_custom_target(
deb-src
${PROJECT_NAME}-deb-src
COMMAND git-buildpackage --git-debian-branch=debian
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Generating source Debian package...")
add_dependencies(deb-src ${PROJECT_NAME}-deb-src)

if(NOT TARGET deb)
add_custom_target(deb COMMENT "Generating Debian package...")
endif()
add_custom_target(
deb
${PROJECT_NAME}-deb
COMMAND git-buildpackage --git-debian-branch=debian
--git-builder="debuild -S -i.git -I.git"
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Generating Debian package...")
add_dependencies(deb ${PROJECT_NAME}-deb)
endif(UNIX AND NOT APPLE)
endmacro(_SETUP_PROJECT_DEB)
Loading

0 comments on commit a7fcfca

Please sign in to comment.