Skip to content

Commit 26456a0

Browse files
ben-ednaspoorcc
authored andcommitted
add .bzl
1 parent 751fa1b commit 26456a0

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

pyoxidizer.bzl

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# pyoxidizer.bzl
2+
def make_python_distribution():
3+
dist = default_python_distribution()
4+
5+
# Optimizations
6+
policy = dist.make_python_packaging_policy()
7+
policy.strip_all_shared_libraries = True # Strip unnecessary shared libraries
8+
policy.optimize_bytecode = True # Optimize Python bytecode
9+
policy.optimize_for_size = True # Reduce the binary size
10+
11+
# Embed the Python standard library into the binary
12+
dist = dist.to_python_executable(
13+
name="dfetch",
14+
packaging_policy=policy,
15+
)
16+
17+
return dist
18+
19+
20+
def make_application():
21+
return make_python_distribution()

0 commit comments

Comments
 (0)