Bug 2453824

Summary: python-ujson fails to build with setuptools_scm 10+
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-ujsonAssignee: Ben Beasley <code>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: code, igor.raits, mail, python-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-ujson-5.12.0-2.fc45 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-04-16 10:26:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2412434, 2433833, 2451398    

Description Miro Hrončok 2026-04-01 12:15:56 UTC
We are trying to python-setuptools_scm to version 10.x

https://src.fedoraproject.org/rpms/python-setuptools_scm/pull-request/39


This package fails to build with:

error: Installed (but unpackaged) file(s) found:
   /usr/lib64/python3.14/site-packages/src/ujson/python/version.h

https://copr.fedorainfracloud.org/coprs/churchyard/vcs-versioning/package/python-ujson/



See https://setuptools-scm.readthedocs.io/en/latest/changelog/#1000-2026-02-26

"""
Version files (write_to and version_file) are now written to the build directory during build_py instead of the source tree during version inference. This enables installing packages from read-only source directories (e.g., Bazel builds).

Path transformation is automatically applied for src/ layouts - a configured path like src/mypackage/_version.py is correctly written to mypackage/_version.py in the build directory based on the package_dir configuration.

To restore the old behavior of writing version files at inference time (useful for development workflows), set the environment variable SETUPTOOLS_SCM_WRITE_TO_SOURCE=1. https://github.com/pypa/setuptools-scm/issues/1252
"""

Comment 1 Miro Hrončok 2026-04-16 09:42:48 UTC
Do you need help fixing this? Please respond.

Comment 2 Ben Beasley 2026-04-16 10:01:47 UTC
I haven’t heard from Kushal in a long time. For about four years, I have been somewhat reluctantly keeping this package up to date as co-maintainer, since a few things I care about do depend on it.

It doesn’t seem like exporting SETUPTOOLS_SCM_WRITE_TO_SOURCE=1 (in any or all spec-file sections) prevents the creation of /usr/lib64/python3.14/site-packages/src/ujson/python/version.h. I don’t really understand what’s happening at a glance, and I don’t want to spend much time on this package, so I suppose I will just remove the unwanted %{python3_sitearch}/src/ directory in %install as a workaround.

Comment 3 Fedora Update System 2026-04-16 10:21:20 UTC
FEDORA-2026-1d2de06bc1 (python-ujson-5.12.0-2.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-1d2de06bc1

Comment 4 Miro Hrončok 2026-04-16 10:26:34 UTC
I heard from Kushal in person, but not wrt his Fedora packages :/

Thanks for the workaround.

Comment 5 Fedora Update System 2026-04-16 10:26:57 UTC
FEDORA-2026-1d2de06bc1 (python-ujson-5.12.0-2.fc45) has been pushed to the Fedora 45 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Miro Hrončok 2026-04-17 12:13:29 UTC
> It doesn’t seem like exporting SETUPTOOLS_SCM_WRITE_TO_SOURCE=1 (in any or all spec-file sections) prevents the creation of /usr/lib64/python3.14/site-packages/src/ujson/python/version.h.

I reported https://github.com/pypa/setuptools-scm/issues/1364