Skip to content

setuptools.sandbox.SandboxViolation: SandboxViolation: open('_configtest.c', 'w') {} only on Python 3.8 #1874

@alex

Description

@alex

When adding Python 3.8 to pyca/cryptography's CI, we're seeing a baffling error message... but only under Python 3.8:


  File "c:\python38\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
    yield
  File "c:\python38\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "c:\python38\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "C:\Users\CONTAI~1\AppData\Local\Temp\easy_install-z0ti_pg_\cffi-1.13.0\setup.py", line 127, in <module>
    elif (is_short_option(argv[i]) and
  File "C:\Users\CONTAI~1\AppData\Local\Temp\easy_install-z0ti_pg_\cffi-1.13.0\setup.py", line 105, in uses_msvc
    '--url',
  File "c:\python38\lib\distutils\command\config.py", line 225, in try_compile
    self._compile(body, headers, include_dirs, lang)
  File "c:\python38\lib\distutils\command\config.py", line 127, in _compile
    src = self._gen_temp_sourcefile(body, headers, lang)
  File "c:\python38\lib\distutils\command\config.py", line 109, in _gen_temp_sourcefile
    with open(filename, "w") as file:
  File "c:\python38\lib\site-packages\setuptools\sandbox.py", line 418, in _open
    self._violation("open", path, mode, *args, **kw)
  File "c:\python38\lib\site-packages\setuptools\sandbox.py", line 407, in _violation
    raise SandboxViolation(operation, args, kw)
setuptools.sandbox.SandboxViolation: SandboxViolation: open('_configtest.c', 'w') {}

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.

I assume this is a bad intersection between something, but for the life of me I don't know what.

https://dev.azure.com/pyca/cryptography/_build/results?buildId=1062&view=logs&jobId=d500edf6-0b6e-504d-2304-06892ff28e12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions