stickytape:将Python包转换为单个脚本

时间:2021-05-08 15:25:02
【文件属性】:
文件名称:stickytape:将Python包转换为单个脚本
文件大小:38KB
文件格式:ZIP
更新时间:2021-05-08 15:25:02
Python stickytape:将Python程序包转换为单个脚本 Stickytape可用于将Python脚本及其依赖的任何Python模块转换为单文件Python脚本。 根据您要尝试的操作,可能会有更好的选择。 例如: 如果要创建可以由Python解释器执行的单个文件,请使用 。 如果需要通过Python脚本创建独立的可执行文件,建议使用的替代。 由于Stickytape依赖于正确分析脚本和任何相关模块,因此可能无法在所有情况下均正常工作。 我很早以前就将我的特定用例的代码合并在一起,因此无法正确支持许多Python导入的常规用法。 安装 pip install stickytape 用法 您可以使用--add-python-path参数告诉stickytape要搜索的目录。 例如: stickytape scripts/blah --add-python-path . > /tmp/b
【文件预览】:
stickytape-master
----test_scripts()
--------script_with_single_local_from_import()
--------script_using_from_to_import_module()
--------single_file()
--------explicit_relative_import_from_parent_package()
--------explicit_relative_import_in_init()
--------module_with_triple_quotes()
--------explicit_relative_import_single_dot()
--------script_with_single_local_import()
--------script_with_single_local_import_of_package()
--------__init__.py(86B)
--------script_using_from_to_import_multiple_values()
--------explicit_relative_import()
--------circular_reference()
--------single_file_using_stdlib()
--------explicit_relative_import_single_dot_in_init()
--------script_using_module_in_package()
--------script_with_special_shebang()
--------script_with_dynamic_import()
--------import_from_as_value()
--------imports_in_imported_modules()
--------implicit_init_import()
--------python_path_from_binary()
--------script_using_stdlib_module_in_package()
--------script_using_from_to_import_multiple_modules()
--------import_from_as_module()
----MANIFEST.in(19B)
----README.rst(3KB)
----test-requirements.txt(46B)
----.github()
--------workflows()
----stickytape()
--------prelude.py(1KB)
--------main.py(987B)
--------__init__.py(7KB)
--------stdlib.py(4KB)
----tox.ini(169B)
----LICENSE(1KB)
----setup.py(629B)
----makefile(541B)
----tests()
--------__init__.py(1B)
--------stickytape_test.py(9KB)
----.gitignore(46B)

网友评论