Issue #121 resolved

SandboxViolation on Python 3 building setup_requires deps when lib2to3 grammar is not writable

Jason R. Coombs
created an issue

Consider an environment such as this one on Windows where the system site-packages is not writable (due to UAC restrictions) and the lib2to3 grammar pickles aren't yet generated:

C:\Users\jaraco>easy_install --user irc
Searching for irc
Reading https://pypi.python.org/simple/irc/
Best match: irc 8.5.4
Downloading https://pypi.python.org/packages/source/i/irc/irc-8.5.4.zip#md5=5d94
56d8861ef409252a6184adba2617
Processing irc-8.5.4.zip
Writing C:\Users\jaraco\AppData\Local\Temp\easy_install-_g5bf6xb\irc-8.5.4\setup
.cfg
Running irc-8.5.4\setup.py -q bdist_egg --dist-dir C:\Users\jaraco\AppData\Local\Temp\easy_install-_g5bf6xb\irc-8.5.4\egg-dist-tmp-uo7m2_qf
Searching for pytest-runner
Reading https://pypi.python.org/simple/pytest-runner/
Best match: pytest-runner 2.0
Downloading https://pypi.python.org/packages/source/p/pytest-runner/pytest-runner-2.0.zip#md5=399a91934c797695e294a5a341db715f
Processing pytest-runner-2.0.zip
Writing C:\Users\jaraco\AppData\Local\Temp\easy_install-_g5bf6xb\irc-8.5.4\temp\easy_install-wwlag15y\pytest-runner-2.0\setup.cfg
Running pytest-runner-2.0\setup.py -q bdist_egg --dist-dir C:\Users\jaraco\AppData\Local\Temp\easy_install-_g5bf6xb\irc-8.5.4\temp\easy_install-wwlag15y\pytest-runner-2.0\egg-dist-tmp-oycl4frc
Searching for hgtools
Reading https://pypi.python.org/simple/hgtools/
Best match: hgtools 4.0
Downloading https://pypi.python.org/packages/source/h/hgtools/hgtools-4.0.zip#md5=a1b58801ec06de50ce4247f66c28e9cd
Processing hgtools-4.0.zip
Writing C:\Users\jaraco\AppData\Local\Temp\easy_install-_g5bf6xb\irc-8.5.4\temp\easy_install-wwlag15y\pytest-runner-2.0\temp\easy_install-ozih9t6e\hgtools-4.0\setup.cfg
Running hgtools-4.0\setup.py -q bdist_egg --dist-dir C:\Users\jaraco\AppData\Local\Temp\easy_install-_g5bf6xb\irc-8.5.4\temp\easy_install-wwlag15y\pytest-runner-2.0\temp\easy_install-ozih9t6e\hgtools-4.0\egg-dist-tmp-rrwg3yo6
error: Setup script exited with error: SandboxViolation: open('c:\\python\\lib\\lib2to3\\Grammar3.4.0.beta.1.pickle', 'wb') {}

The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand.  Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.

Easy_install can install simple packages that have no setup_requires dependencies, but when setuptools encounters a package with setup_requires dependencies, those dependencies are built in a sandbox which will trigger a violation when lib2to3 attempts to cache the grammar in a pickle.

Comments (1)

  1. Log in to comment