proj-flow 0.16.0__tar.gz → 0.17.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {proj_flow-0.16.0 → proj_flow-0.17.0}/CHANGELOG.rst +8 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/PKG-INFO +1 -1
- {proj_flow-0.16.0 → proj_flow-0.17.0}/actions/bootstrap/action.yml +3 -1
- {proj_flow-0.16.0 → proj_flow-0.17.0}/actions/bootstrap/version.py +4 -1
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/__init__.py +1 -1
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/cplusplus/cmake/__init__.py +2 -2
- proj_flow-0.17.0/src/proj_flow/ext/cplusplus/cmake/presets.py +160 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/cplusplus/cmake/steps.py +9 -4
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/minimal/ext/bug_report.py +2 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/.flow/config.yaml +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/.gitignore +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/.readthedocs.yaml +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/LICENSE +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/README.md +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/ROADMAP.md +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/pyproject.toml +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/__main__.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/api/__init__.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/api/arg.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/api/completers.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/api/ctx.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/api/env.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/api/init.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/api/makefile.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/api/release.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/api/step.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/base/__cmake_version__.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/base/__init__.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/base/cmd.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/base/inspect.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/base/matrix.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/base/name_list.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/base/plugins.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/base/registry.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/base/uname.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/cli/__init__.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/cli/argument.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/cli/finder.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/dependency.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/__init__.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/cplusplus/__init__.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/cplusplus/cmake/parser.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/cplusplus/cmake/project.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/cplusplus/conan/__init__.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/cplusplus/conan/_conan.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/github/__init__.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/github/cli.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/github/hosting.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/github/publishing.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/github/switches.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/markdown_changelog.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/python/__init__.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/python/rtdocs.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/python/steps.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/python/version.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/re_structured_changelog.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/sign/__init__.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/sign/api.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/sign/win32.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/ext/store.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/flow/__init__.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/flow/configs.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/flow/layer.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/flow/steps.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/log/__init__.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/log/commit.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/log/error.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/log/fmt.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/log/format.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/log/hosting/__init__.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/log/hosting/github.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/log/msg.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/log/release.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/log/rich_text/__init__.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/log/rich_text/api.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/log/rich_text/markdown.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/log/rich_text/re_structured_text.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/minimal/__init__.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/minimal/base.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/minimal/bootstrap.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/minimal/init.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/minimal/list.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/minimal/run.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/minimal/system.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/project/__init__.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/project/api.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/project/cplusplus/__init__.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/project/cplusplus/cmake_context.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/project/cplusplus/conan_context.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/project/cplusplus/project.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/project/data.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/project/interact.py +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/base/.clang-format +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/base/.flow/config.yml +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/base/.flow/flow.py.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/base/.flow/matrix.yml +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/base/.flow/official.yml +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/base/.gitignore +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/base/README.md.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/base/flow +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/base/flow.cmd +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/base.json +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/.flow/cmake/common.cmake.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/.flow/extensions/wall/__init__.py.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/.flow/extensions/wall/icons/__init__.py.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/.flow/extensions/wall/icons/magick.py.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/.flow/packages/base.cmake.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/.flow/packages/config.cmake +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/.flow/packages/cpack.cmake +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/.flow/packages/wix/cpack.cmake.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/.flow/packages/wix/patches.in.wix +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/.flow/packages/wix.cmake.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/CMakeGraphVizOptions.cmake +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/CMakeLists.txt.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/CMakePresets.json +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/data/assets/appicon.ico +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/data/assets/appicon.png +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/data/assets/wix_banner.bmp +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/data/assets/wix_dialog.bmp +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/data/icons/.gitignore +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/data/icons/appicon-mask.svg +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/data/icons/appicon.svg +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/src/main.cc.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/src/version.hpp.in.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/tests/test.cc.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake.json +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/conan/.flow/cmake/libcxx_toolchain.cmake +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/conan/.flow/cmake/output_dirs_setup.cmake +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/conan/conanfile.txt +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/conan.json +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/github_actions/.github/linters/.isort.cfg +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/github_actions/.github/linters/.mypy.ini +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/github_actions/.github/workflows/build.yml.auto-release +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/github_actions/.github/workflows/build.yml.basic +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/github_actions/.github/workflows/linter.yml +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/github_actions/CPPLINT.cfg +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/github_actions.json +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/github_social/.github/ISSUE_TEMPLATE/bug_report.md.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/github_social/.github/ISSUE_TEMPLATE/feature_request.md.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/github_social/CODE_OF_CONDUCT.md.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/github_social/CONTRIBUTING.md +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/github_social.json +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/licenses/0BSD.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/licenses/MIT.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/licenses/Unlicense.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/licenses/WTFPL.mustache +0 -0
- {proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/licenses/Zlib.mustache +0 -0
|
@@ -4,6 +4,14 @@ Changelog
|
|
|
4
4
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
|
|
7
|
+
`0.17.0 <https://github.com/mzdun/proj-flow/compare/v0.16.0...v0.17.0>`_ (2025-08-28)
|
|
8
|
+
=====================================================================================
|
|
9
|
+
|
|
10
|
+
New Features
|
|
11
|
+
------------
|
|
12
|
+
|
|
13
|
+
- use CMake presets to find binary directory (`2312366 <https://github.com/mzdun/proj-flow/commit/2312366ace1ba2152490c5aa710db82b982bbc02>`_)
|
|
14
|
+
|
|
7
15
|
`0.16.0 <https://github.com/mzdun/proj-flow/compare/v0.15.3...v0.16.0>`_ (2025-03-02)
|
|
8
16
|
=====================================================================================
|
|
9
17
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: proj-flow
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.17.0
|
|
4
4
|
Summary: C++ project maintenance, automated
|
|
5
5
|
Project-URL: Changelog, https://github.com/mzdun/proj-flow/blob/main/CHANGELOG.rst
|
|
6
6
|
Project-URL: Documentation, https://proj-flow.readthedocs.io/en/latest/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
name: Python + Project Flow bootstrap
|
|
2
|
+
description: Sets up Flow for current checkout.
|
|
2
3
|
author: Marcin Zdun
|
|
3
4
|
|
|
4
5
|
inputs:
|
|
@@ -29,11 +30,12 @@ runs:
|
|
|
29
30
|
import os
|
|
30
31
|
import sys
|
|
31
32
|
|
|
32
|
-
ACTION_PATH =
|
|
33
|
+
ACTION_PATH = os.environ['ACTION_PATH'].replace('/', os.sep)
|
|
33
34
|
sys.path.insert(0, ACTION_PATH)
|
|
34
35
|
|
|
35
36
|
import version
|
|
36
37
|
env:
|
|
38
|
+
ACTION_PATH: ${{ github.action_path }}
|
|
37
39
|
RUNNER_CONTEXT: ${{ toJson(runner) }}
|
|
38
40
|
|
|
39
41
|
- name: .flow/.venv cache
|
|
@@ -7,6 +7,6 @@ The **proj_flow.ext.cplusplus.cmake** provides ``"CMake"``, ``"Build"``,
|
|
|
7
7
|
context.
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
-
from . import parser, project, steps
|
|
10
|
+
from . import parser, presets, project, steps
|
|
11
11
|
|
|
12
|
-
__all__ = ["parser", "project", "steps"]
|
|
12
|
+
__all__ = ["parser", "presets", "project", "steps"]
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Copyright (c) 2025 Marcin Zdun
|
|
2
|
+
# This code is licensed under MIT license (see LICENSE for details)
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
The **proj_flow.ext.cplusplus.cmake.presets** check build directories for CMake step.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import json
|
|
9
|
+
import os
|
|
10
|
+
import platform
|
|
11
|
+
from dataclasses import dataclass
|
|
12
|
+
from enum import Enum
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
from typing import cast
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class MacroType(Enum):
|
|
18
|
+
PRESET_NAME = 1
|
|
19
|
+
GENERATOR = 2
|
|
20
|
+
FILE_DIR = 3
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
CMAKE_SOURCE_DIR = Path(".").resolve()
|
|
24
|
+
CMAKE_HOST_SYSTEM_NAME = platform.uname().system
|
|
25
|
+
|
|
26
|
+
MACROS: dict[str, Path | str | MacroType] = {
|
|
27
|
+
"${sourceDir}": CMAKE_SOURCE_DIR,
|
|
28
|
+
"${sourceParentDir}": CMAKE_SOURCE_DIR.parent,
|
|
29
|
+
"${sourceDirName}": CMAKE_SOURCE_DIR.name,
|
|
30
|
+
"${presetName}": MacroType.PRESET_NAME,
|
|
31
|
+
"${generator}": MacroType.GENERATOR,
|
|
32
|
+
"${hostSystemName}": CMAKE_HOST_SYSTEM_NAME,
|
|
33
|
+
"${fileDir}": MacroType.FILE_DIR,
|
|
34
|
+
"${dollar}": "$",
|
|
35
|
+
"${pathListSep}": os.pathsep,
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@dataclass
|
|
40
|
+
class Preset:
|
|
41
|
+
name: str
|
|
42
|
+
binary_dir: str | None
|
|
43
|
+
generator: str | None
|
|
44
|
+
inherits: list[str]
|
|
45
|
+
file_dir: Path
|
|
46
|
+
|
|
47
|
+
def expand(self):
|
|
48
|
+
if not self.binary_dir:
|
|
49
|
+
return None
|
|
50
|
+
chunks = self.binary_dir.split("${")
|
|
51
|
+
parts: list[str | Path | MacroType] = [chunks[0]]
|
|
52
|
+
for chunk in chunks[1:]:
|
|
53
|
+
var_suffix = chunk.split("}", 1)
|
|
54
|
+
if len(var_suffix) != 2:
|
|
55
|
+
return None
|
|
56
|
+
key = f"${{{var_suffix[0]}}}"
|
|
57
|
+
value = MACROS.get(key, "")
|
|
58
|
+
if isinstance(value, MacroType):
|
|
59
|
+
if value == MacroType.PRESET_NAME:
|
|
60
|
+
value = self.name
|
|
61
|
+
elif value == MacroType.GENERATOR:
|
|
62
|
+
value = self.generator or ""
|
|
63
|
+
elif value == MacroType.FILE_DIR:
|
|
64
|
+
value = self.file_dir
|
|
65
|
+
elif isinstance(value, Path):
|
|
66
|
+
if value.is_absolute():
|
|
67
|
+
parts = []
|
|
68
|
+
value = str(value)
|
|
69
|
+
parts.append(value)
|
|
70
|
+
parts.append(var_suffix[1])
|
|
71
|
+
|
|
72
|
+
return Path("".join(str(part) for part in parts))
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class Presets:
|
|
76
|
+
def __init__(self):
|
|
77
|
+
self.seen = cast(set[Path], set())
|
|
78
|
+
self.result = cast(dict[str, Preset], {})
|
|
79
|
+
|
|
80
|
+
def visit_file(self, filename: Path):
|
|
81
|
+
dirname = self.__parent_from_file(filename)
|
|
82
|
+
if dirname is None:
|
|
83
|
+
return self.result
|
|
84
|
+
|
|
85
|
+
includes, presets = Presets.__load_file(filename)
|
|
86
|
+
self.__visit_includes(dirname, includes)
|
|
87
|
+
for preset in presets:
|
|
88
|
+
self.__visit_preset(dirname, preset)
|
|
89
|
+
for preset in self.result.values():
|
|
90
|
+
self.__merge_preset(preset)
|
|
91
|
+
|
|
92
|
+
return self.result
|
|
93
|
+
|
|
94
|
+
def __parent_from_file(self, filename: Path):
|
|
95
|
+
key = filename.resolve()
|
|
96
|
+
if key in self.seen:
|
|
97
|
+
return None
|
|
98
|
+
self.seen.add(key)
|
|
99
|
+
return key.parent
|
|
100
|
+
|
|
101
|
+
def __visit_includes(self, dirname: Path, includes: list[str]):
|
|
102
|
+
for include in includes:
|
|
103
|
+
self.visit_file(dirname / include)
|
|
104
|
+
|
|
105
|
+
def __visit_preset(self, dirname: Path, preset: dict):
|
|
106
|
+
name = cast(str | None, preset.get("name"))
|
|
107
|
+
if name is None:
|
|
108
|
+
return
|
|
109
|
+
binary_dir = cast(str | None, preset.get("binaryDir"))
|
|
110
|
+
generator = cast(str | None, preset.get("generator"))
|
|
111
|
+
inherits = cast(list[str], preset.get("inherits", []))
|
|
112
|
+
self.result[name] = Preset(
|
|
113
|
+
name=name,
|
|
114
|
+
binary_dir=binary_dir,
|
|
115
|
+
generator=generator,
|
|
116
|
+
inherits=inherits,
|
|
117
|
+
file_dir=dirname,
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
def __merge_preset(self, preset: Preset):
|
|
121
|
+
inherits: list[str] = []
|
|
122
|
+
inherits.extend(preset.inherits)
|
|
123
|
+
while inherits:
|
|
124
|
+
parent = inherits[0]
|
|
125
|
+
inherits = inherits[1:]
|
|
126
|
+
if parent not in self.result:
|
|
127
|
+
continue
|
|
128
|
+
parent_preset = self.result[parent]
|
|
129
|
+
inherits.extend(parent_preset.inherits)
|
|
130
|
+
|
|
131
|
+
if parent_preset.binary_dir and not preset.binary_dir:
|
|
132
|
+
preset.binary_dir = parent_preset.binary_dir
|
|
133
|
+
if parent_preset.generator and not preset.generator:
|
|
134
|
+
preset.generator = parent_preset.generator
|
|
135
|
+
|
|
136
|
+
@staticmethod
|
|
137
|
+
def __load_file(filename: Path):
|
|
138
|
+
with open(filename, encoding="UTF-8") as f:
|
|
139
|
+
data = json.load(f)
|
|
140
|
+
includes = cast(list[str], data.get("include", []))
|
|
141
|
+
presets = cast(list[dict], data.get("configurePresets", []))
|
|
142
|
+
|
|
143
|
+
return (includes, presets)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
def get_binary_dirs():
|
|
147
|
+
presets = Presets().visit_file(Path("CMakePresets.json"))
|
|
148
|
+
|
|
149
|
+
cwd = str(Path.cwd().as_posix()) + "/"
|
|
150
|
+
result: dict[str, str] = {}
|
|
151
|
+
for preset in presets.values():
|
|
152
|
+
dirname = preset.expand()
|
|
153
|
+
if dirname is None:
|
|
154
|
+
continue
|
|
155
|
+
rel = str(dirname.as_posix())
|
|
156
|
+
if rel[: len(cwd)] == cwd:
|
|
157
|
+
rel = rel[len(cwd) :]
|
|
158
|
+
result[preset.name] = rel
|
|
159
|
+
|
|
160
|
+
return result
|
|
@@ -12,6 +12,7 @@ from typing import Dict, List, cast
|
|
|
12
12
|
from proj_flow import api
|
|
13
13
|
from proj_flow.api import env, step
|
|
14
14
|
from proj_flow.base.__cmake_version__ import CMAKE_VERSION
|
|
15
|
+
from proj_flow.ext.cplusplus.cmake.presets import get_binary_dirs
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
class CMakeBase(api.step.Step):
|
|
@@ -39,7 +40,7 @@ class CMakeBase(api.step.Step):
|
|
|
39
40
|
self._runs_after = runs_after
|
|
40
41
|
self._runs_before = runs_before
|
|
41
42
|
|
|
42
|
-
def is_active(self, config: api.env.Config, rt: api.env.Runtime) ->
|
|
43
|
+
def is_active(self, config: api.env.Config, rt: api.env.Runtime) -> bool:
|
|
43
44
|
return os.path.isfile("CMakeLists.txt") and os.path.isfile("CMakePresets.json")
|
|
44
45
|
|
|
45
46
|
def platform_dependencies(self):
|
|
@@ -55,12 +56,16 @@ class CMakeConfig(CMakeBase):
|
|
|
55
56
|
|
|
56
57
|
def __init__(self):
|
|
57
58
|
super().__init__(name="CMake")
|
|
59
|
+
self.binary_dirs = get_binary_dirs()
|
|
58
60
|
|
|
59
|
-
def is_active(self, config: env.Config, rt: env.Runtime) ->
|
|
61
|
+
def is_active(self, config: env.Config, rt: env.Runtime) -> bool:
|
|
60
62
|
return os.path.isfile("CMakeLists.txt") and os.path.isfile("CMakePresets.json")
|
|
61
63
|
|
|
62
64
|
def directories_to_remove(self, config: env.Config) -> List[str]:
|
|
63
|
-
|
|
65
|
+
binary_dir = self.binary_dirs.get(f"{config.preset}-{config.build_generator}")
|
|
66
|
+
if not binary_dir:
|
|
67
|
+
return []
|
|
68
|
+
return [binary_dir]
|
|
64
69
|
|
|
65
70
|
def run(self, config: env.Config, rt: env.Runtime) -> int:
|
|
66
71
|
cmake_vars = cast(Dict[str, str], rt._cfg.get("cmake", {}).get("vars", {}))
|
|
@@ -130,7 +135,7 @@ class PackStep(CMakeBase):
|
|
|
130
135
|
def platform_dependencies(self):
|
|
131
136
|
return self.dep_with_tool("cpack")
|
|
132
137
|
|
|
133
|
-
def is_active(self, config: env.Config, rt: env.Runtime) ->
|
|
138
|
+
def is_active(self, config: env.Config, rt: env.Runtime) -> bool:
|
|
134
139
|
return (
|
|
135
140
|
super().is_active(config, rt)
|
|
136
141
|
and len(config.items.get("cpack_generator", [])) > 0
|
|
@@ -25,6 +25,7 @@ def _version(ver: str) -> Tuple[int, int, int, str]:
|
|
|
25
25
|
raise SystemExit(1)
|
|
26
26
|
return (int(m.group(1)), int(m.group(2)), int(m.group(3)), ver)
|
|
27
27
|
|
|
28
|
+
|
|
28
29
|
def _prev_version(new_version: str, tags: List[str]):
|
|
29
30
|
current = _version(new_version)
|
|
30
31
|
versions = [_version(tag) for tag in reversed(tags)]
|
|
@@ -40,6 +41,7 @@ def _prev_version(new_version: str, tags: List[str]):
|
|
|
40
41
|
|
|
41
42
|
return None if index > len(versions) else versions[index][-1]
|
|
42
43
|
|
|
44
|
+
|
|
43
45
|
@release.version_updaters.add
|
|
44
46
|
class VersionUpdater(release.VersionUpdater):
|
|
45
47
|
def on_version_change_tags(self, new_version: str, tags: List[str]):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/base/.flow/flow.py.mustache
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/.flow/packages/cpack.cmake
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/CMakeGraphVizOptions.cmake
RENAMED
|
File without changes
|
{proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/CMakeLists.txt.mustache
RENAMED
|
File without changes
|
|
File without changes
|
{proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/data/assets/appicon.ico
RENAMED
|
File without changes
|
{proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/data/assets/appicon.png
RENAMED
|
File without changes
|
{proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/data/assets/wix_banner.bmp
RENAMED
|
File without changes
|
{proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/data/assets/wix_dialog.bmp
RENAMED
|
File without changes
|
{proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/data/icons/.gitignore
RENAMED
|
File without changes
|
|
File without changes
|
{proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/data/icons/appicon.svg
RENAMED
|
File without changes
|
{proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/src/main.cc.mustache
RENAMED
|
File without changes
|
|
File without changes
|
{proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/cmake/tests/test.cc.mustache
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/github_actions/CPPLINT.cfg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{proj_flow-0.16.0 → proj_flow-0.17.0}/src/proj_flow/template/layers/github_social/CONTRIBUTING.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|