diff options
author | Vladislav Rudskoy <rudskoy.vladislav@gmail.com> | 2022-02-10 16:45:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:39 +0300 |
commit | 40818269bfff82d9f57f47db333acbdda5c44fb0 (patch) | |
tree | 80b4c7c6300e95384218422adf3a140229b5372c /build | |
parent | bf9e69a933f89af083d895185f01ed65e4d90766 (diff) | |
download | ydb-40818269bfff82d9f57f47db333acbdda5c44fb0.tar.gz |
Restoring authorship annotation for Vladislav Rudskoy <rudskoy.vladislav@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'build')
-rw-r--r-- | build/plugins/java.py | 18 | ||||
-rw-r--r-- | build/plugins/pybuild.py | 50 | ||||
-rw-r--r-- | build/ymake.core.conf | 8 |
3 files changed, 38 insertions, 38 deletions
diff --git a/build/plugins/java.py b/build/plugins/java.py index 16fc126734..c3d1625ca2 100644 --- a/build/plugins/java.py +++ b/build/plugins/java.py @@ -33,10 +33,10 @@ def extract_macro_calls2(unit, macro_value_name): def on_run_jbuild_program(unit, *args): args = list(args) - """ - Custom code generation - @link: https://wiki.yandex-team.ru/yatool/java/#kodogeneracijarunjavaprogram - """ + """ + Custom code generation + @link: https://wiki.yandex-team.ru/yatool/java/#kodogeneracijarunjavaprogram + """ flat, kv = common.sort_by_keywords({'IN': -1, 'IN_DIR': -1, 'OUT': -1, 'OUT_DIR': -1, 'CWD': 1, 'CLASSPATH': -1, 'CP_USE_COMMAND_FILE': 1, 'ADD_SRCS_TO_CLASSPATH': 0}, args) depends = kv.get('CLASSPATH', []) + kv.get('JAR', []) @@ -58,11 +58,11 @@ def on_run_jbuild_program(unit, *args): def ongenerate_script(unit, *args): - """ - heretic@ promised to make tutorial here - Don't forget - Feel free to remind - """ + """ + heretic@ promised to make tutorial here + Don't forget + Feel free to remind + """ flat, kv = common.sort_by_keywords( {'OUT': -1, 'TEMPLATE': -1, 'CUSTOM_PROPERTY': -1}, args diff --git a/build/plugins/pybuild.py b/build/plugins/pybuild.py index f32a2d39a0..218b0d90e2 100644 --- a/build/plugins/pybuild.py +++ b/build/plugins/pybuild.py @@ -152,9 +152,9 @@ def on_py_program(unit, *args): def py_program(unit, py3): - """ - Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/#modulpyprogramimakrospymain - """ + """ + Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/#modulpyprogramimakrospymain + """ if py3: peers = ['library/python/runtime_py3/main'] if unit.get('PYTHON_SQLITE3') != 'no': @@ -169,25 +169,25 @@ def py_program(unit, py3): def onpy_srcs(unit, *args): - """ + """ @usage PY_SRCS({| CYTHON_C} { | TOP_LEVEL | NAMESPACE ns} Files...) - PY_SRCS() - is rule to build extended versions of Python interpreters and containing all application code in its executable file. It can be used to collect only the executables but not shared libraries, and, in particular, not to collect the modules that are imported using import directive. - The main disadvantage is the lack of IDE support; There is also no readline yet. - The application can be collect from any of the sources from which the C library, and with the help of PY_SRCS .py , .pyx,.proto and .swg files. - At the same time extensions for Python on C language generating from .pyx and .swg, will be registered in Python's as built-in modules, and sources on .py are stored as static data: when the interpreter starts, the initialization code will add a custom loader of these modules to sys.meta_path. - By default .pyx files are collected as C++-extensions. To collect them as C (similar to BUILDWITH_CYTHON_C, but with the ability to specify namespace), you must specify the Directive CYTHON_C. - Building with pyx automatically registers modules, you do not need to call PY_REGISTER for them - __init__.py never required, but if present (and specified in PY_SRCS), it will be imported when you import package modules with __init__.py Oh. - - Example of library declaration with PY_SRCS(): + PY_SRCS() - is rule to build extended versions of Python interpreters and containing all application code in its executable file. It can be used to collect only the executables but not shared libraries, and, in particular, not to collect the modules that are imported using import directive. + The main disadvantage is the lack of IDE support; There is also no readline yet. + The application can be collect from any of the sources from which the C library, and with the help of PY_SRCS .py , .pyx,.proto and .swg files. + At the same time extensions for Python on C language generating from .pyx and .swg, will be registered in Python's as built-in modules, and sources on .py are stored as static data: when the interpreter starts, the initialization code will add a custom loader of these modules to sys.meta_path. + By default .pyx files are collected as C++-extensions. To collect them as C (similar to BUILDWITH_CYTHON_C, but with the ability to specify namespace), you must specify the Directive CYTHON_C. + Building with pyx automatically registers modules, you do not need to call PY_REGISTER for them + __init__.py never required, but if present (and specified in PY_SRCS), it will be imported when you import package modules with __init__.py Oh. + + Example of library declaration with PY_SRCS(): PY2_LIBRARY(mymodule) PY_SRCS(a.py sub/dir/b.py e.proto sub/dir/f.proto c.pyx sub/dir/d.pyx g.swg sub/dir/h.swg) - END() - + END() + PY_REGISTER honors Python2 and Python3 differences and adjusts itself to Python version of a current module Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#modulipylibrarypy3libraryimakrospysrcs - """ + """ # Each file arg must either be a path, or "${...}/buildpath=modname", where # "${...}/buildpath" part will be used as a file source in a future macro, # and "modname" will be used as a module name. @@ -554,12 +554,12 @@ def py_register(unit, func, py3): def onpy_register(unit, *args): - """ + """ @usage: PY_REGISTER([package.]module_name) - Python knows about which built-ins can be imported, due to their registration in the Assembly or at the start of the interpreter. - All modules from the sources listed in PY_SRCS() are registered automatically. - To register the modules from the sources in the SRCS(), you need to use PY_REGISTER(). + Python knows about which built-ins can be imported, due to their registration in the Assembly or at the start of the interpreter. + All modules from the sources listed in PY_SRCS() are registered automatically. + To register the modules from the sources in the SRCS(), you need to use PY_REGISTER(). PY_REGISTER(module_name) initializes module globally via call to initmodule_name() PY_REGISTER(package.module_name) initializes module in the specified package @@ -567,7 +567,7 @@ def onpy_register(unit, *args): or CFLAGS(-DPyInit_module_name=PyInit_7package11module_name) Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#makrospyregister - """ + """ py3 = is_py3(unit) @@ -592,13 +592,13 @@ def py_main(unit, arg): def onpy_main(unit, arg): - """ + """ @usage: PY_MAIN(package.module[:func]) - + Specifies the module or function from which to start executing a python program - + Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#modulipyprogrampy3programimakrospymain - """ + """ arg = arg.replace('/', '.') diff --git a/build/ymake.core.conf b/build/ymake.core.conf index 081833998b..e1ea3c4c92 100644 --- a/build/ymake.core.conf +++ b/build/ymake.core.conf @@ -2421,7 +2421,7 @@ CMAKE_LINK_TARGET=$REALPRJNAME CMAKE_FIND_PKG_COMP= CONAN_REQUIRE= -### @usage: LIBRARY() +### @usage: LIBRARY() ### ### The regular static library module. ### @@ -4705,7 +4705,7 @@ JAVA_SRCS_VALUE= ### @usage: JAVA_SRCS(srcs) ### ### Specify java source files and resources. A macro can be contained in any of four java modules. -### Keywords: +### Keywords: ### 1. X SRCDIR - specify the directory x is performed relatively to search the source code for these patterns. If there is no SRCDIR, the source will be searched relative to the module directory. ### 2. PACKAGE_PREFIX x - use if source paths relative to the SRCDIR does not coincide with the full class names. For example, if all sources of module are in the same package, you can create a directory package/name , and just put the source code in the SRCDIR and specify PACKAGE_PREFIX package.name. ### @@ -4725,7 +4725,7 @@ JAVA_SRCS_VALUE= ### } ### } ### -### Documentation: https://wiki.yandex-team.ru/yatool/java/#javasrcs +### Documentation: https://wiki.yandex-team.ru/yatool/java/#javasrcs macro JAVA_SRCS(Args...) { SET_APPEND(JAVA_SRCS_VALUE $ARGS_DELIM $Args) } @@ -4766,7 +4766,7 @@ DEPENDENCY_MANAGEMENT_VALUE= ### there the maximum version available in contrib/java. ### ### The property is transitive. That is, if module A PEERDIRs module B, and B has PEERDIR(contrib/java/junit/junit), and this junit was replaced by junit-4.12, then junit-4.12 will come to A through B. -### +### ### If some module has both DEPENDENCY_MANAGEMENT(contrib/java/junit/junit/4.12) and PERDIR(contrib/java/junit/junit/4.11), the PEERDIR wins. ### ### Documentation: https://wiki.yandex-team.ru/yatool/java/ |