-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
276922a
commit c9a7257
Showing
11 changed files
with
244 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
src/rabbitmq_cpp_stage/_version.py export-subst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include src/rabbitmq_cpp_stage/_version.py | ||
recursive-include src *.so *.pyi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
# 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. | ||
|
||
set -x | ||
set -e | ||
|
||
# Optionally can set INSTALL_PREFIX to build and install to a specific directory. Also causes cmake install to run | ||
BUILD_DIR=${BUILD_DIR:-"build"} | ||
|
||
echo "Runing CMake configure..." | ||
cmake -B ${BUILD_DIR} -GNinja \ | ||
-DCMAKE_MESSAGE_CONTEXT_SHOW=ON \ | ||
-DMORPHEUS_PYTHON_INPLACE_BUILD:BOOL=ON \ | ||
-DMORPHEUS_PYTHON_PERFORM_INSTALL:BOOL=ON `# Ensure all of the libraries are installed` \ | ||
${CMAKE_CONFIGURE_EXTRA_ARGS:+CMAKE_CONFIGURE_EXTRA_ARGS} . | ||
|
||
echo "Running CMake build..." | ||
cmake --build ${BUILD_DIR} -j "$@" |
33 changes: 33 additions & 0 deletions
33
examples/developer_guide/4_rabbitmq_cpp_stage/pyproject.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# SPDX-FileCopyrightText: Copyright (c) 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. | ||
|
||
[build-system] | ||
build-backend = "setuptools.build_meta" | ||
requires = ["setuptools", "wheel", "versioneer[toml]==0.29"] | ||
|
||
[tool.versioneer] | ||
# See the docstring in versioneer.py for instructions. Note that you must | ||
# re-run 'versioneer.py setup' after changing this section, and commit the | ||
# resulting files. | ||
VCS = "git" | ||
style = "pep440" | ||
tag_prefix = "v" | ||
versionfile_build = "src/rabbitmq_cpp_stage/_version.py" | ||
versionfile_source = "src/rabbitmq_cpp_stage/_version.py" | ||
|
||
[tool.yapfignore] | ||
ignore_patterns = [ | ||
"**/_version.py", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# SPDX-FileCopyrightText: Copyright (c) 2023-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. | ||
|
||
[metadata] | ||
name = rabbitmq_cpp_stage | ||
version = attr: versioneer.get_version | ||
description = Morpheus Example - RabbitMQ C++ Stage | ||
author = NVIDIA Corporation | ||
license = Apache | ||
classifiers = | ||
Intended Audience :: Developers | ||
Programming Language :: Python | ||
Programming Language :: Python :: 3.10 | ||
|
||
[options] | ||
zip_safe = False | ||
include_package_data = True | ||
packages = find: | ||
package_dir = | ||
=src | ||
|
||
[options.packages.find] | ||
where = src |
31 changes: 31 additions & 0 deletions
31
examples/developer_guide/4_rabbitmq_cpp_stage/src/rabbitmq_cpp_stage/_lib/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# SPDX-FileCopyrightText: Copyright (c) 2022-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 "rabbitmq_cpp_stage") | ||
|
||
morpheus_add_pybind11_module(rabbitmq_cpp_stage | ||
SOURCE_FILES | ||
"rabbitmq_source.cpp" | ||
INCLUDE_DIRS | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
${SimpleAmqpClient_SOURCE_DIR}/src | ||
LINK_TARGETS | ||
morpheus | ||
mrc::pymrc | ||
rabbitmq | ||
SimpleAmqpClient | ||
) | ||
|
||
list(POP_BACK CMAKE_MESSAGE_CONTEXT) |
15 changes: 15 additions & 0 deletions
15
...er_guide/4_rabbitmq_cpp_stage/src/rabbitmq_cpp_stage/_lib/rabbitmq_cpp_stage/__init__.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from __future__ import annotations | ||
import src.rabbitmq_cpp_stage._lib.rabbitmq_cpp_stage | ||
import typing | ||
import datetime | ||
import morpheus._lib.messages | ||
import mrc.core.segment | ||
|
||
__all__ = [ | ||
"RabbitMQSourceStage" | ||
] | ||
|
||
|
||
class RabbitMQSourceStage(mrc.core.segment.SegmentObject): | ||
def __init__(self, builder: mrc.core.segment.Builder, name: str, host: str, exchange: str, exchange_type: str = 'fanout', queue_name: str = '', poll_interval: datetime.timedelta = datetime.timedelta(microseconds=100000)) -> None: ... | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters