python-greenlet / greenlet

Lightweight in-process concurrent programming
Other
1.63k stars 247 forks source link

ERROR: Could not build wheels for greenlet, which is required to install pyproject.toml-based projects on Python3.12 #406

Open AriBermeki opened 3 months ago

AriBermeki commented 3 months ago

Using cached setuptools-70.0.0-py3-none-any.whl (863 kB)
Building wheels for collected packages: greenlet
  Building wheel for greenlet (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for greenlet (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [139 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-312
      creating build\lib.win-amd64-cpython-312\greenlet
      copying src\greenlet\__init__.py -> build\lib.win-amd64-cpython-312\greenlet
      creating build\lib.win-amd64-cpython-312\greenlet\tests
      copying src\greenlet\tests\test_contextvars.py -> build\lib.win-amd64-cpython-312\greenlet\tests
      copying src\greenlet\tests\test_cpp.py -> build\lib.win-amd64-cpython-312\greenlet\tests
      copying src\greenlet\tests\test_extension_interface.py -> build\lib.win-amd64-cpython-312\greenlet\tests
      copying src\greenlet\tests\test_gc.py -> build\lib.win-amd64-cpython-312\greenlet\tests
      copying src\greenlet\tests\test_generator.py -> build\lib.win-amd64-cpython-312\greenlet\tests
      copying src\greenlet\tests\test_generator_nested.py -> build\lib.win-amd64-cpython-312\greenlet\tests
      copying src\greenlet\tests\test_greenlet.py -> build\lib.win-amd64-cpython-312\greenlet\tests
      copying src\greenlet\tests\test_leaks.py -> build\lib.win-amd64-cpython-312\greenlet\tests
      copying src\greenlet\tests\test_stack_saved.py -> build\lib.win-amd64-cpython-312\greenlet\tests
      copying src\greenlet\tests\test_throw.py -> build\lib.win-amd64-cpython-312\greenlet\tests
      copying src\greenlet\tests\test_tracing.py -> build\lib.win-amd64-cpython-312\greenlet\tests
      copying src\greenlet\tests\test_version.py -> build\lib.win-amd64-cpython-312\greenlet\tests
      copying src\greenlet\tests\test_weakref.py -> build\lib.win-amd64-cpython-312\greenlet\tests
      copying src\greenlet\tests\__init__.py -> build\lib.win-amd64-cpython-312\greenlet\tests
      running egg_info
      writing src\greenlet.egg-info\PKG-INFO
      writing dependency_links to src\greenlet.egg-info\dependency_links.txt
      writing requirements to src\greenlet.egg-info\requires.txt
      writing top-level names to src\greenlet.egg-info\top_level.txt
      reading manifest file 'src\greenlet.egg-info\SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      no previously-included directories found matching 'docs\_build'
      warning: no files found matching '*.py' under directory 'appveyor'
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.pyd' found anywhere in distribution
      warning: no previously-included files matching '*.so' found anywhere in distribution
      warning: no previously-included files matching '.coverage' found anywhere in distribution
      adding license file 'LICENSE'
      adding license file 'LICENSE.PSF'
      adding license file 'AUTHORS'
      writing manifest file 'src\greenlet.egg-info\SOURCES.txt'
      C:\Users\MalekAli\AppData\Local\Temp\pip-build-env-abte2jy2\overlay\Lib\site-packages\setuptools\command\build_py.py:207: _Warning: Package 'greenlet.platform' is absent from the `packages` configuration.
      !!

              ********************************************************************************
              ############################
              # Package would be ignored #
              ############################
              Python recognizes 'greenlet.platform' as an importable package[^1],
              but it is absent from setuptools' `packages` configuration.

              This leads to an ambiguous overall configuration. If you want to distribute this
              package, please make sure that 'greenlet.platform' is explicitly added
              to the `packages` configuration field.

              Alternatively, you can also rely on setuptools' discovery methods
              (for example by using `find_namespace_packages(...)`/`find_namespace:`
              instead of `find_packages(...)`/`find:`).

              You can read more about "package discovery" on setuptools documentation page:

              - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

              If you don't want 'greenlet.platform' to be distributed and are
              already explicitly excluding 'greenlet.platform' via
              `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
              you can try to use `exclude_package_data`, or `include-package-data=False` in
              combination with a more fine grained `package-data` configuration.

              You can read more about "package data files" on setuptools documentation page:

              - https://setuptools.pypa.io/en/latest/userguide/datafiles.html

              [^1]: For Python, any directory (with suitable naming) can be imported,
                    even if it does not contain any `.py` files.
                    On the other hand, currently there is no concept of package data
                    directory, all directories are treated like packages.
              ********************************************************************************

      !!
        check.warn(importable)
      copying src\greenlet\greenlet.c -> build\lib.win-amd64-cpython-312\greenlet
      copying src\greenlet\greenlet.h -> build\lib.win-amd64-cpython-312\greenlet
      copying src\greenlet\slp_platformselect.h -> build\lib.win-amd64-cpython-312\greenlet
      creating build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\setup_switch_x64_masm.cmd -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_aarch64_gcc.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_alpha_unix.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_amd64_unix.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_arm32_gcc.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_arm32_ios.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_csky_gcc.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_m68k_gcc.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_mips_unix.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_ppc64_aix.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_ppc64_linux.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_ppc_aix.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_ppc_linux.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_ppc_macosx.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_ppc_unix.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_riscv_unix.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_s390_unix.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_sparc_sun_gcc.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_x32_unix.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_x64_masm.asm -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_x64_masm.obj -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_x64_msvc.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_x86_msvc.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\platform\switch_x86_unix.h -> build\lib.win-amd64-cpython-312\greenlet\platform
      copying src\greenlet\tests\_test_extension.c -> build\lib.win-amd64-cpython-312\greenlet\tests
      copying src\greenlet\tests\_test_extension_cpp.cpp -> build\lib.win-amd64-cpython-312\greenlet\tests
      running build_ext
      building 'greenlet._greenlet' extension
      creating build\temp.win-amd64-cpython-312
      creating build\temp.win-amd64-cpython-312\Release
      creating build\temp.win-amd64-cpython-312\Release\src
      creating build\temp.win-amd64-cpython-312\Release\src\greenlet
      "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\MalekAli\Desktop\sic_motor\menv\include -IC:\Users\MalekAli\AppData\Local\Programs\Python\Python312\include -IC:\Users\MalekAli\AppData\Local\Programs\Python\Python312\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /Tcsrc/greenlet/greenlet.c /Fobuild\temp.win-amd64-cpython-312\Release\src/greenlet/greenlet.obj
      greenlet.c
      src/greenlet/greenlet.c(531): error C2039: 'recursion_limit': is not a member of '_ts'
      C:\Users\MalekAli\AppData\Local\Programs\Python\Python312\include\cpython/pystate.h(115): note: see declaration of '_ts'
      src/greenlet/greenlet.c(532): error C2039: 'recursion_remaining': is not a member of '_ts'
      C:\Users\MalekAli\AppData\Local\Programs\Python\Python312\include\cpython/pystate.h(115): note: see declaration of '_ts'
      src/greenlet/greenlet.c(560): error C2039: 'use_tracing': is not a member of '_PyCFrame'
      C:\Users\MalekAli\AppData\Local\Programs\Python\Python312\include\cpython/pystate.h(67): note: see declaration of '_PyCFrame'
      src/greenlet/greenlet.c(621): error C2039: 'use_tracing': is not a member of '_PyCFrame'
      C:\Users\MalekAli\AppData\Local\Programs\Python\Python312\include\cpython/pystate.h(67): note: see declaration of '_PyCFrame'
      src/greenlet/greenlet.c(624): error C2039: 'recursion_remaining': is not a member of '_ts'
      C:\Users\MalekAli\AppData\Local\Programs\Python\Python312\include\cpython/pystate.h(115): note: see declaration of '_ts'
      src/greenlet/greenlet.c(624): error C2039: 'recursion_limit': is not a member of '_ts'
      C:\Users\MalekAli\AppData\Local\Programs\Python\Python312\include\cpython/pystate.h(115): note: see declaration of '_ts'
      src/greenlet/greenlet.c(654): error C2039: 'use_tracing': is not a member of '_PyCFrame'
      C:\Users\MalekAli\AppData\Local\Programs\Python\Python312\include\cpython/pystate.h(67): note: see declaration of '_PyCFrame'
      src/greenlet/greenlet.c(657): error C2039: 'use_tracing': is not a member of '_PyCFrame'
      C:\Users\MalekAli\AppData\Local\Programs\Python\Python312\include\cpython/pystate.h(67): note: see declaration of '_PyCFrame'
      src/greenlet/greenlet.c(903): error C2039: 'recursion_limit': is not a member of '_ts'
      C:\Users\MalekAli\AppData\Local\Programs\Python\Python312\include\cpython/pystate.h(115): note: see declaration of '_ts'
      src/greenlet/greenlet.c(904): error C2039: 'recursion_remaining': is not a member of '_ts'
      C:\Users\MalekAli\AppData\Local\Programs\Python\Python312\include\cpython/pystate.h(115): note: see declaration of '_ts'
      error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for greenlet
Failed to build greenlet
ERROR: Could not build wheels for greenlet, which is required to install pyproject.toml-based projects
wchistow commented 3 months ago

Same issue on 3.13...