diff options
author | Jeffrey Rackauckas <jeffreyrack@gmail.com> | 2017-08-09 13:37:17 (GMT) |
---|---|---|
committer | Paul Moore <p.f.moore@gmail.com> | 2017-08-09 13:37:17 (GMT) |
commit | b811d664defed085d16951088afb579fb649c58d (patch) | |
tree | 8d440084c8a7fc1b4cef670cb8c9b772b5a2236a /Doc | |
parent | 9b0d1d647e3d2ec9d299e5c9f49b02fbbb810a5a (diff) | |
download | cpython-b811d664defed085d16951088afb579fb649c58d.zip cpython-b811d664defed085d16951088afb579fb649c58d.tar.gz cpython-b811d664defed085d16951088afb579fb649c58d.tar.bz2 |
bpo-31072: Add filter to zipapp (#3021)
bpo-31072: Add a filter argument to zipapp.create_archive (GH-3021)
* Add an include_file argument to allow callers to decide which files to include
* Document the new argument
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/zipapp.rst | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/library/zipapp.rst b/Doc/library/zipapp.rst index 71753cb..993c2cc 100644 --- a/Doc/library/zipapp.rst +++ b/Doc/library/zipapp.rst @@ -98,7 +98,8 @@ Python API The module defines two convenience functions: -.. function:: create_archive(source, target=None, interpreter=None, main=None) +.. function:: create_archive(source, target=None, interpreter=None, main=None, + include_file=None) Create an application archive from *source*. The source can be any of the following: @@ -143,6 +144,10 @@ The module defines two convenience functions: contain a ``__main__.py`` file, as otherwise the resulting archive would not be executable. + The *include_file* argument specifies a callback function that is passed the + relative path to the file in order to determine which files to store when + being called against a directory. + If a file object is specified for *source* or *target*, it is the caller's responsibility to close it after calling create_archive. |