From c3cbf8ca23dcad4c68bc5472ddf8554466649ef5 Mon Sep 17 00:00:00 2001 From: ZtRXR Date: Sat, 15 Jun 2024 22:17:28 +0800 Subject: [PATCH] update to pdm --- .gitignore | 167 +++++++- .vscode/PythonImportHelper-v2-Completion.json | 363 ++++++++++++++++++ pyproject.toml | 20 +- {pymake => src/pymake}/__init__.py | 0 {pymake => src/pymake}/__main__.py | 0 {pymake => src/pymake}/cmake.py | 0 {pymake => src/pymake}/tools.py | 0 {pymake => src/pymake}/values.py | 0 tests/__init__.py | 0 9 files changed, 530 insertions(+), 20 deletions(-) create mode 100644 .vscode/PythonImportHelper-v2-Completion.json rename {pymake => src/pymake}/__init__.py (100%) rename {pymake => src/pymake}/__main__.py (100%) rename {pymake => src/pymake}/cmake.py (100%) rename {pymake => src/pymake}/tools.py (100%) rename {pymake => src/pymake}/values.py (100%) create mode 100644 tests/__init__.py diff --git a/.gitignore b/.gitignore index 128d40b..3a8816c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,162 @@ -# Ignore the 'dist' directory at the root of the project -/dist/ - -# Ignore all __pycache__ directories in the project +# Byte-compiled / optimized / DLL files __pycache__/ +*.py[cod] +*$py.class -/.vscode +# C extensions +*.so -/CMakeLists.txt +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST -/main.cxx +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec -/build -/poetry.lock -/test.py \ No newline at end of file +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm-project.org/#use-with-ide +.pdm.toml +.pdm-python +.pdm-build/ + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ diff --git a/.vscode/PythonImportHelper-v2-Completion.json b/.vscode/PythonImportHelper-v2-Completion.json new file mode 100644 index 0000000..4311aee --- /dev/null +++ b/.vscode/PythonImportHelper-v2-Completion.json @@ -0,0 +1,363 @@ +[ + { + "label": "runpy", + "kind": 6, + "isExtraImport": true, + "importPath": "runpy", + "description": "runpy", + "detail": "runpy", + "documentation": {} + }, + { + "label": "annotations", + "importPath": "__future__", + "description": "__future__", + "isExtraImport": true, + "detail": "__future__", + "documentation": {} + }, + { + "label": "os", + "kind": 6, + "isExtraImport": true, + "importPath": "os", + "description": "os", + "detail": "os", + "documentation": {} + }, + { + "label": "site", + "kind": 6, + "isExtraImport": true, + "importPath": "site", + "description": "site", + "detail": "site", + "documentation": {} + }, + { + "label": "sys", + "kind": 6, + "isExtraImport": true, + "importPath": "sys", + "description": "sys", + "detail": "sys", + "documentation": {} + }, + { + "label": "Literal", + "importPath": "typing", + "description": "typing", + "isExtraImport": true, + "detail": "typing", + "documentation": {} + }, + { + "label": "Self", + "importPath": "typing", + "description": "typing", + "isExtraImport": true, + "detail": "typing", + "documentation": {} + }, + { + "label": "Type", + "importPath": "typing", + "description": "typing", + "isExtraImport": true, + "detail": "typing", + "documentation": {} + }, + { + "label": "TypeVar", + "importPath": "typing", + "description": "typing", + "isExtraImport": true, + "detail": "typing", + "documentation": {} + }, + { + "label": "List", + "importPath": "typing", + "description": "typing", + "isExtraImport": true, + "detail": "typing", + "documentation": {} + }, + { + "label": "Tuple", + "importPath": "typing", + "description": "typing", + "isExtraImport": true, + "detail": "typing", + "documentation": {} + }, + { + "label": "Union", + "importPath": "typing", + "description": "typing", + "isExtraImport": true, + "detail": "typing", + "documentation": {} + }, + { + "label": "bin_dir", + "kind": 5, + "importPath": ".venv.Scripts.activate_this", + "description": ".venv.Scripts.activate_this", + "peekOfCode": "bin_dir = os.path.dirname(abs_file)\nbase = bin_dir[: -len(\"Scripts\") - 1] # strip away the bin part from the __file__, plus the path separator\n# prepend bin to PATH (this file is inside the bin directory)\nos.environ[\"PATH\"] = os.pathsep.join([bin_dir, *os.environ.get(\"PATH\", \"\").split(os.pathsep)])\nos.environ[\"VIRTUAL_ENV\"] = base # virtual env is right above bin directory\nos.environ[\"VIRTUAL_ENV_PROMPT\"] = \"pymake-3.12\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"..\\\\Lib\\\\site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))", + "detail": ".venv.Scripts.activate_this", + "documentation": {} + }, + { + "label": "base", + "kind": 5, + "importPath": ".venv.Scripts.activate_this", + "description": ".venv.Scripts.activate_this", + "peekOfCode": "base = bin_dir[: -len(\"Scripts\") - 1] # strip away the bin part from the __file__, plus the path separator\n# prepend bin to PATH (this file is inside the bin directory)\nos.environ[\"PATH\"] = os.pathsep.join([bin_dir, *os.environ.get(\"PATH\", \"\").split(os.pathsep)])\nos.environ[\"VIRTUAL_ENV\"] = base # virtual env is right above bin directory\nos.environ[\"VIRTUAL_ENV_PROMPT\"] = \"pymake-3.12\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"..\\\\Lib\\\\site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)", + "detail": ".venv.Scripts.activate_this", + "documentation": {} + }, + { + "label": "os.environ[\"PATH\"]", + "kind": 5, + "importPath": ".venv.Scripts.activate_this", + "description": ".venv.Scripts.activate_this", + "peekOfCode": "os.environ[\"PATH\"] = os.pathsep.join([bin_dir, *os.environ.get(\"PATH\", \"\").split(os.pathsep)])\nos.environ[\"VIRTUAL_ENV\"] = base # virtual env is right above bin directory\nos.environ[\"VIRTUAL_ENV_PROMPT\"] = \"pymake-3.12\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"..\\\\Lib\\\\site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)\nsys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix", + "detail": ".venv.Scripts.activate_this", + "documentation": {} + }, + { + "label": "os.environ[\"VIRTUAL_ENV\"]", + "kind": 5, + "importPath": ".venv.Scripts.activate_this", + "description": ".venv.Scripts.activate_this", + "peekOfCode": "os.environ[\"VIRTUAL_ENV\"] = base # virtual env is right above bin directory\nos.environ[\"VIRTUAL_ENV_PROMPT\"] = \"pymake-3.12\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"..\\\\Lib\\\\site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)\nsys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix\nsys.prefix = base", + "detail": ".venv.Scripts.activate_this", + "documentation": {} + }, + { + "label": "os.environ[\"VIRTUAL_ENV_PROMPT\"]", + "kind": 5, + "importPath": ".venv.Scripts.activate_this", + "description": ".venv.Scripts.activate_this", + "peekOfCode": "os.environ[\"VIRTUAL_ENV_PROMPT\"] = \"pymake-3.12\" or os.path.basename(base) # noqa: SIM222\n# add the virtual environments libraries to the host python import mechanism\nprev_length = len(sys.path)\nfor lib in \"..\\\\Lib\\\\site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)\nsys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix\nsys.prefix = base", + "detail": ".venv.Scripts.activate_this", + "documentation": {} + }, + { + "label": "prev_length", + "kind": 5, + "importPath": ".venv.Scripts.activate_this", + "description": ".venv.Scripts.activate_this", + "peekOfCode": "prev_length = len(sys.path)\nfor lib in \"..\\\\Lib\\\\site-packages\".split(os.pathsep):\n path = os.path.realpath(os.path.join(bin_dir, lib))\n site.addsitedir(path.decode(\"utf-8\") if \"\" else path)\nsys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix\nsys.prefix = base", + "detail": ".venv.Scripts.activate_this", + "documentation": {} + }, + { + "label": "sys.path[:]", + "kind": 5, + "importPath": ".venv.Scripts.activate_this", + "description": ".venv.Scripts.activate_this", + "peekOfCode": "sys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]\nsys.real_prefix = sys.prefix\nsys.prefix = base", + "detail": ".venv.Scripts.activate_this", + "documentation": {} + }, + { + "label": "sys.real_prefix", + "kind": 5, + "importPath": ".venv.Scripts.activate_this", + "description": ".venv.Scripts.activate_this", + "peekOfCode": "sys.real_prefix = sys.prefix\nsys.prefix = base", + "detail": ".venv.Scripts.activate_this", + "documentation": {} + }, + { + "label": "sys.prefix", + "kind": 5, + "importPath": ".venv.Scripts.activate_this", + "description": ".venv.Scripts.activate_this", + "peekOfCode": "sys.prefix = base", + "detail": ".venv.Scripts.activate_this", + "documentation": {} + }, + { + "label": "cmake", + "kind": 6, + "importPath": "src.pymake.cmake", + "description": "src.pymake.cmake", + "peekOfCode": "class cmake:\n __write_stack__:List[str] = []\n __file_name__:str\n def __init__(self,version_min:str,file_name:str=\"CMakeLists.txt\") -> None:\n self.__file_name__ = file_name\n self.__write_stack__.append(f\"cmake_minimum_required(VERSION {version_min})\")\n def write(self)->None:\n with open(file=self.__file_name__,mode=\"+w\",encoding=\"utf8\") as f:\n for i in self.__write_stack__:\n f.write(i)", + "detail": "src.pymake.cmake", + "documentation": {} + }, + { + "label": "ModesPPI", + "kind": 5, + "importPath": "src.pymake.cmake", + "description": "src.pymake.cmake", + "peekOfCode": "ModesPPI = Literal[\"PUBLIC\",\"PRIVATE\",\"INTERFACE\"]\nModesSSM = Literal[\"STATIC\",\"SHARED\",\"MODULE\"]\nclass cmake:\n __write_stack__:List[str] = []\n __file_name__:str\n def __init__(self,version_min:str,file_name:str=\"CMakeLists.txt\") -> None:\n self.__file_name__ = file_name\n self.__write_stack__.append(f\"cmake_minimum_required(VERSION {version_min})\")\n def write(self)->None:\n with open(file=self.__file_name__,mode=\"+w\",encoding=\"utf8\") as f:", + "detail": "src.pymake.cmake", + "documentation": {} + }, + { + "label": "ModesSSM", + "kind": 5, + "importPath": "src.pymake.cmake", + "description": "src.pymake.cmake", + "peekOfCode": "ModesSSM = Literal[\"STATIC\",\"SHARED\",\"MODULE\"]\nclass cmake:\n __write_stack__:List[str] = []\n __file_name__:str\n def __init__(self,version_min:str,file_name:str=\"CMakeLists.txt\") -> None:\n self.__file_name__ = file_name\n self.__write_stack__.append(f\"cmake_minimum_required(VERSION {version_min})\")\n def write(self)->None:\n with open(file=self.__file_name__,mode=\"+w\",encoding=\"utf8\") as f:\n for i in self.__write_stack__:", + "detail": "src.pymake.cmake", + "documentation": {} + }, + { + "label": "var", + "kind": 2, + "importPath": "src.pymake.tools", + "description": "src.pymake.tools", + "peekOfCode": "def var(name:str)->str:\n return f\"${{{name}}}\"\ndef args_to_str(args:Union[List[str],Tuple[str,...]])->str:\n vars_str = \"\"\n for i in args:\n vars_str=f\"{vars_str} {i}\"\n return vars_str", + "detail": "src.pymake.tools", + "documentation": {} + }, + { + "label": "args_to_str", + "kind": 2, + "importPath": "src.pymake.tools", + "description": "src.pymake.tools", + "peekOfCode": "def args_to_str(args:Union[List[str],Tuple[str,...]])->str:\n vars_str = \"\"\n for i in args:\n vars_str=f\"{vars_str} {i}\"\n return vars_str", + "detail": "src.pymake.tools", + "documentation": {} + }, + { + "label": "cmake_export_compile_commands", + "kind": 5, + "importPath": "src.pymake.values", + "description": "src.pymake.values", + "peekOfCode": "cmake_export_compile_commands = \"CMAKE_EXPORT_COMPILE_COMMANDS\"\nproject_name=\"PROJECT_NAME\"\npublic = \"PUBLIC\"\nstatic = \"STATIC\"\nshared = \"SHARED\"\nmodule = \"MODULE\"\nprivate = \"PRIVATE\"\ninterface = \"INTERFACE\"\nglob_recurse = \"GLOB_RECURSE\"\ncmake_cxx_standard = \"CMAKE_CXX_STANDARD\"", + "detail": "src.pymake.values", + "documentation": {} + }, + { + "label": "public", + "kind": 5, + "importPath": "src.pymake.values", + "description": "src.pymake.values", + "peekOfCode": "public = \"PUBLIC\"\nstatic = \"STATIC\"\nshared = \"SHARED\"\nmodule = \"MODULE\"\nprivate = \"PRIVATE\"\ninterface = \"INTERFACE\"\nglob_recurse = \"GLOB_RECURSE\"\ncmake_cxx_standard = \"CMAKE_CXX_STANDARD\"\ncmake_cxx_flags = \"CMAKE_CXX_FLAGS\"\no3 = \"-O3\"", + "detail": "src.pymake.values", + "documentation": {} + }, + { + "label": "static", + "kind": 5, + "importPath": "src.pymake.values", + "description": "src.pymake.values", + "peekOfCode": "static = \"STATIC\"\nshared = \"SHARED\"\nmodule = \"MODULE\"\nprivate = \"PRIVATE\"\ninterface = \"INTERFACE\"\nglob_recurse = \"GLOB_RECURSE\"\ncmake_cxx_standard = \"CMAKE_CXX_STANDARD\"\ncmake_cxx_flags = \"CMAKE_CXX_FLAGS\"\no3 = \"-O3\"\no2 = \"-O2\"", + "detail": "src.pymake.values", + "documentation": {} + }, + { + "label": "shared", + "kind": 5, + "importPath": "src.pymake.values", + "description": "src.pymake.values", + "peekOfCode": "shared = \"SHARED\"\nmodule = \"MODULE\"\nprivate = \"PRIVATE\"\ninterface = \"INTERFACE\"\nglob_recurse = \"GLOB_RECURSE\"\ncmake_cxx_standard = \"CMAKE_CXX_STANDARD\"\ncmake_cxx_flags = \"CMAKE_CXX_FLAGS\"\no3 = \"-O3\"\no2 = \"-O2\"\ncmake_cxx_flags_release = \"CMAKE_CXX_FLAGS_RELEASE\"", + "detail": "src.pymake.values", + "documentation": {} + }, + { + "label": "module", + "kind": 5, + "importPath": "src.pymake.values", + "description": "src.pymake.values", + "peekOfCode": "module = \"MODULE\"\nprivate = \"PRIVATE\"\ninterface = \"INTERFACE\"\nglob_recurse = \"GLOB_RECURSE\"\ncmake_cxx_standard = \"CMAKE_CXX_STANDARD\"\ncmake_cxx_flags = \"CMAKE_CXX_FLAGS\"\no3 = \"-O3\"\no2 = \"-O2\"\ncmake_cxx_flags_release = \"CMAKE_CXX_FLAGS_RELEASE\"\ncmake_cxx_flags_debug = \"CMAKE_CXX_FLAGS_DEBUG\"", + "detail": "src.pymake.values", + "documentation": {} + }, + { + "label": "private", + "kind": 5, + "importPath": "src.pymake.values", + "description": "src.pymake.values", + "peekOfCode": "private = \"PRIVATE\"\ninterface = \"INTERFACE\"\nglob_recurse = \"GLOB_RECURSE\"\ncmake_cxx_standard = \"CMAKE_CXX_STANDARD\"\ncmake_cxx_flags = \"CMAKE_CXX_FLAGS\"\no3 = \"-O3\"\no2 = \"-O2\"\ncmake_cxx_flags_release = \"CMAKE_CXX_FLAGS_RELEASE\"\ncmake_cxx_flags_debug = \"CMAKE_CXX_FLAGS_DEBUG\"\non=\"ON\"", + "detail": "src.pymake.values", + "documentation": {} + }, + { + "label": "interface", + "kind": 5, + "importPath": "src.pymake.values", + "description": "src.pymake.values", + "peekOfCode": "interface = \"INTERFACE\"\nglob_recurse = \"GLOB_RECURSE\"\ncmake_cxx_standard = \"CMAKE_CXX_STANDARD\"\ncmake_cxx_flags = \"CMAKE_CXX_FLAGS\"\no3 = \"-O3\"\no2 = \"-O2\"\ncmake_cxx_flags_release = \"CMAKE_CXX_FLAGS_RELEASE\"\ncmake_cxx_flags_debug = \"CMAKE_CXX_FLAGS_DEBUG\"\non=\"ON\"\nproject_source_dir = \"PROJECT_SOURCE_DIR\"", + "detail": "src.pymake.values", + "documentation": {} + }, + { + "label": "glob_recurse", + "kind": 5, + "importPath": "src.pymake.values", + "description": "src.pymake.values", + "peekOfCode": "glob_recurse = \"GLOB_RECURSE\"\ncmake_cxx_standard = \"CMAKE_CXX_STANDARD\"\ncmake_cxx_flags = \"CMAKE_CXX_FLAGS\"\no3 = \"-O3\"\no2 = \"-O2\"\ncmake_cxx_flags_release = \"CMAKE_CXX_FLAGS_RELEASE\"\ncmake_cxx_flags_debug = \"CMAKE_CXX_FLAGS_DEBUG\"\non=\"ON\"\nproject_source_dir = \"PROJECT_SOURCE_DIR\"", + "detail": "src.pymake.values", + "documentation": {} + }, + { + "label": "cmake_cxx_standard", + "kind": 5, + "importPath": "src.pymake.values", + "description": "src.pymake.values", + "peekOfCode": "cmake_cxx_standard = \"CMAKE_CXX_STANDARD\"\ncmake_cxx_flags = \"CMAKE_CXX_FLAGS\"\no3 = \"-O3\"\no2 = \"-O2\"\ncmake_cxx_flags_release = \"CMAKE_CXX_FLAGS_RELEASE\"\ncmake_cxx_flags_debug = \"CMAKE_CXX_FLAGS_DEBUG\"\non=\"ON\"\nproject_source_dir = \"PROJECT_SOURCE_DIR\"", + "detail": "src.pymake.values", + "documentation": {} + }, + { + "label": "cmake_cxx_flags", + "kind": 5, + "importPath": "src.pymake.values", + "description": "src.pymake.values", + "peekOfCode": "cmake_cxx_flags = \"CMAKE_CXX_FLAGS\"\no3 = \"-O3\"\no2 = \"-O2\"\ncmake_cxx_flags_release = \"CMAKE_CXX_FLAGS_RELEASE\"\ncmake_cxx_flags_debug = \"CMAKE_CXX_FLAGS_DEBUG\"\non=\"ON\"\nproject_source_dir = \"PROJECT_SOURCE_DIR\"", + "detail": "src.pymake.values", + "documentation": {} + }, + { + "label": "o3", + "kind": 5, + "importPath": "src.pymake.values", + "description": "src.pymake.values", + "peekOfCode": "o3 = \"-O3\"\no2 = \"-O2\"\ncmake_cxx_flags_release = \"CMAKE_CXX_FLAGS_RELEASE\"\ncmake_cxx_flags_debug = \"CMAKE_CXX_FLAGS_DEBUG\"\non=\"ON\"\nproject_source_dir = \"PROJECT_SOURCE_DIR\"", + "detail": "src.pymake.values", + "documentation": {} + }, + { + "label": "o2", + "kind": 5, + "importPath": "src.pymake.values", + "description": "src.pymake.values", + "peekOfCode": "o2 = \"-O2\"\ncmake_cxx_flags_release = \"CMAKE_CXX_FLAGS_RELEASE\"\ncmake_cxx_flags_debug = \"CMAKE_CXX_FLAGS_DEBUG\"\non=\"ON\"\nproject_source_dir = \"PROJECT_SOURCE_DIR\"", + "detail": "src.pymake.values", + "documentation": {} + }, + { + "label": "cmake_cxx_flags_release", + "kind": 5, + "importPath": "src.pymake.values", + "description": "src.pymake.values", + "peekOfCode": "cmake_cxx_flags_release = \"CMAKE_CXX_FLAGS_RELEASE\"\ncmake_cxx_flags_debug = \"CMAKE_CXX_FLAGS_DEBUG\"\non=\"ON\"\nproject_source_dir = \"PROJECT_SOURCE_DIR\"", + "detail": "src.pymake.values", + "documentation": {} + }, + { + "label": "cmake_cxx_flags_debug", + "kind": 5, + "importPath": "src.pymake.values", + "description": "src.pymake.values", + "peekOfCode": "cmake_cxx_flags_debug = \"CMAKE_CXX_FLAGS_DEBUG\"\non=\"ON\"\nproject_source_dir = \"PROJECT_SOURCE_DIR\"", + "detail": "src.pymake.values", + "documentation": {} + }, + { + "label": "project_source_dir", + "kind": 5, + "importPath": "src.pymake.values", + "description": "src.pymake.values", + "peekOfCode": "project_source_dir = \"PROJECT_SOURCE_DIR\"", + "detail": "src.pymake.values", + "documentation": {} + } +] \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 8c949dc..20f179c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,15 +1,15 @@ -[tool.poetry] +[project] name = "pymake" version = "0.1.0" -description = "一个基于函数式编程用于生成cmake文件的python库" -authors = ["Zengtudor"] -license = "MIT" +description = "Default template for PDM package" +authors = [ + {name = "ZtRXR", email = "Zengtudor@outlook.com"}, +] +dependencies = [] +requires-python = "==3.12.*" readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.10" +license = {text = "MIT"} -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +[tool.pdm] +distribution = false diff --git a/pymake/__init__.py b/src/pymake/__init__.py similarity index 100% rename from pymake/__init__.py rename to src/pymake/__init__.py diff --git a/pymake/__main__.py b/src/pymake/__main__.py similarity index 100% rename from pymake/__main__.py rename to src/pymake/__main__.py diff --git a/pymake/cmake.py b/src/pymake/cmake.py similarity index 100% rename from pymake/cmake.py rename to src/pymake/cmake.py diff --git a/pymake/tools.py b/src/pymake/tools.py similarity index 100% rename from pymake/tools.py rename to src/pymake/tools.py diff --git a/pymake/values.py b/src/pymake/values.py similarity index 100% rename from pymake/values.py rename to src/pymake/values.py diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29