-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the name of onedir mode's
_internal
directory configurable.
Add a --contents-directory CLI option and corresponding contents_directory spec file option to change the otherwise hard-coded name of the directory in which all a onedir's non EXE contents are hidden. Note that this, whilst this spec file option would make the most sense as a parameter to BUNDLE(), it instead has to be an option to EXE() which BUNDLE() then fishes out of the EXE()'s configuration due to EXE() being the only place where OPTION TOC entries can go.
- Loading branch information
Showing
7 changed files
with
85 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
All of onedir build's contents except for the executable are now moved into a | ||
sub-directory (called ``_internal`` by default). ``sys._MEIPASS`` is adjusted to | ||
point to this ``_internal`` directory. The breaking implications for this are: | ||
|
||
* Assumptions that ``os.path.dirname(sys.executable) == sys._MEIPASS`` will | ||
break. Code locating application resources using | ||
``os.path.dirname(sys.executable)`` should be adjusted to use ``__file__`` | ||
or ``sys._MEIPASS`` and any code locating the original executable using | ||
``sys._MEIPASS`` should use :data:`sys.executable` directly. | ||
|
||
* Any custom post processing steps (either in the ``.spec`` file or | ||
externally) which modify the bundle will likely need adjusting to | ||
accommodate the new directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Restructure onedir mode builds so that everything except the executable (and | ||
``.pkg`` if you're using external PYZ archive mode) are hidden inside a | ||
sub-directory. This sub-directory's name defaults to ``_internal`` but may be | ||
configured with the new :option:`--internals-prefix` option. Onefile | ||
applications and macOS ``.app`` bundles are unaffected. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters