Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

ghost opened this issue Dec 7, 2013 · 1 comment


Copy link

ghost commented Dec 7, 2013

Originally reported by: jaraco (Bitbucket: jaraco, GitHub: jaraco)

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
Best match: irc 8.5.4
Writing C:\Users\jaraco\AppData\Local\Temp\easy_install-_g5bf6xb\irc-8.5.4\setup
Running irc-8.5.4\ -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
Best match: pytest-runner 2.0
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\ -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
Best match: hgtools 4.0
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\ -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.

Copy link

ghost commented Dec 7, 2013

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):

Exempt lib2to3 pickled grammars from the DirectorySandboxing. Fixes #121.

@ghost ghost added major bug labels Mar 29, 2016
@ghost ghost closed this as completed Mar 29, 2016
jaraco added a commit that referenced this issue Mar 29, 2016

extra : histedit_source : 6cd9a3c6003d3f6de2f8e676b61589db4dffafb0
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

0 participants