Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion debian/linuxcnc.install.in
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ usr/bin/xyzbc-trt-gui

usr/lib/lib*.so.*
usr/lib/linuxcnc
usr/lib/python3
usr/lib/python3*
usr/lib/tcltk

usr/share/axis
Expand Down
10 changes: 6 additions & 4 deletions lib/python/qtvcp/designer/install_script
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

SITEPY=$(python3 -c "import site; print([p for p in site.getsitepackages() if p.startswith('/usr/lib') and '/lib64/' not in p][0])")

# install base packages for displaying qtvcp screens and sounds
echo -e '\ninstalling common base packages'
sudo apt-get install -y gstreamer1.0-tools espeak espeak-ng sound-theme-freedesktop
Expand Down Expand Up @@ -62,12 +64,12 @@ if [ "$response" -eq 2 ]; then
# for full LinuxCNC installation
elif [ "$response" -eq 3 ]; then
# check for valid plugin file
if [ -f /usr/lib/python3/dist-packages/qtvcp/plugins/qtvcp_plugin.py ]; then
pifile=/usr/lib/python3/dist-packages/qtvcp/plugins/qtvcp_plugin.py
if [ -f "${SITEPY}/qtvcp/plugins/qtvcp_plugin.py" ]; then
pifile="${SITEPY}/qtvcp/plugins/qtvcp_plugin.py"
else
# clear
echo -e '\n'"$pifile "'not found in /usr/lib/python3/dist-packages/qtvcp/plugins/'
echo -e '\ncannot continue designer installation\n'
echo -e "\n$pifile not found in ${SITEPY}/qtvcp/plugins/"
echo -e "\ncannot continue designer installation\n"
exit
fi
fi
Expand Down
10 changes: 6 additions & 4 deletions scripts/setup_designer.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

SITEPY=$(python3 -c "import site; print([p for p in site.getsitepackages() if p.startswith('/usr/lib') and '/lib64/' not in p][0])")

# install base packages for displaying qtvcp screens and sounds
echo -e '\ninstalling common base packages'
sudo apt-get install -y gstreamer1.0-tools espeak espeak-ng sound-theme-freedesktop
Expand Down Expand Up @@ -62,12 +64,12 @@ if [ "$response" -eq 2 ]; then
# for full LinuxCNC installation
elif [ "$response" -eq 3 ]; then
# check for valid plugin file
if [ -f /usr/lib/python3/dist-packages/qtvcp/plugins/qtvcp_plugin.py ]; then
pifile=/usr/lib/python3/dist-packages/qtvcp/plugins/qtvcp_plugin.py
if [ -f "${SITEPY}/qtvcp/plugins/qtvcp_plugin.py" ]; then
pifile="${SITEPY}/qtvcp/plugins/qtvcp_plugin.py"
else
# clear
echo -e '\n'"$pifile"' not found in /usr/lib/python3/dist-packages/qtvcp/plugins/'
echo -e '\ncannot continue designer installation\n'
echo -e "\n$pifile not found in ${SITEPY}/qtvcp/plugins/"
echo -e "\ncannot continue designer installation\n"
exit
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion src/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,7 @@ fi
AC_MSG_RESULT([$PYTHON_TK_VERSION])

AC_MSG_CHECKING(for site-package location)
SITEPY="$($PYTHON -c 'import sysconfig; s = sysconfig.get_scheme_names(); m=list(set(("deb_system", "rpm_prefix")) & set(s)); print(sysconfig.get_path("platlib", m.__getitem__(0))) if m else print("/usr/lib/python3/dist-packages");')"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Fedora 43, this returns:
/usr/lib64/python3.14/site-packages.
The other instances, in install_script and setup_designer.in, using import site; print([p for p in site.getsitepackages() if p.startswith('/usr/lib') and '/lib64/' not in p][0]) returns:
/usr/lib/python3.14/site-packages.

lib/lib64 difference... very strange.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As ugly as it may be, I can copy the logic from m4 and put it in install_script and setup_designer.in

I was just trying to avoid that..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, you're talking about the old one, not PYTHON_SITE_PKG. I misunderstood. Currently, on fedora with my latest forced push, PYTHON_SITE_PKG and SITEPY in those files match.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I look in those two directories, then both are populated, but with different packages. I have no clue what goes into where. Maybe fedora docs can help?

Copy link
Copy Markdown
Contributor Author

@NTULINUX NTULINUX Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I noticed that too, I figured since PYTHON_SITE_PKG uses /lib instead of /lib64 to use that, plus /lib is more heavily populated.

fedora@fedora:~/dev/linuxcnc/src$ ls /usr/lib64/python3.14/site-packages | wc -l
120
fedora@fedora:~/dev/linuxcnc/src$ ls /usr/lib/python3.14/site-packages | wc -l
200

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There must be some documentation which distro wants what where. Better do it right than guess wrong?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/usr/lib64/python3.14/site-packages/: This directory is used for architecture-specific (binary) packages.

/usr/lib/python3.14/site-packages/: This directory is used for architecture-independent (pure Python) packages. These "noarch" packages consist only of .py files and byte-compiled .pyc files, which are not tied to a specific hardware architecture.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And that applies to Debian, Ubuntu, Gentoo and other distros too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debian uses /usr/lib/python3/dist-packages for everything

Gentoo uses /usr/lib/python3.14/site-packages for everything

Fedora... :P

SITEPY="$PYTHON_SITE_PKG"
AC_MSG_RESULT($SITEPY)

AC_MSG_CHECKING(for working GLU quadrics)
Expand Down
Loading