Skip to content

Commit c94985e

Browse files
committed
Fix source package builds failing with hatchling circular build error
Add hatchling to --only-binary in onedir_dependencies() so pip installs it from its universal wheel instead of attempting a source build. When --no-binary :all: is active (Linux builds), pip 25.2 tries to source-build hatchling but hatchling lists itself as its own PEP 517 build backend, causing pip's build tracker to raise: LookupError: hatchling is already being built Fixes #68858 Made-with: Cursor
1 parent d42a3a4 commit c94985e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

changelog/68858.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed source package builds (DEB/RPM) failing with ``LookupError: hatchling is already being built`` by adding ``hatchling`` to the ``--only-binary`` allow-list so pip uses its universal wheel instead of attempting a circular source build.

tools/pkg/build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ def onedir_dependencies(
618618
"-v",
619619
"--use-pep517",
620620
"--no-cache-dir",
621-
"--only-binary=maturin,apache-libcloud,pymssql",
621+
"--only-binary=maturin,apache-libcloud,pymssql,hatchling",
622622
]
623623
if platform == "windows":
624624
python_bin = env_scripts_dir / "python"
@@ -627,7 +627,7 @@ def onedir_dependencies(
627627
python_bin = env_scripts_dir / "python3"
628628
install_args.append("--no-binary=:all:")
629629
install_args.append(
630-
"--only-binary=maturin,apache-libcloud,pymssql,cassandra-driver"
630+
"--only-binary=maturin,apache-libcloud,pymssql,cassandra-driver,hatchling"
631631
)
632632

633633
# Cryptography needs openssl dir set to link to the proper openssl libs.

0 commit comments

Comments
 (0)