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

command.build_ext raises FileNotFoundError #3

jaraco opened this issue Jul 5, 2020 · 0 comments

command.build_ext raises FileNotFoundError #3

jaraco opened this issue Jul 5, 2020 · 0 comments


Copy link

jaraco commented Jul 5, 2020

As discovered in pypa/setuptools#2228 and reported in bpo-41207, recent changes to distutils.spawn no longer trap OSError replacing it with DistutilsExecError so FileNotFoundErrors will reach the user attempting to compile with a missing compiler.

@jaraco jaraco closed this as completed in f2e4b91 Jul 5, 2020
This was referenced Jul 10, 2020
This was referenced Aug 11, 2020
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Sep 2, 2020
Please note the change in 50.0.0:

"Setuptools overrides the stdlib distutils on import"

and the workaround:

"If the environment variable ``SETUPTOOLS_USE_DISTUTILS`` is set to
``stdlib``, Setuptools will fall back to the legacy behavior."


* #2357: Restored Python 3.5 support in distutils.util for missing `subprocess._optim_args_from_interpreter_flags`.
* #2358: Restored AIX support on Python 3.8 and earlier.
* #2361: Add Python 3.10 support to _distutils_hack. Get the 'Loader' abstract class
  from rather than (alias removed in Python


* #2232: Once again, Setuptools overrides the stdlib distutils on import. For environments or invocations where this behavior is undesirable, users are provided with a temporary escape hatch. If the environment variable ``SETUPTOOLS_USE_DISTUTILS`` is set to ``stdlib``, Setuptools will fall back to the legacy behavior. Use of this escape hatch is discouraged, but it is provided to ease the transition while proper fixes for edge cases can be addressed.
* #2334: In MSVC module, refine text in error message.


* #2129: In pkg_resources, no longer detect any pathname ending in .egg as a Python egg. Now the path must be an unpacked egg or a zip file.


* #2306: When running as a PEP 517 backend, setuptools does not try to install
  ``setup_requires`` itself. They are reported as build requirements for the
  frontend to install.


* #2310: Updated vendored packaging version to 20.4.


* #2300: Improve the ``safe_version`` function documentation
* #2297: Once again, in stubs prefer exec_module to the deprecated load_module.


* #2316: Removed warning when ``distutils`` is imported before ``setuptools`` when ``distutils`` replacement is not enabled.


* #2259: Setuptools now provides a .pth file (except for editable installs of setuptools) to the target environment to ensure that when enabled, the setuptools-provided distutils is preferred before setuptools has been imported (and even if setuptools is never imported). Honors the SETUPTOOLS_USE_DISTUTILS environment variable.


* #2257: Fixed two flaws in distutils._msvccompiler.MSVCCompiler.spawn.


* #2230: Now warn the user when setuptools is imported after distutils modules have been loaded (exempting PyPy for 3.6), directing the users of packages to import setuptools first.


* #2212: (Distutils) Allow spawn to accept environment. Avoid monkey-patching global state.
* #2249: Fix extension loading technique in stubs.


* #2232: In preparation for re-enabling a local copy of distutils, Setuptools now honors an environment variable, SETUPTOOLS_USE_DISTUTILS. If set to 'stdlib' (current default), distutils will be used from the standard library. If set to 'local' (default in a imminent backward-incompatible release), the local copy of distutils will be used.


* #2094: Removed pkg_resources.py2_warn module, which is no longer reachable.


* #2228: Applied fix for pypa/distutils#3, restoring expectation that spawn will raise a DistutilsExecError when attempting to execute a missing file.


* #2228: Disabled distutils adoption for now while emergent issues are addressed.


* #2165: Setuptools no longer installs a file during easy_install or develop installs. As a result, .eggs on PYTHONPATH will no longer take precedence over other packages on sys.path. If this issue affects your production environment, please reach out to the maintainers at #2165.
* #2137: Removed (private) pkg_resources.RequirementParseError, now replaced by packaging.requirements.InvalidRequirement. Kept the name for compatibility, but users should catch InvalidRequirement instead.
* #2180: Update vendored packaging in pkg_resources to 19.2.
* #2199: Fix exception causes all over the codebase by using ``raise new_exception from old_exception``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

1 participant