Skip to content
Snippets Groups Projects
Verified Commit 0d884865 authored by Lars Bilke's avatar Lars Bilke
Browse files

Review comments.

parent ee7fa80d
No related branches found
No related tags found
No related merge requests found
...@@ -17,5 +17,5 @@ target_link_libraries( ...@@ -17,5 +17,5 @@ target_link_libraries(
) )
target_include_directories(simulator PRIVATE ../../CLI) target_include_directories(simulator PRIVATE ../../CLI)
# Install into Python module root dir (enables 'import ogs.callbacks') # Install into Python module root dir (enables 'import ogs.simulator')
install(TARGETS simulator LIBRARY DESTINATION ogs) install(TARGETS simulator LIBRARY DESTINATION ogs)
...@@ -4,6 +4,8 @@ import subprocess ...@@ -4,6 +4,8 @@ import subprocess
import sys import sys
from pathlib import Path from pathlib import Path
# Here, we assume that this script is installed, e.g., in a virtual environment
# alongside a "bin" directory.
OGS_BIN_DIR = Path(__file__).parent.parent.parent / "bin" OGS_BIN_DIR = Path(__file__).parent.parent.parent / "bin"
binaries_list = [ binaries_list = [
...@@ -72,7 +74,7 @@ binaries_list = [ ...@@ -72,7 +74,7 @@ binaries_list = [
] ]
def pyproject_get_scripts(): def pyproject_get_binaries():
return { return {
binary: f"ogs._internal.provide_ogs_cli_tools_via_wheel:{binary}" binary: f"ogs._internal.provide_ogs_cli_tools_via_wheel:{binary}"
for binary in binaries_list for binary in binaries_list
......
...@@ -3,6 +3,8 @@ from pathlib import Path ...@@ -3,6 +3,8 @@ from pathlib import Path
from .provide_ogs_cli_tools_via_wheel import binaries_list, ogs_with_args from .provide_ogs_cli_tools_via_wheel import binaries_list, ogs_with_args
# Here, we assume that this script is installed, e.g., in a virtual environment
# alongside a "bin" directory.
OGS_BIN_DIR = Path(__file__).parent.parent.parent / "bin" OGS_BIN_DIR = Path(__file__).parent.parent.parent / "bin"
......
...@@ -39,9 +39,9 @@ write_to = "Applications/Python/_version.py" ...@@ -39,9 +39,9 @@ write_to = "Applications/Python/_version.py"
write_to_template = '__version__ = "{version}"' write_to_template = '__version__ = "{version}"'
version_scheme = "no-guess-dev" version_scheme = "no-guess-dev"
git_describe_command = 'git describe --dirty --tags --long --match "*[0-9]*" --abbrev=8' git_describe_command = 'git describe --dirty --tags --long --match "*[0-9]*" --abbrev=8'
# TODO neither local_scheme callable (https://github.com/pypa/setuptools_scm/issues/832) # local_scheme should be node-and-date by default and no-local-version in CI.
# or env var (https://github.com/pypa/setuptools_scm/issues/455) does not work. # Unfortunately setting via env var does not work.
# Should be node-and-date by default and no-local-version in CI # See https://github.com/pypa/setuptools_scm/issues/455.
local_scheme = "no-local-version" local_scheme = "no-local-version"
[tool.pytest.ini_options] [tool.pytest.ini_options]
......
from __future__ import annotations from __future__ import annotations
import sys import sys
import os from pathlib import Path
sys.path.append(os.path.join("Applications", "Python")) sys.path.append(str(Path("Applications").joinpath("Python").absolute()))
from ogs._internal.provide_ogs_cli_tools_via_wheel import pyproject_get_scripts from ogs._internal.provide_ogs_cli_tools_via_wheel import pyproject_get_binaries
__all__ = ["dynamic_metadata"] __all__ = ["dynamic_metadata"]
...@@ -25,10 +25,4 @@ def dynamic_metadata( ...@@ -25,10 +25,4 @@ def dynamic_metadata(
msg = "No inline configuration is supported" msg = "No inline configuration is supported"
raise ValueError(msg) raise ValueError(msg)
# Structure for entry-points return {"scripts": pyproject_get_binaries()}
# eps = {
# "console_scripts": {"ogs": "ogs._internal.provide_ogs_cli_tools_via_wheel:ogs"}
# }
# scripts = {"ogs": "ogs._internal.provide_ogs_cli_tools_via_wheel:ogs"}
return {"scripts": pyproject_get_scripts()}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment