pybind/pybind11_mkdoc hiện có 44 sao trên GitHub, viết chủ yếu bằng Python. Pybind11 tool for making docstrings from C++ comments
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Optionally, the path to the libclang.so and LLVM directory can be specified by setting the LIBCLANG_PATH and LLVM_DIR_PATH environment variables respectively.
Suppose we provide an input file with the following contents:
/// Docstring 1
class MyClass {
/// Docstring 2
MyClass() {
}
/// Docstring 3
void foo() {
}
/// Docstring 4 for overload
void foo(int bar) {
}
/// Docstring 5 for yet another overload
void foo(int bar, int baz) {
}
};
Once processed via pybind11_mkdoc, the docstrings can be accessed as follows
from pybind11 binding code:
Note the counter suffix for repeated definitions and docstrings. Namespaces and
nested classes are also supported, in which case the number of arguments to the
DOC macro simply increases.
In practice, the docstrings are likely referenced in a matching set of binding
declarations:
The pybind11_mkdoc CMake function is included to easily generate header for a pybind11 module when
compiling said module in CMake. The function generates the headers based on the arguments provided.
In addition, it add target dependencies so the pybind11-mkdoc header file is generated before
the pybind11 module. Also, it will automatically add the current binary directory to the pybind11
module's includes, so it can easily be included when compiling the module.
The required parameters are:
OUTPUT - The name of the output file.
PYBIND11_MODULE - The pybind11 module target that these docs will be used for.
HEADERS - The header files to create docs for. These can be absolute paths or relative to the
current source directory.
The optional parameters are:
EXTRA_ARGS - This string argument will be added verbatim to the pybind11-mkdoc command.
Below is an example of how it is used:
# Find pybind11-mkdoc
# This assumes you have already run a find_package for Python.
execute_process(
COMMAND ${Python_EXECUTABLE} -c "import pybind11_mkdoc; print(pybind11_mkdoc.get_cmake_dir())"
OUTPUT_VARIABLE pybind11_mkdoc_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
find_package(pybind11_mkdoc REQUIRED CONFIG)
# Add the pybind11 module
pybind11_add_module(my_pybind11_module my_src_files.cc)
pybind11_mkdoc(
OUTPUT my_pybind11_module_docs.h
PYBIND11_MODULE my_pybind11_module
HEADERS
header_1.h
/absolute/path/to/header_2.h
)
Limitations
This tool supports Linux and macOS for Python versions 3.9 to 3.14. Also, it
requires Clang/LLVM to be installed.
Testing
Install the packages pytest, pytest-forked and pybind11:
pybind/pybind11_mkdoc có 44 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/pybind/pybind11_mkdoc. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
pybind/pybind11_mkdoc có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho pybind/pybind11_mkdoc. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
pybind/pybind11_mkdoc còn đang phát triển không?
Commit gần nhất trên pybind/pybind11_mkdoc là 7 ngày trước (theo timestamp GitHub). Repo có 24 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
pybind/pybind11_mkdoc là gì?
pybind/pybind11_mkdoc (pybind/pybind11_mkdoc) là dự án Python trên GitHub. Theo mô tả gốc: Pybind11 tool for making docstrings from C++ comments
pybind/pybind11_mkdoc viết bằng ngôn ngữ gì?
pybind/pybind11_mkdoc chủ yếu viết bằng Python. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc pybind11_mkdoc có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về pybind11_mkdoc.