Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build process: Builtin python dependencies are added safely #86

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
"email.mime.text",
"sqlite3",
"timeit",
]

# These are added just to be sure created executable has available even
# unused modules. Some of them are not available on all platforms.
python_builtins = [
# Just to be sure
"abc",
"argparse",
Expand Down Expand Up @@ -198,6 +203,13 @@
"zipimport",
"zoneinfo",
]
for module_name in python_builtins:
try:
__import__(module_name)
except ImportError:
pass
else:
install_requires.append(module_name)

includes = []
excludes = [
Expand Down