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.

Title: Allow zipapp to target modules
Type: enhancement Stage:
Components: Extension Modules Versions: Python 3.6
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: flying sheep, paul.moore
Priority: normal Keywords:

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 is very different from the usual.

the root directory of a zipapp is not a module, therefore isn’t used and relative imports from 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 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 my_module

should create

├  →  ...runpy.run_module('my_module')
└ my_module
  └  →  from . import ...

or there would be another option to specify it.
Date User Action Args
2022-04-11 14:58:27adminsetgithub: 70465
2016-02-03 17:36:37brett.cannonsetnosy: + paul.moore
2016-02-03 12:25:04flying sheepcreate