You are not logged in.
Pages: 1
A build script for a python package requires certain files to be in the `/usr/includes/python3.14/CXX` directory. They are installed in the `/usr/includes/python3.14/cxx` directory.
A user workaround for this program has been to symlink the CXX folder to the cxx folder. However, I cannot do that in the PKGBUILD without root permissions. This leaves me with three options.
1. Create a symlink in the user's home directory and point the build script to ~
2. Create a symlink in $pkgdir/usr/includes/python3.1.4
3. Create a symlink in $pkgdir/~
2 and 3 will not work because the build script will be run before pacman moves the symlink into the user's actual filesystem. Alternatively I could point the build script to a path inside $pkgdir, but then the package would break if the package cache is deleted.
Any suggestions?
Offline
Are these files part of the project you're trying to build, or something external? What are these files, anyway?
Offline
Mayhaps a bind mount?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Nothing in the Arch repos provides "/usr/includes/". but perhaps that was a typo. Still, nothing in the Arch repos provides "/usr/include/python3.14/cxx" either.
In any case, if a build script is doing dumb shit, patch the build script and report it upstream.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
@Scimmia The package is https://aur.archlinux.org/packages/python-pysvn.
@WorMzy I think the files are provided by python-pycxx, which is a dependency of python-pysvn. Yes, it is technically /usr/include but it is definitely the package that provides these files.
# pacman -Ql python-pycxx
python-pycxx /usr/
python-pycxx /usr/include/
python-pycxx /usr/include/python3.14/
python-pycxx /usr/include/python3.14/cxx/@ewaller this would have the same problem as making a symlink AFAICT
Offline
Is this about https://aur.archlinux.org/packages/python-pysvn ?
There's also https://sourceforge.net/p/pysvn/tickets/21/ - the code looks targeted at windows and win32 is case insensitive, so there might be more problems itr
Last edited by seth (2026-03-30 07:19:18)
Offline
Creating a symlink in package() should work, but you need to be sure it links to the location where the target will be after installation .
Try Something like
pushd "$pkgdir"/usr/include/python3.14/
ln -s /usr/include/python.3214/cxx CXX
popdnamcap and similar tools will issue a warning/complaint you created a dead link .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Based on Lone_Wolf's approach adjusted to apply in prepare() as it is only needed for build and edit the applied patch to add pycxx-dir option pointing to the symlink:
diff --git a/PKGBUILD b/PKGBUILD
index a5373ff..660393c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,7 +15,7 @@ license=('Apache')
source=("https://downloads.sourceforge.net/project/pysvn/pysvn/V${pkgver}/pysvn-${pkgver}.tar.gz"
"fix-setup.py.patch")
sha256sums=('001aeed679e0d516987d9c1ed19d0dc44f74ad4fc9da1fc1873527be0adab029'
- '59b56272570bdf957570cafb57680a4516f8f0dfbf94c301f133410130b0a8be')
+ 'c82137919f3a766f0de4c4807fe079caa8f12b05c37dddbe63734a96bcd60f4e')
prepare() {
cd "$_name-$pkgver"
@@ -25,6 +25,8 @@ prepare() {
# build with fixed module name and no RPATH
patch -p1 -i "$srcdir/fix-setup.py.patch"
+ local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
+ ln -s /usr/include/python$python_version/cxx Source/CXX
}
build() {
diff --git a/fix-setup.py.patch b/fix-setup.py.patch
index 137f7d5..be77ad7 100644
--- a/fix-setup.py.patch
+++ b/fix-setup.py.patch
@@ -14,7 +14,7 @@
# .so that we'll package.
os.chdir( 'Source' )
- os.system( sys.executable + ' setup.py configure' )
-+ os.system( sys.executable + ' setup.py configure --verbose --fixed-module-name --norpath' )
++ os.system( sys.executable + ' setup.py configure --verbose --fixed-module-name --norpath --pycxx-dir=.' )
os.system( 'make clean' )
os.system( 'make' )
Last edited by loqs (2026-03-30 14:06:28)
Offline
I did consider this option, but like I said above:
> Alternatively I could point the build script to a path inside $pkgdir, but then the package would break if the package cache is deleted.
If I point pycxx-dir to the host system location where the symlink will be copied to, the build script will not run since the files aren't copied until the end of the packaging process, after build() afaik
Last edited by stickynotememo (Yesterday 03:28:32)
Offline
@loqs, can you paste in the patch you made?
It was include in https://bbs.archlinux.org/viewtopic.php … 4#p2292804 here it is as well https://gist.github.com/loqs/593c68cf1d … 61df2bfdae
I did consider this option, but like I said above:
> Alternatively I could point the build script to a path inside $pkgdir, but then the package would break if the package cache is deleted.
The symlink only needs to exist for the build. The symlink is from "$srcdir"/$_name-$pkgver/Source/CXX to /usr/include/python$python_version/cxx which is provided by python-pycxx which is a dependency so will be present unless that package is corrupted or changed. After the build the symlink / python-pycxx are no longer required.
Last edited by loqs (Yesterday 03:48:21)
Offline
Ah. Yeah, if python-pycxx is only required for the build then I guess that does make things easier. I don't know how I missed the fact that it was in makedepends and not depends. Thanks for the help and the patch.
Offline
Pages: 1