-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copier Template: Support CLI stub. Creation of standalone executables.
(Coauthor: xAI grok-3) ("Backport" from emcd/python-mimeogram.)
- Loading branch information
Showing
12 changed files
with
351 additions
and
38 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
16 changes: 16 additions & 0 deletions
16
...late/documentation/miscellany/{% if enable_executables %}executables.rst{% endif %}.jinja
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,16 @@ | ||
Executables | ||
=========== | ||
|
||
Linux | ||
----- | ||
|
||
The Linux executables are dynamically linked and require a Glibc-based OS | ||
distribution from 2022 or later (Ubuntu 22.04+, RHEL 9+, or derivatives). For | ||
older Glibc-based OS distributions and non-Glibc-based OS distributions | ||
(Alpine, etc...), please install the Python package instead. | ||
|
||
Other Platforms | ||
--------------- | ||
|
||
The macOS and Windows executables should work on any recent version of their | ||
respective operating systems. |
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
28 changes: 28 additions & 0 deletions
28
template/sources/{{ package_name }}/{% if enable_cli %}__main__.py{% endif %}.jinja
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,28 @@ | ||
# vim: set filetype=python fileencoding=utf-8: | ||
# -*- coding: utf-8 -*- | ||
|
||
#============================================================================# | ||
# # | ||
# Licensed under the Apache License, Version 2.0 (the "License"); # | ||
# you may not use this file except in compliance with the License. # | ||
# You may obtain a copy of the License at # | ||
# # | ||
# http://www.apache.org/licenses/LICENSE-2.0 # | ||
# # | ||
# Unless required by applicable law or agreed to in writing, software # | ||
# distributed under the License is distributed on an "AS IS" BASIS, # | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # | ||
# See the License for the specific language governing permissions and # | ||
# limitations under the License. # | ||
# # | ||
#============================================================================# | ||
|
||
|
||
''' Entrypoint. ''' | ||
|
||
|
||
# Note: Use absolute import for PyInstaller happiness. | ||
from {{ package_name }}.cli import execute | ||
|
||
|
||
if '__main__' == __name__: execute( ) |
Oops, something went wrong.