File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 4646 fi
4747 done
4848
49- # Create a writable site-packages directory
50- mkdir -p $out/lib/python3.12/site-packages
51- chmod -R 755 $out/lib/python3.12/site-packages
49+ # Create a symlink to the original site-packages for reading
50+ ln -sf ${ pythonWithPackages } /lib/python3.12/site-packages $out/lib/python3.12/site-packages
5251 '' ;
5352 } ;
5453
6463 # Set restricted sys.path, only allow access to safe packages
6564 export PYTHONPATH="/app:/usr/local/lib/python3.12/site-packages"
6665
66+ # Create writable site-packages directory if it doesn't exist
67+ mkdir -p /usr/local/lib/python3.12/site-packages
68+
6769 # Restrict system tool access - ensure util-linux tools are accessible
6870 export PATH="${ pkgs . coreutils } /bin:${ pkgs . util-linux } /bin:/usr/local/bin:/usr/bin"
6971
@@ -322,6 +324,7 @@ finally:
322324 mkdir -p $out/etc/passwd.d
323325 mkdir -p $out/etc/group.d
324326 mkdir -p $out/etc/shadow.d
327+ mkdir -p $out/usr/local/lib/python3.12/site-packages
325328
326329 # Create uv configuration
327330 cat > $out/etc/uv/uv.toml << 'EOF'
You can’t perform that action at this time.
0 commit comments