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

Closed
ghost opened this issue Dec 7, 2013 · 1 comment

Comments

@ghost
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
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.


@ghost
Copy link
Author

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
.

--HG--
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
Projects
None yet
Development

No branches or pull requests

0 participants