Text of bugs.python.org › issue26277 as Styx crawled it on Nov 20, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

Issue 26277: Allow zipapp to target modules - Python tracker

Python Home About News Documentation Downloads Community Foundation Developer's Guide Issue Tracker Issues Search Random Issue Summaries Issues with patch Easy issues Stats User Administration User List Committer List Help Tracker Documentation Tracker Development Report Tracker Problem Issue26277 ➜ This issue tracker has been migrated to GitHub , and is currently read-only . For more information, see the GitHub FAQs in the Python's Developer Guide.

Created on 2016-02-03 12:25 by flying sheep , last changed 2022-04-11 14:58 by admin . Messages (1) msg259476 - (view) Author: (flying sheep) * Date: 2016-02-03 12:25 currently, zipapp’s notion of __main__.py is very different from the usual. the root directory of a zipapp is not a module, therefore __init__.py isn’t used and relative imports from __main__.py don’t work. i propose that the zipapp functionality is amended/changed to 1. allow more than one target directory (bundle multiple modules) 2. allow creation of a __main__.py that contains a runpy-powered module runner so maybe we could specify the module itself as entry point to get this behavior zipapp -m my_module dependency.py my_module should create my_module.pyz ├ __main__.py → ...runpy.run_module('my_module') ├ dependency.py └ my_module ├ __init__.py └ __main__.py → from . import ... or there would be another option to specify it.

History Date User Action Args 2022-04-11 14:58:27 admin set github: 70465 2016-02-03 17:36:37 brett.cannon set nosy: + paul.moore 2016-02-03 12:25:04 flying sheep create Supported by The Python Software Foundation , Powered by Roundup Copyright © 1990-2022, Python Software Foundation Legal Statements