Skip to content

configure: fall back to the default scheme for SITEPY - #4726

Merged
grandixximo merged 1 commit into
LinuxCNC:masterfrom
grandixximo:sitepy-default-scheme
Oct 27, 2026
Merged

grandixximo merged 1 commit into
LinuxCNC:masterfrom
grandixximo:sitepy-default-scheme

Conversation

@grandixximo

Copy link
Copy Markdown
Contributor

Fixes #4717.

When I merged 2.9 into master (2511cf1), I took the 2.9 SITEPY line. Its fallback is a hardcoded /usr/lib/python3/dist-packages, used when neither the deb_system nor the rpm_prefix scheme exists. Gentoo has neither, and that path is not on its sys.path, so import linuxcnc fails without PYTHONPATH.

Before the merge, master fell back to the interpreter's default scheme. This restores that: the fallback is now sysconfig.get_path('platlib'), which on Gentoo gives /usr/lib/python3.X/site-packages. Debian and Fedora pick deb_system/rpm_prefix first, so nothing changes there.

2.9 is unchanged.

@NTULINUX could you test this on Gentoo?

The 2.9 merge 2511cf1 took the 2.9 SITEPY line, which falls back
to a hardcoded /usr/lib/python3/dist-packages when neither the
deb_system nor the rpm_prefix scheme exists. On Gentoo that path is
not on sys.path, so the linuxcnc module is not found. Master used to
fall back to the interpreter's default scheme; restore that.

Reported by Alec Ari (NTULINUX).

Fixes LinuxCNC#4717
@NTULINUX

Copy link
Copy Markdown
Contributor

Can confirm, it's working again, thanks!

@grandixximo
grandixximo merged commit 07aa2ba into LinuxCNC:master Oct 27, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gentoo bug: ModuleNotFoundError: No module named 'linuxcnc'

2 participants