explain #!python rewrite-on-install
This commit is contained in:
parent
df038cc333
commit
d9a153d410
25
pep-0427.txt
25
pep-0427.txt
|
@ -86,6 +86,22 @@ Wheel installation notionally consists of two phases:
|
|||
f. Compile any installed .py to .pyc. (Uninstallers should be smart
|
||||
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
|
||||
-----------
|
||||
|
||||
|
@ -309,11 +325,10 @@ Comparison to .egg
|
|||
FAQ
|
||||
===
|
||||
|
||||
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
|
||||
meant to indicate files that are not installed into site-packages.
|
||||
This specification does not have an opinion on how you should
|
||||
organize your code.
|
||||
Wheel defines a .data directory. Should I put all my data there?
|
||||
This specification does not have an opinion on how you should organize
|
||||
your code. The .data directory is just a place for any files that are
|
||||
not normally installed inside ``site-packages`` or on the PYTHONPATH.
|
||||
|
||||
|
||||
Copyright
|
||||
|
|
Loading…
Reference in New Issue