From 5967db6bb8fb084c1f772f6d376896cf9b036c77 Mon Sep 17 00:00:00 2001 From: khodowany Date: Wed, 30 Sep 2026 19:46:16 -0500 Subject: [PATCH] Package --- .gitea/workflows/ci.yml | 2 +- CMakeLists.txt | 12 ++++++------ cmake/luma_config.cmake.in | 2 +- modulus.py | 13 +++++++++---- tests/CMakeLists.txt | 12 ++++++------ 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 705ff77..1a73d14 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -93,7 +93,7 @@ jobs: run: python3 modulus.py configure --target x86_64_gcc12_release --update - name: Check code style run: | - python3 -m pip install --no-cache-dir -r build/build_tools/docker/format-requirements.txt + python3 -m pip install --no-cache-dir -r build/build_tools/docker/format_requirements.txt python3 modulus.py format --check - name: Build native release run: python3 modulus.py build --target x86_64_gcc12_release diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d75098..47e85a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,7 @@ if(BUILD_TESTING) endif() install(TARGETS luma - EXPORT luma-targets + EXPORT luma_targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} @@ -53,25 +53,25 @@ install(TARGETS luma install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -install(EXPORT luma-targets +install(EXPORT luma_targets NAMESPACE luma:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/luma ) configure_package_config_file( ${CMAKE_CURRENT_SOURCE_DIR}/cmake/luma_config.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/luma-config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/lumaConfig.cmake INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/luma ) write_basic_package_version_file( - ${CMAKE_CURRENT_BINARY_DIR}/luma-config-version.cmake + ${CMAKE_CURRENT_BINARY_DIR}/lumaConfigVersion.cmake VERSION ${PROJECT_VERSION} COMPATIBILITY SameMajorVersion ) install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/luma-config.cmake - ${CMAKE_CURRENT_BINARY_DIR}/luma-config-version.cmake + ${CMAKE_CURRENT_BINARY_DIR}/lumaConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/lumaConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/luma ) diff --git a/cmake/luma_config.cmake.in b/cmake/luma_config.cmake.in index 75dd86f..98e215e 100644 --- a/cmake/luma_config.cmake.in +++ b/cmake/luma_config.cmake.in @@ -3,4 +3,4 @@ include(CMakeFindDependencyMacro) find_dependency(modulus CONFIG REQUIRED COMPONENTS boost_json raylib) -include("${CMAKE_CURRENT_LIST_DIR}/luma-targets.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/luma_targets.cmake") diff --git a/modulus.py b/modulus.py index 856cec7..78060be 100755 --- a/modulus.py +++ b/modulus.py @@ -9,7 +9,7 @@ import sys PACKAGE_REF = "modulus/latest" CONAN_VERSION = "2.26.2" -FETCH_IMAGE = "modulus-fetch:dev" +FETCH_IMAGE = "modulus_fetch:dev" COMMANDS = ( "configure", "build", @@ -19,6 +19,8 @@ COMMANDS = ( "clangd", "format", "run", + "python", + "publish", ) COMMON_DIR = pathlib.Path("build") / "build_common" TOOLS_DIR = pathlib.Path("build") / "build_tools" @@ -26,7 +28,7 @@ RUNTIME_DIR = COMMON_DIR / "modulus" CONAN_HOME_DIR = COMMON_DIR / "conan_cache" DEFAULT_REMOTE_NAME = "khodo" DEFAULT_REMOTE_URL = "https://git.thyme-labs.com/api/packages/khodo/conan" -DEFAULT_DOCKER_MARKER = "/opt/modulus-build-image" +DEFAULT_DOCKER_MARKER = "/opt/modulus_build_image" def repo_root(): root = pathlib.Path(__file__).resolve().parent @@ -66,6 +68,9 @@ def runtime_ready(root): and (root / TOOLS_DIR / "format.py").is_file() and (root / RUNTIME_DIR / "modulus" / "formatting.py").is_file() and (root / RUNTIME_DIR / "modulus" / "format_layout.py").is_file() + and (root / RUNTIME_DIR / "modulus" / "python.py").is_file() + and (root / RUNTIME_DIR / "modulus" / "artifacts.py").is_file() + and (root / TOOLS_DIR / "python_runner.py").is_file() ) def env_flag(name): @@ -114,9 +119,9 @@ RUN apt-get update \\ python3-venv \\ && rm -rf /var/lib/apt/lists/* -RUN python3 -m venv /opt/modulus-python +RUN python3 -m venv /opt/modulus_python -ENV PATH=/opt/modulus-python/bin:$PATH +ENV PATH=/opt/modulus_python/bin:$PATH RUN python -m pip install --no-cache-dir conan=={CONAN_VERSION} diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0b632a5..5ab8677 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,22 +1,22 @@ -add_executable(luma-test +add_executable(luma_test test.cpp ) find_package(Threads REQUIRED) -target_include_directories(luma-test PRIVATE +target_include_directories(luma_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ) -target_link_libraries(luma-test PRIVATE +target_link_libraries(luma_test PRIVATE luma::luma Threads::Threads ) -target_compile_features(luma-test PRIVATE cxx_std_23) -target_compile_definitions(luma-test PRIVATE +target_compile_features(luma_test PRIVATE cxx_std_23) +target_compile_definitions(luma_test PRIVATE $<$:LUMA_EXPECT_DEBUG_ASSERTS> $<$:LUMA_EXPECT_NDEBUG> $<$:LUMA_EXPECT_NDEBUG> $<$:LUMA_EXPECT_NDEBUG> ) -add_test(NAME luma COMMAND luma-test) +add_test(NAME luma COMMAND luma_test) set_tests_properties(luma PROPERTIES TIMEOUT 20) add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}