Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[morpheus-refactor] Move morpheus source to python/morpheus #1836

Merged
merged 15 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
31 changes: 1 addition & 30 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,36 +143,7 @@ morpheus_utils_compiler_set_defaults(MORPHEUS_USE_CLANG_TIDY)
# Setup IWYU if enabled
include(environment/init_iwyu)

# #################################
# #### Morpheus Python Setup ######
# #################################
morpheus_utils_python_configure()

# Include the main morpheus code
morpheus_utils_create_python_package(morpheus
PROJECT_DIRECTORY "${CMAKE_SOURCE_DIR}"
SOURCE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/morpheus"
)

add_subdirectory(morpheus)

# Complete the python package
if(MORPHEUS_PYTHON_INPLACE_BUILD)
list(APPEND extra_args "IS_INPLACE")
endif()

if(MORPHEUS_PYTHON_BUILD_WHEEL)
list(APPEND extra_args "BUILD_WHEEL")
endif()

if(MORPHEUS_PYTHON_PERFORM_INSTALL)
list(APPEND extra_args "INSTALL_WHEEL")
endif()

file(GLOB morpheus_data_files "${CMAKE_CURRENT_SOURCE_DIR}/morpheus/data/*")
morpheus_utils_add_python_sources(${morpheus_data_files})

morpheus_utils_build_python_package(morpheus ${extra_args})
add_subdirectory(python)

if(MORPHEUS_BUILD_EXAMPLES)
add_subdirectory(examples)
Expand Down
1 change: 0 additions & 1 deletion morpheus/data

This file was deleted.

20 changes: 20 additions & 0 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: Copyright (c) 2021-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

list(APPEND CMAKE_MESSAGE_CONTEXT "python")

add_subdirectory(morpheus)

list(POP_BACK CMAKE_MESSAGE_CONTEXT)
55 changes: 55 additions & 0 deletions python/morpheus/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# SPDX-FileCopyrightText: Copyright (c) 2021-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

list(APPEND CMAKE_MESSAGE_CONTEXT "morpheus")

# Save the root of the python for relative paths
# Where is this used, fixme
set(MORPHEUS_PY_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/..)


# #################################
# #### Morpheus Python Setup ######
# #################################
morpheus_utils_python_configure()

# Include the main morpheus code
# fixme: add another subdirectory src and change SOURCE_DIRECTORY to ${CMAKE_CURRENT_SOURCE_DIR}/src
morpheus_utils_create_python_package(morpheus
PROJECT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
SOURCE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/morpheus"
)

add_subdirectory(morpheus)

# Complete the python package
if(MORPHEUS_PYTHON_INPLACE_BUILD)
list(APPEND extra_args "IS_INPLACE")
endif()

if(MORPHEUS_PYTHON_BUILD_WHEEL)
list(APPEND extra_args "BUILD_WHEEL")
endif()

if(MORPHEUS_PYTHON_PERFORM_INSTALL)
list(APPEND extra_args "INSTALL_WHEEL")
endif()

file(GLOB morpheus_data_files "${CMAKE_CURRENT_SOURCE_DIR}/morpheus/data/*")
morpheus_utils_add_python_sources(${morpheus_data_files})

morpheus_utils_build_python_package(morpheus ${extra_args})

list(POP_BACK CMAKE_MESSAGE_CONTEXT)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions python/morpheus/morpheus/data
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading