explain #!python rewrite-on-install

This commit is contained in:
Daniel Holth 2012-10-11 18:31:41 -04:00
parent df038cc333
commit d9a153d410
1 changed files with 20 additions and 5 deletions

View File

@ -86,6 +86,22 @@ Wheel installation notionally consists of two phases:
f. Compile any installed .py to .pyc. (Uninstallers should be smart f. Compile any installed .py to .pyc. (Uninstallers should be smart
enough to remove .pyc even if it is not mentioned in RECORD.) enough to remove .pyc even if it is not mentioned in RECORD.)
Recommended installer features
''''''''''''''''''''''''''''''
Rewrite ``#!python``.
In wheel, scripts are packaged in
``{distribution}-{version}.data/scripts/``. If the first line of
a file in ``scripts/`` starts with exactly b'#!python', rewrite to
point to the correct interpreter. Unix installers may need to add
the +x bit to these files if the archive was created on Windows.
Generate script wrappers.
In wheel, scripts packaged on Unix systems will certainly not have
accompanying .exe wrappers. Windows installers may want to add them
during install.
File Format File Format
----------- -----------
@ -309,11 +325,10 @@ Comparison to .egg
FAQ FAQ
=== ===
Wheel defines a .data directory. Should I put all my data there? Wheel defines a .data directory. Should I put all my data there?
No. The word 'data' is used only because it is short, and is only This specification does not have an opinion on how you should organize
meant to indicate files that are not installed into site-packages. your code. The .data directory is just a place for any files that are
This specification does not have an opinion on how you should not normally installed inside ``site-packages`` or on the PYTHONPATH.
organize your code.
Copyright Copyright