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

setuptools 50.0 MSVC: CCompiler_spawn() got an unexpected keyword argument 'env' #15

Closed
mbeyeler opened this issue Sep 1, 2020 · 17 comments

Comments

@mbeyeler
Copy link

mbeyeler commented Sep 1, 2020

After upgrading to setuptools 50.0, my Cython-based package extensions no longer build. The 'env' in return super().spawn(cmd, env=env) seems to be the problem.

self.run_command('build_ext')
  File "c:\cibw\python\pythonx86.3.5.4\tools\lib\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\cibw\python\pythonx86.3.5.4\tools\lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
    cmd_obj.run()
  File "c:\cibw\python\pythonx86.3.5.4\tools\lib\site-packages\numpy\distutils\command\build_ext.py", line 274, in run
    self.build_extensions()
  File "D:\a\1\s\setup.py", line 168, in build_extensions
    if self.can_compile_link(compile_flags, link_flags):
  File "D:\a\1\s\setup.py", line 142, in can_compile_link
    extra_postargs=compile_flags)
  File "c:\cibw\python\pythonx86.3.5.4\tools\lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 403, in compile
    self.spawn(args)
  File "c:\cibw\python\pythonx86.3.5.4\tools\lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 507, in spawn
    return super().spawn(cmd, env=env)
  File "c:\cibw\python\pythonx86.3.5.4\tools\lib\site-packages\numpy\distutils\ccompiler.py", line 92, in <lambda>
    m = lambda self, *args, **kw: func(self, *args, **kw)
TypeError: CCompiler_spawn() got an unexpected keyword argument 'env'

Downgrading to setuptools 49.6 fixes the issue. Using numpy-1.18.5-cp35-cp35m-win_amd64.whl.

Thanks,
Michael

@jaraco
Copy link
Member

jaraco commented Sep 1, 2020

It looks like the issue is that numpy is incompatible with the changes in #6. Please file a bug with numpy to address the issue. Thanks.

@jaraco
Copy link
Member

jaraco commented Sep 1, 2020

The other workaround is to set SETUPTOOLS_USE_DISTUTILS=stdlib in the environment when running the build (disabling the use of Setuptools' local copy of distutils).

@sverzakov
Copy link

I am not sure that the problem should be solved on numpy side. At least not in the case of mbeyeler:

mbeyeler uses Python 3.5.4, distools of which do not contain your changes of July 12 (env parameter of spawn). So numpy is (most probably) compatible with the installed distools, but setuptools >49.1.2 are not compatible with distools of Python 3.5.4.

This will be the case not only for the "ancient" release 3.5.4, but for all Python releases made before July 12 or even after that: distools of Python releases 3.7.9 and 3.8.5 also do not contain spawn() with env parameter. I wonder if 3.9 has it?

So, maybe, "monkey patching" still should be done for Python < 3.9?

@jaraco
Copy link
Member

jaraco commented Sep 1, 2020

Python 3.9 does not have that change. The change was only applied to pypa/distutils and has only been released as part of the setuptools distutils adoption (#417).

What I'm hoping is that numpy can add support for this new version of distutils that supports this new interface.

@sverzakov
Copy link

The problem is that even if numpy add support of spawn() with env param it will not solve all the issues. As explained in #17209 (comment), "scikit-learn needs to build with NumPy 1.13.3 right now", so not only all active minor versions of numpy should be re-released, but scikit-learn should be re-released too.

I think it boils down to a question which interface / semantics numpy must follow: the one of the stdlid distutils or the one of setuptools.distutils. There is no easy answer to it, because on one hand, numpy patches distutils.ccompiler and thus is expected to follow signatures of stdlib distutils and may expect that patches applied before it also do that. On the other hand, numpy is aware of setuptools and uses them, although in an optional way, so there is a dependency on setuptools and then setuptools should expect that their users comply to setuptools signatures and semantics.

Do you know if spawn() with env param will be added into the stdlib distutils of Python 3.10 or later?

@rgommers
Copy link

rgommers commented Sep 2, 2020

Short-term, this problem should be worked around by pinning to setuptools <50.0 or using `SETUPTOOLS_USE_DISTUTILS="stdlib".

For the longer-term solution to this and other numpy.distutils related issues, I have opened pypa/setuptools#2372.

@riedgar-ms
Copy link

We seem to have hit this issue as well - pip install of our requirements fails with:

TypeError: CCompiler_spawn() got an unexpected keyword argument 'env'

This only happens for Python 3.8 on Windows when we pin numpy, scipy etc. to the lowest version we claim to support. Things work fine on Linux and MacOS, and also for the other Python versions on Windows (we test 3.6 and 3.7 as well). We only pin our direct dependencies, though - not a full pip freeze.

I'm going to try putting in that upper bound on setuptools as a work around.

@sverzakov
Copy link

I had such a problem on Python 3.7 (solved it by downgrading setuptools to 49.1.2, I do not think just <50.0 is low enough). Python version should not make any difference, unless you do different things for different versions yourself. Maybe for 3.6 and 3.7 versions you have cached pre-built wheels? Try to clean the pip cache up..

As to OS: it seems that param env is used only for MS VC compiler, so it figures, unless I'm very much mistaken.

@rgommers
Copy link

rgommers commented Sep 2, 2020

I had such a problem on Python 3.7 (solved it by downgrading setuptools to 49.1.2, I do not think just <50.0 is low enough)

This may be the case; there's multiple issues right now that you may or may not be hitting. NumPy itself is pinned to <49.2.0 on all platforms, SciPy to <50.0 in its Windows CI.

@riedgar-ms
Copy link

I just failed with <50.0 too. Am about to try <49.2.0

@riedgar-ms
Copy link

And that failed as well. But still, only on Python 3.8 on Windows. Python 3.6 and 3.7 on Windows work.

I'm not sure if I'm reading the logs correctly, but things like:

Found executable C:\ProgramData\Chocolatey\bin\gfortran.exe
    Using built-in specs.
    COLLECT_GCC=C:\ProgramData\Chocolatey\lib\mingw\tools\install\mingw64\bin\gfortran.exe
    COLLECT_LTO_WRAPPER=C:/ProgramData/Chocolatey/lib/mingw/tools/install/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/lto-wrapper.exe
    Target: x86_64-w64-mingw32
    Configured with: ../../../src/gcc-8.1.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpfr=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-isl=/c/mingw810/prerequisites/x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/opt/include -I/c/mingw810/prerequisites/x86_64-zlib-static/include -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw810/x86_64-810-posix-seh-rt_v6-rev0/mingw64/opt/lib -L/c/mingw810/prerequisites/x86_64-zlib-static/lib -L/c/mingw810/prerequisites/x86_64-w64-mingw32-static/lib '
    Thread model: posix
    gcc version 8.1.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)
      NOT AVAILABLE

make me wonder if it's also trying to use gcc (via MinGW).

@rgommers
Copy link

rgommers commented Sep 2, 2020

@riedgar-ms MinGW + gfortran sounds like an unrelated problem to the CCompiler.spawn that this issue is for. You may want to keep it on your own repo, or if you see that it's related to numpy.distutils, report on the NumPy issue tracker.

@jaraco
Copy link
Member

jaraco commented Sep 2, 2020

Do you know if spawn() with env param will be added into the stdlib distutils of Python 3.10 or later?

That's uncertain. The plan is to deprecate stdlib distutils and direct users/systems to migrate to Setuptools instead. I think it's a small likelihood the change will be ported to CPython 3.10.

I acknowledge that this incompatibility is unanticipated so probably deserves some consideration. I believe distutils could be augmented with a shim to provide backward compatibility. That is, if the call to spawn fails with a TypeError, patch os.environ and retry without the env (possibly utilizing a lock to prevent the race condition).

Would that work?

@rgommers
Copy link

rgommers commented Sep 2, 2020

Thanks, that sounds like a good band aid to me, should work. I'd be happy to test the patch on SciPy Windows CI if needed.

@riedgar-ms
Copy link

@riedgar-ms MinGW + gfortran sounds like an unrelated problem to the CCompiler.spawn that this issue is for. You may want to keep it on your own repo, or if you see that it's related to numpy.distutils, report on the NumPy issue tracker.

We definitely had the symptom TypeError: CCompiler_spawn() got an unexpected keyword argument 'env' as well, but I'll see about reporting the Fortran issue on Numpy.

@riedgar-ms
Copy link

Tracked it down. I had forgotten another stage before the main pip install which updated setuptools. Running combinations of

  • Linux or Windows
  • Python 3.6, 3.7, 3.8
  • Updating or not setuptools
  • Installing numpy==1.17.2 or numpy>=1.17.2

The only consistently failing combination is:

  • Windows
  • Python 3.8
  • Updating setuptools
  • Install numpy==1.17.2

All other combinations pass.

@jaraco jaraco transferred this issue from pypa/setuptools Sep 5, 2020
@jaraco jaraco closed this as completed in 6e92cda Sep 5, 2020
jaraco added a commit to pypa/setuptools that referenced this issue Sep 5, 2020
@jaraco
Copy link
Member

jaraco commented Sep 5, 2020

Fix for this is releasing with Setuptools 50.3.

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Dec 30, 2021
v60.2.0
-------


Changes
^^^^^^^
* #2974: Setuptools now relies on the Python logging infrastructure to log messages. Instead of using ``distutils.log.*``, use ``logging.getLogger(name).*``.
* #2987: Sync with pypa/distutils@2def21c, including fix for missing get_versions attribute (#2969), more reliance on sysconfig from stdlib.

Misc
^^^^
* #2962: Avoid attempting to use local distutils when the presiding version of Setuptools on the path doesn't have one.
* #2983: Restore 'add_shim' as the way to invoke the hook. Avoids compatibility issues between different versions of Setuptools with the distutils local implementation.


v60.1.1
-------


Misc
^^^^
* #2980: Bypass distutils loader when setuptools module is no longer available on sys.path.


v60.1.0
-------


Changes
^^^^^^^
* #2958: In distutils_hack, only add the metadata finder once. In ensure_local_distutils, rely on a context manager for reliable manipulation.
* #2963: Merge with pypa/distutils@a5af364910. Includes revisited fix for pypa/distutils#15 and improved MinGW/Cygwin support from pypa/distutils#77.


v60.0.5
-------


Misc
^^^^
* #2960: Install schemes fall back to default scheme for headers.


v60.0.4
-------


Misc
^^^^
* #2954: Merge with pypa/distutils@eba2bcd310. Adds platsubdir to config vars available for substitution.


v60.0.3
-------


Misc
^^^^
* #2940: Avoid KeyError in distutils hack when pip is imported during ensurepip.


v60.0.2
-------


Misc
^^^^
* #2938: Select 'posix_user' for the scheme unless falling back to stdlib, then use 'unix_user'.


v60.0.1
-------


Misc
^^^^
* #2944: Add support for extended install schemes in easy_install.


v60.0.0
-------


Breaking Changes
^^^^^^^^^^^^^^^^
* #2896: Setuptools once again makes its local copy of distutils the default. To override, set SETUPTOOLS_USE_DISTUTILS=stdlib.


v59.8.0
-------


Changes
^^^^^^^
* #2935: Merge pypa/distutils@460b59f.


v59.7.0
-------


Changes
^^^^^^^
* #2930: Require Python 3.7
mtremer pushed a commit to ipfire/ipfire-2.x that referenced this issue Apr 24, 2022
- Update from 59.5.0 to 62.0.0
- Update of rootfile
- Changelog
	v62.0.0
	Breaking Changes
	* #3151: Made ``setup.py develop --user`` install to the user site packages directory even if it is disabled in the current interpreter.
	Changes
	* #3153: When resolving requirements use both canonical and normalized names -- by :user:`ldaniluk`
	* #3167: Honor unix file mode in ZipFile when installing wheel via ``install_as_egg`` -- by :user:`delijati`
	Misc
	* #3088: Fixed duplicated tag with the ``dist-info`` command.
	* #3247: Fixed problem preventing ``readme`` specified as dynamic in ``pyproject.toml``
	  from being dynamically specified in ``setup.py``.
	v61.3.1
	Misc
	* #3233: Included missing test file ``setupcfg_examples.txt`` in ``sdist``.
	* #3233: Added script that allows developers to download ``setupcfg_examples.txt`` prior to
	  running tests. By caching these files it should be possible to run the test suite
	  offline.
	v61.3.0
	Changes
	* #3229: Disabled automatic download of ``trove-classifiers`` to facilitate reproducibility.
	Misc
	* #3229: Updated ``pyproject.toml`` validation via ``validate-pyproject`` v0.7.1.
	* #3229: New internal tool made available for updating the code responsible for
	  the validation of ``pyproject.toml``.
	  This tool can be executed via ``tox -e generate-validation-code``.
	v61.2.0
	Changes
	* #3215: Ignored a subgroup of invalid ``pyproject.toml`` files that use the ``[project]``
	  table to specify only ``requires-python`` (**transitional**).
	  .. warning::
	     Please note that future releases of setuptools will halt the build process
	     if a ``pyproject.toml`` file that does not match doc:`the PyPA Specification
	     <PyPUG:specifications/declaring-project-metadata>` is given.
	* #3215: Updated ``pyproject.toml`` validation, as generated by ``validate-pyproject==0.6.1``.
	* #3218: Prevented builds from erroring if the project specifies metadata via
	  ``pyproject.toml``, but uses other files (e.g. ``setup.py``) to complement it,
	  without setting ``dynamic`` properly.
	  .. important::
	     This is a **transitional** behaviour.
	     Future releases of ``setuptools`` may simply ignore externally set metadata
	     not backed by ``dynamic`` or even halt the build with an error.
	* #3224: Merge changes from pypa/distutils@e1d5c9b1f6
	Documentation changes
	* #3217: Fixed typo in ``pyproject.toml`` example in Quickstart -- by :user:`pablo-cardenas`.
	Misc
	* #3223: Fixed missing requirements with environment markers when
	  ``optional-dependencies`` is set in ``pyproject.toml``.
	v61.1.1
	Misc
	* #3212: Fixed missing dependencies when running ``setup.py install``.
	  Note that calling ``setup.py install`` directly is still deprecated and
	  will be removed in future versions of ``setuptools``.
	  Please check the release notes for :ref:`setup_install_deprecation_note`.
	v61.1.0
	Deprecations
	* #3206: Changed ``setuptools.convert_path`` to an internal function that is not exposed
	  as part of setuptools API.
	  Future releases of ``setuptools`` are likely to remove this function.
	Changes
	* #3202: Changed behaviour of auto-discovery to not explicitly expand ``package_dir``
	  for flat-layouts and to not use relative paths starting with ``./``.
	* #3203: Prevented ``pyproject.toml`` parsing from overwriting
	  ``dist.include_package_data`` explicitly set in ``setup.py`` with default
	  value.
	* #3208: Added a warning for non existing files listed with the ``file`` directive in
	  ``setup.cfg`` and ``pyproject.toml``.
	* #3208: Added a default value for dynamic ``classifiers`` in ``pyproject.toml`` when
	  files are missing and errors being ignored.
	* #3211: Disabled auto-discovery when distribution class has a ``configuration``
	  attribute (e.g. when the ``setup.py`` script contains ``setup(...,
	  configuration=...)``).  This is done to ensure extension-only packages created
	  with ``numpy.distutils.misc_util.Configuration`` are not broken by the safe
	  guard
	  behaviour to avoid accidental multiple top-level packages in a flat-layout.
	  .. note::
	     Users that don't set ``packages``, ``py_modules``, or ``configuration`` are
	     still likely to observe the auto-discovery behavior, which may halt the
	     build if the project contains multiple directories and/or multiple Python
	     files directly under the project root.
	     To disable auto-discovery please explicitly set either ``packages`` or
	     ``py_modules``. Alternatively you can also configure :ref:`custom-discovery`.
	v61.0.0
	Deprecations
	* #3068: Deprecated ``setuptools.config.read_configuration``,
	  ``setuptools.config.parse_configuration`` and other functions or classes
	  from ``setuptools.config``.
	  Users that still need to parse and process configuration from ``setup.cfg`` can
	  import a direct replacement from ``setuptools.config.setupcfg``, however this
	  module is transitional and might be removed in the future
	  (the ``setup.cfg`` configuration format itself is likely to be deprecated in the future).
	Breaking Changes
	* #2894: If you purposefully want to create an *"empty distribution"*, please be aware
	  that some Python files (or general folders) might be automatically detected and
	  included.
	  Projects that currently don't specify both ``packages`` and ``py_modules`` in their
	  configuration and contain extra folders or Python files (not meant for distribution),
	  might see these files being included in the wheel archive or even experience
	  the build to fail.
	  You can check details about the automatic discovery (and how to configure a
	  different behaviour) in :doc:`/userguide/package_discovery`.
	* #3067: If the file ``pyproject.toml`` exists and it includes project
	  metadata/config (via ``[project]`` table or ``[tool.setuptools]``),
	  a series of new behaviors that are not backward compatible may take place:
	  - The default value of ``include_package_data`` will be considered to be ``True``.
	  - Setuptools will attempt to validate the ``pyproject.toml`` file according
	    to PEP 621 specification.
	  - The values specified in ``pyproject.toml`` will take precedence over those
	    specified in ``setup.cfg`` or ``setup.py``.
	Changes
	* #2887: **[EXPERIMENTAL]** Added automatic discovery for ``py_modules`` and ``packages``
	  -- by :user:`abravalheri`.
	  Setuptools will try to find these values assuming that the package uses either
	  the *src-layout* (a ``src`` directory containing all the packages or modules),
	  the *flat-layout* (package directories directly under the project root),
	  or the *single-module* approach (an isolated Python file, directly under
	  the project root).
	  The automatic discovery will also respect layouts that are explicitly
	  configured using the ``package_dir`` option.
	  For backward-compatibility, this behavior will be observed **only if both**
	  ``py_modules`` **and** ``packages`` **are not set**.
	  (**Note**: specifying ``ext_modules`` might also prevent auto-discover from
	  taking place)
	  If setuptools detects modules or packages that are not supposed to be in the
	  distribution, please manually set ``py_modules`` and ``packages`` in your
	  ``setup.cfg`` or ``setup.py`` file.
	  If you are using a *flat-layout*, you can also consider switching to
	  *src-layout*.
	* #2887: **[EXPERIMENTAL]** Added automatic configuration for the ``name`` metadata
	  -- by :user:`abravalheri`.
	  Setuptools will adopt the name of the top-level package (or module in the case
	  of single-module distributions), **only when** ``name`` **is not explicitly
	  provided**.
	  Please note that it is not possible to automatically derive a single name when
	  the distribution consists of multiple top-level packages or modules.
	* #3066: Added vendored dependencies for :pypi:`tomli`, :pypi:`validate-pyproject`.
	  These dependencies are used to read ``pyproject.toml`` files and validate them.
	* #3067: **[EXPERIMENTAL]** When using ``pyproject.toml`` metadata,
	  the default value of ``include_package_data`` is changed to ``True``.
	* #3068: **[EXPERIMENTAL]** Add support for ``pyproject.toml`` configuration
	  (as introduced by :pep:`621`). Configuration parameters not covered by
	  standards are handled in the ``[tool.setuptools]`` sub-table.
	  In the future, existing ``setup.cfg`` configuration
	  may be automatically converted into the ``pyproject.toml`` equivalent before taking effect
	  (as proposed in #1688). Meanwhile users can use automated tools like
	  :pypi:`ini2toml` to help in the transition.
	  Please note that the legacy backend is not guaranteed to work with
	  ``pyproject.toml`` configuration.
	  -- by :user:`abravalheri`
	* #3125: Implicit namespaces (as introduced in :pep:`420`) are now considered by default
	  during :doc:`package discovery </userguide/package_discovery>`, when
	  ``setuptools`` configuration and project metadata are added to the
	  ``pyproject.toml`` file.
	  To disable this behaviour, use ``namespaces = False`` when explicitly setting
	  the ``[tool.setuptools.packages.find]`` section in ``pyproject.toml``.
	  This change is backwards compatible and does not affect the behaviour of
	  configuration done in ``setup.cfg`` or ``setup.py``.
	* #3152: **[EXPERIMENTAL]** Added support for ``attr:`` and ``cmdclass`` configurations
	  in ``setup.cfg`` and ``pyproject.toml`` when ``package_dir`` is implicitly
	  found via auto-discovery.
	* #3178: Postponed importing ``ctypes`` when hiding files on Windows.
	  This helps to prevent errors in systems that might not have ``libffi`` installed.
	* #3179: Merge with pypa/distutils@267dbd25ac
	Documentation changes
	* #3172: Added initial documentation about configuring ``setuptools`` via ``pyproject.toml``
	  (using standard project metadata).
	Misc
	* #3065: Refactored ``setuptools.config`` by separating configuration parsing (specific
	  to the configuration file format, e.g. ``setup.cfg``) and post-processing
	  (which includes directives such as ``file:`` that can be used across different
	  configuration formats).
	v60.10.0
	Changes
	* #2971: Deprecated upload_docs command, to be removed in the future.
	* #3137: Use samefile from stdlib, supported on Windows since Python 3.2.
	* #3170: Adopt nspektr (vendored) to implement Distribution._install_dependencies.
	Documentation changes
	* #3144: Added documentation on using console_scripts from setup.py, which was previously only shown in setup.cfg  -- by :user:`xhlulu`
	* #3148: Added clarifications about ``MANIFEST.in``, that include links to PyPUG docs
	  and more prominent mentions to using a revision control system plugin as an
	  alternative.
	* #3148: Removed mention to ``pkg_resources`` as the recommended way of accessing data
	  files, in favour of importlib.resources.
	  Additionally more emphasis was put on the fact that *package data files* reside
	  **inside** the *package directory* (and therefore should be *read-only*).
	Misc
	* #3120: Added workaround for intermittent failures of backend tests on PyPy.
	  These tests now are marked with `XFAIL
	  <https://docs.pytest.org/en/stable/how-to/skipping.html>`_, instead of erroring
	  out directly.
	* #3124: Improved configuration for :pypi:`rst-linker` (extension used to build the
	  changelog).
	* #3133: Enhanced isolation of tests using virtual environments - PYTHONPATH is not leaking to spawned subprocesses  -- by :user:`befeleme`
	* #3147: Added options to provide a pre-built ``setuptools`` wheel or sdist for being
	  used during tests with virtual environments.
	  Paths for these pre-built distribution files can now be set via the environment
	  variables: ``PRE_BUILT_SETUPTOOLS_SDIST`` and ``PRE_BUILT_SETUPTOOLS_WHEEL``.
	v60.9.3
	Misc
	* #3093: Repaired automated release process.
	v60.9.2
	Misc
	* #3035: When loading distutils from the vendored copy, rewrite ``__name__`` to ensure consistent importing from inside and out.
	v60.9.1
	Misc
	* #3102: Prevent vendored importlib_metadata from loading distributions from older importlib_metadata.
	* #3103: Fixed issue where string-based entry points would be omitted.
	* #3107: Bump importlib_metadata to 4.11.1 addressing issue with parsing requirements in egg-info as found in PyPy.
	v60.9.0
	Changes
	* #2876: In the build backend, allow single config settings to be supplied.
	* #2993: Removed workaround in distutils hack for get-pip now that pypa/get-pip#137 is closed.
	* #3085: Setuptools no longer relies on ``pkg_resources`` for entry point handling.
	* #3098: Bump vendored packaging to 21.3.
	* Removed bootstrap script.
	v60.8.2
	Misc
	* #3091: Make ``concurrent.futures`` import lazy in vendored ``more_itertools``
	  package to a  avoid importing threading as a side effect (which caused
	  `gevent/gevent#1865 <https://github.com/gevent/gevent/issues/1865>`__).
	  -- by :user:`maciejp-ro`
	v60.8.1
	Misc
	* #3084: When vendoring jaraco packages, ensure the namespace package is converted to a simple package to support zip importer.
	v60.8.0
	Changes
	* #3085: Setuptools now vendors importlib_resources and importlib_metadata and jaraco.text. Setuptools no longer relies on pkg_resources for ensure_directory nor parse_requirements.
	v60.7.1
	Misc
	* #3072: Remove lorem_ipsum from jaraco.text when vendored.
	v60.7.0
	Changes
	* #3061: Vendored jaraco.text and use line processing from that library in pkg_resources.
	Misc
	* #3070: Avoid AttributeError in easy_install.create_home_path when sysconfig.get_config_vars values are not strings.
	v60.6.0
	Changes
	* #3043: Merge with pypa/distutils@bb018f1ac3 including consolidated behavior in sysconfig.get_platform (pypa/distutils#104).
	* #3057: Don't include optional ``Home-page`` in metadata if no ``url`` is specified. -- by :user:`cdce8p`
	* #3062: Merge with pypa/distutils@b53a824ec3 including improved support for lib directories on non-x64 Windows builds.
	Documentation changes
	* #2897: Added documentation about wrapping ``setuptools.build_meta`` in a in-tree
	  custom backend. This is a :pep:`517`-compliant way of dynamically specifying
	  build dependencies (e.g. when platform, OS and other markers are not enough).
	  -- by :user:`abravalheri`
	* #3034: Replaced occurrences of the defunct distutils-sig mailing list with pointers
	  to GitHub Discussions.
	  -- by :user:`ashemedai`
	* #3056: The documentation has stopped suggesting to add ``wheel`` to
	  :pep:`517` requirements -- by :user:`webknjaz`
	Misc
	* #3054: Used Py3 syntax ``super().__init__()`` -- by :user:`imba-tjd`
	v60.5.4
	Misc
	* #3009: Remove filtering of distutils warnings.
	* #3031: Suppress distutils replacement when building or testing CPython.
	v60.5.3
	Misc
	* #3026: Honor sysconfig variables in easy_install.
	v60.5.2
	Misc
	* #2993: In _distutils_hack, for get-pip, simulate existence of setuptools.
	v60.5.1
	Misc
	* #2918: Correct support for Python 3 native loaders.
	v60.5.0
	Changes
	* #2990: Set the ``.origin`` attribute of the ``distutils`` module to the module's ``__file__``.
	v60.4.0
	Changes
	* #2839: Removed ``requires`` sorting when installing wheels as an egg dir.
	* #2953: Fixed a bug that easy install incorrectly parsed Python 3.10 version string.
	* #3006: Fixed startup performance issue of Python interpreter due to imports of
	  costly modules in ``_distutils_hack`` -- by :user:`tiran`
	Documentation changes
	* #2674: Added link to additional resources on packaging in Quickstart guide
	* #3008: "In-tree" Sphinx extension for "favicons" replaced with ``sphinx-favicon``.
	* #3008: SVG images (logo, banners, ...) optimised with the help of the ``scour``
	  package.
	Misc
	* #2862: Added integration tests that focus on building and installing some packages in
	  the Python ecosystem via ``pip`` -- by :user:`abravalheri`
	* #2952: Modified "vendoring" logic to keep license files.
	* #2968: Improved isolation for some tests that where inadvertently using the project
	  root for builds, and therefore creating directories (e.g. ``build``, ``dist``,
	  ``*.egg-info``) that could interfere with the outcome of other tests
	  -- by :user:`abravalheri`.
	* #2968: Introduced new test fixtures ``venv``, ``venv_without_setuptools``,
	  ``bare_venv`` that rely on the ``jaraco.envs`` package.
	  These new test fixtures were also used to remove the (currently problematic)
	  dependency on the ``pytest_virtualenv`` plugin.
	* #2968: Removed ``tmp_src`` test fixture. Previously this fixture was copying all the
	  files and folders under the project root, including the ``.git`` directory,
	  which is error prone and increases testing time.
	  Since ``tmp_src`` was used to populate virtual environments (installing the
	  version of ``setuptools`` under test via the source tree), it was replaced by
	  the new ``setuptools_sdist`` and ``setuptools_wheel`` fixtures (that are build
	  only once per session testing and can be shared between all the workers for
	  read-only usage).
	v60.3.1
	Misc
	* #3002: Suppress AttributeError when detecting get-pip.
	v60.3.0
	Changes
	* #2993: In _distutils_hack, bypass the distutils exception for pip when get-pip is being invoked, because it imports setuptools.
	Misc
	* #2989: Merge with pypa/distutils@788cc159. Includes fix for config vars missing from sysconfig.
	v60.2.0
	Changes
	* #2974: Setuptools now relies on the Python logging infrastructure to log messages. Instead of using ``distutils.log.*``, use ``logging.getLogger(name).*``.
	* #2987: Sync with pypa/distutils@2def21c, including fix for missing get_versions attribute (#2969), more reliance on sysconfig from stdlib.
	Misc
	* #2962: Avoid attempting to use local distutils when the presiding version of Setuptools on the path doesn't have one.
	* #2983: Restore 'add_shim' as the way to invoke the hook. Avoids compatibility issues between different versions of Setuptools with the distutils local implementation.
	v60.1.1
	Misc
	* #2980: Bypass distutils loader when setuptools module is no longer available on sys.path.
	v60.1.0
	Changes
	* #2958: In distutils_hack, only add the metadata finder once. In ensure_local_distutils, rely on a context manager for reliable manipulation.
	* #2963: Merge with pypa/distutils@a5af364910. Includes revisited fix for pypa/distutils#15 and improved MinGW/Cygwin support from pypa/distutils#77.
	v60.0.5
	Misc
	* #2960: Install schemes fall back to default scheme for headers.
	v60.0.4
	Misc
	* #2954: Merge with pypa/distutils@eba2bcd310. Adds platsubdir to config vars available for substitution.
	v60.0.3
	Misc
	* #2940: Avoid KeyError in distutils hack when pip is imported during ensurepip.
	v60.0.2
	Misc
	* #2938: Select 'posix_user' for the scheme unless falling back to stdlib, then use 'unix_user'.
	v60.0.1
	Misc
	* #2944: Add support for extended install schemes in easy_install.
	v60.0.0
	Breaking Changes
	* #2896: Setuptools once again makes its local copy of distutils the default. To override, set SETUPTOOLS_USE_DISTUTILS=stdlib.
	v59.8.0
	Changes
	* #2935: Merge pypa/distutils@460b59f.
	v59.7.0
	Changes
	* #2930: Require Python 3.7
	v59.6.0
	Changes
	* #2925: Merge with pypa/distutils@92082ee42c including introduction of deprecation warning on Version classes.

Signed-off-by: Adolf Belka <[email protected]>
ymwdalex referenced this issue in ing-bank/sparse_dot_topn Jun 27, 2022
…ild python wheels automatically (#67)

* use oldest-supported-numpy; adjust cypthon install requirement setup

* add cibuildwheel in github action

* change the numpy range to 1.14.5, according to the oldest_support_numpy https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg\#L54

* change numpy version in setup.py

* test override numpy version for python 3.7

* update matrix os variables

* remove unnecessary setup requirement in setup.py

* fix typo?

* add 3.6

* workaround for error in windows os: CCompiler_spawn() got an unexpected keyword argument https://github.com/pypa/distutils/issues/15\#issuecomment-685029840

* skip pypy 3.7 macos, due to error would build wheel with unsupported tag pp37 pypy37_pp73  macosx_10_9_x86_64

* add pytest after build

* add pytest folder

* add CIBW archs

* indicate tests folder explicitly

* fix test in CIBW

* skip pypy37 for mac linux and window

* also skip other pypy for mac linux and window

* skip all pypy for mac linux and window

* test cibuildwheel 2.6.1, since 2.7 gives  standard_init_linux.go:228: exec user process caused: exec format error

* try use python -m to see if can workaroudn the aarch64 error

* use different pytest command

* skip linux aarch64

* change version name to 0.3.2rc3

* fix musllinux No lapack/blas resources found

* skip musllinux

* add pypi into release destination

* update version and update release strategy

* update version and readme

Co-authored-by: Zhe Sun <[email protected]>
Co-authored-by: Stephane Collot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants