update pdm README

This commit is contained in:
ZtRXR 2024-06-15 22:19:14 +08:00
parent c3cbf8ca23
commit 924ea088d1
3 changed files with 239 additions and 3 deletions

View File

@ -99,6 +99,62 @@
"detail": "typing",
"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,
@ -180,6 +236,186 @@
"detail": ".venv.Scripts.activate_this",
"documentation": {}
},
{
"label": "cmake",
"kind": 6,
"importPath": "build.lib.pymake.cmake",
"description": "build.lib.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": "build.lib.pymake.cmake",
"documentation": {}
},
{
"label": "ModesPPI",
"kind": 5,
"importPath": "build.lib.pymake.cmake",
"description": "build.lib.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": "build.lib.pymake.cmake",
"documentation": {}
},
{
"label": "ModesSSM",
"kind": 5,
"importPath": "build.lib.pymake.cmake",
"description": "build.lib.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": "build.lib.pymake.cmake",
"documentation": {}
},
{
"label": "var",
"kind": 2,
"importPath": "build.lib.pymake.tools",
"description": "build.lib.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": "build.lib.pymake.tools",
"documentation": {}
},
{
"label": "args_to_str",
"kind": 2,
"importPath": "build.lib.pymake.tools",
"description": "build.lib.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": "build.lib.pymake.tools",
"documentation": {}
},
{
"label": "cmake_export_compile_commands",
"kind": 5,
"importPath": "build.lib.pymake.values",
"description": "build.lib.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": "build.lib.pymake.values",
"documentation": {}
},
{
"label": "public",
"kind": 5,
"importPath": "build.lib.pymake.values",
"description": "build.lib.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": "build.lib.pymake.values",
"documentation": {}
},
{
"label": "static",
"kind": 5,
"importPath": "build.lib.pymake.values",
"description": "build.lib.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": "build.lib.pymake.values",
"documentation": {}
},
{
"label": "shared",
"kind": 5,
"importPath": "build.lib.pymake.values",
"description": "build.lib.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": "build.lib.pymake.values",
"documentation": {}
},
{
"label": "module",
"kind": 5,
"importPath": "build.lib.pymake.values",
"description": "build.lib.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": "build.lib.pymake.values",
"documentation": {}
},
{
"label": "private",
"kind": 5,
"importPath": "build.lib.pymake.values",
"description": "build.lib.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": "build.lib.pymake.values",
"documentation": {}
},
{
"label": "interface",
"kind": 5,
"importPath": "build.lib.pymake.values",
"description": "build.lib.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": "build.lib.pymake.values",
"documentation": {}
},
{
"label": "glob_recurse",
"kind": 5,
"importPath": "build.lib.pymake.values",
"description": "build.lib.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": "build.lib.pymake.values",
"documentation": {}
},
{
"label": "cmake_cxx_standard",
"kind": 5,
"importPath": "build.lib.pymake.values",
"description": "build.lib.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": "build.lib.pymake.values",
"documentation": {}
},
{
"label": "cmake_cxx_flags",
"kind": 5,
"importPath": "build.lib.pymake.values",
"description": "build.lib.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": "build.lib.pymake.values",
"documentation": {}
},
{
"label": "o3",
"kind": 5,
"importPath": "build.lib.pymake.values",
"description": "build.lib.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": "build.lib.pymake.values",
"documentation": {}
},
{
"label": "o2",
"kind": 5,
"importPath": "build.lib.pymake.values",
"description": "build.lib.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": "build.lib.pymake.values",
"documentation": {}
},
{
"label": "cmake_cxx_flags_release",
"kind": 5,
"importPath": "build.lib.pymake.values",
"description": "build.lib.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": "build.lib.pymake.values",
"documentation": {}
},
{
"label": "cmake_cxx_flags_debug",
"kind": 5,
"importPath": "build.lib.pymake.values",
"description": "build.lib.pymake.values",
"peekOfCode": "cmake_cxx_flags_debug = \"CMAKE_CXX_FLAGS_DEBUG\"\non=\"ON\"\nproject_source_dir = \"PROJECT_SOURCE_DIR\"",
"detail": "build.lib.pymake.values",
"documentation": {}
},
{
"label": "project_source_dir",
"kind": 5,
"importPath": "build.lib.pymake.values",
"description": "build.lib.pymake.values",
"peekOfCode": "project_source_dir = \"PROJECT_SOURCE_DIR\"",
"detail": "build.lib.pymake.values",
"documentation": {}
},
{
"label": "cmake",
"kind": 6,

View File

@ -11,8 +11,8 @@ pip install <file name>
## 自行编译
```bash
pip install poetry
poetry install
poetry build
pdm install
pdm build
pip install ./dist/pymake-0.1.0-py3-none-any.whl
```
# 如何使用

View File

@ -12,4 +12,4 @@ license = {text = "MIT"}
[tool.pdm]
distribution = false
distribution = true