Closed hoefling closed 7 years ago
It seems the problem is that assertion rewriting is writing the cached .pyc
files to disk, and sandboxing doesn't like that. You can set PYTHONDONTWRITEBYTECODE
to disable this behavior.
its also a wont-fix, the setuptools sandbox is broken by design and will eventually disappear
@RonnyPfannschmidt: interesting, didn't know that. Can you point me on any official info about its removal? As far as I can see, there's no deprecation warnings in the module itself, its code is being maintained (last modified on Feb 24th).
I'm building a package using sandboxing (
setuptools.sandbox
module). I found out that I can't execute tests withpytest
once I have installed any plugin. Here are the steps to reproduce from scratch:Create a fresh virtual environment and preinstall
pytest
.Add project stub to play with.
setup( name='project-stub', version='0.1', packages=[] ) EOM $ cat <sandboxed_setup.py
import setuptools.sandbox
setuptools.sandbox.run_setup('setup.py', ['pytest']) EOM $ cat <test_foo.py
def test_bar():
assert True
EOM
pytest
plugin and rerun the tests: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.