Skip to content

Commit 046fa63

Browse files
committed
fixup! Build libtcl, libtk, and _tkinter as shared objects
1 parent cf98cb7 commit 046fa63

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

cpython-unix/extension-modules.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,19 @@ _tkinter:
681681
links:
682682
- tcl8.6
683683
- tk8.6
684+
links-conditional:
685+
- name: X11
686+
targets:
687+
- .*-unknown-linux-.*
688+
build-mode: static
689+
- name: xcb
690+
targets:
691+
- .*-unknown-linux-.*
692+
build-mode: static
693+
- name: Xau
694+
targets:
695+
- .*-unknown-linux-.*
696+
build-mode: static
684697

685698
_tokenize:
686699
minimum-python-version: "3.11"

pythonbuild/cpython.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"properties": {
7070
"name": {"type": "string"},
7171
"targets": {"type": "array", "items": {"type": "string"}},
72+
"build-mode": {"type": "string"},
7273
},
7374
"additionalProperties": False,
7475
},
@@ -535,7 +536,12 @@ def derive_setup_local(
535536
python_version, entry.get("maximum-python-version", "100.0")
536537
)
537538

538-
if target_match and (python_min_match and python_max_match):
539+
if build_mode := entry.get("build-mode"):
540+
build_mode_match = section == build_mode
541+
else:
542+
build_mode_match = True
543+
544+
if target_match and python_min_match and python_max_match and build_mode_match:
539545
if source := entry.get("source"):
540546
line += f" {source}"
541547
for source in entry.get("sources", []):

0 commit comments

Comments
 (0)