Skip to content

Commit

Permalink
Upgrade from setup.py to pip
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Jul 1, 2023
1 parent 73b4078 commit 2128452
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
17 changes: 3 additions & 14 deletions parse-files/install-python.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@ else()
endif()

set(cmd_
@Python3_EXECUTABLE@ @MRPT_PYTHON_BUILD_DIRECTORY@/setup.py
install
--root=${INSTALL_ROOT_DIR}
--install-lib=@PYTHON_INSTALL_DIR@
--install-layout=deb
--single-version-externally-managed
@Python3_EXECUTABLE@ -m pip install .
--target=${INSTALL_ROOT_DIR}/@PYTHON_INSTALL_DIR@
--ignore-installed
)


string(REPLACE ";" " " _cmd_print "${cmd_}")
message(STATUS "Running: ${_cmd_print}")

Expand All @@ -29,10 +25,3 @@ if(result)
message(FATAL_ERROR "CMake step for installing python modules failed: ${result}")
endif()

# Install .pyi files too:
set(cmd_ ${CMAKE_COMMAND}
-E copy_directory @MRPT_PYTHON_BUILD_DIRECTORY@/mrpt
${INSTALL_ROOT_DIR}/@PYTHON_INSTALL_DIR@/mrpt
)
message(STATUS "Installing .pyi files with: ${cmd_}")
execute_process(COMMAND ${cmd_})
8 changes: 7 additions & 1 deletion parse-files/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ package_data = {
'': [
'./*.so',
'./*.dll',
'./py.typed'
'./py.typed',
# Install .pyi stub files:
'./*.pyi',
'./pymrpt/*',
'./pymrpt/*/*',
'./pymrpt/*/*/*',
'./pymrpt/*/*/*/*'
]
}

Expand Down

0 comments on commit 2128452

Please sign in to comment.