Reputation: 1
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
╰─> [223 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\HP\AppData\Local\Temp\pip-build-env-gco34u6v\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 (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\HP\Documents\SMSystem\sms\.venv\include -IC:\Users\HP\AppData\Local\Programs\Python\Python312\include -IC:\Users\HP\AppData\Local\Programs\Python\Python312\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcsrc/greenlet/greenlet.c /Fobuild\temp.win-amd64-cpython-312\Release\src/greenlet/greenlet.obj
greenlet.c
C:\Users\HP\AppData\Local\Temp\pip-install-nbd7fs1c\greenlet_7ebf27cf08c94b668f8d37925da8b907\src\greenlet\greenlet.h(42): error C2061: syntax error: identifier 'CFrame'
C:\Users\HP\AppData\Local\Temp\pip-install-nbd7fs1c\greenlet_7ebf27cf08c94b668f8d37925da8b907\src\greenlet\greenlet.h(44): error C2059: syntax error: '}'
src/greenlet/greenlet.c(130): error C2143: syntax error: missing '{' before '*'
src/greenlet/greenlet.c(132): error C2143: syntax error: missing '{' before '*'
src/greenlet/greenlet.c(134): error C2143: syntax error: missing '{' before '*'
src/greenlet/greenlet.c(164): error C2143: syntax error: missing ')' before '*'
src/greenlet/greenlet.c(164): error C2143: syntax error: missing '{' before '*'
src/greenlet/greenlet.c(164): error C2059: syntax error: ')'
src/greenlet/greenlet.c(165): error C2054: expected '(' to follow 'g'
src/greenlet/greenlet.c(179): error C2143: syntax error: missing '{' before '*'
src/greenlet/greenlet.c(182): error C2065: 'PyGreenlet': undeclared identifier
src/greenlet/greenlet.c(182): error C2065: 'gmain': undeclared identifier
src/greenlet/greenlet.c(182): warning C4552: '*': result of expression not used
src/greenlet/greenlet.c(192): error C2065: 'gmain': undeclared identifier
src/greenlet/greenlet.c(192): error C2065: 'PyGreenlet': undeclared identifier
src/greenlet/greenlet.c(192): error C2059: syntax error: ')'
src/greenlet/greenlet.c(193): error C2065: 'gmain': undeclared identifier
src/greenlet/greenlet.c(193): warning C4047: '==': 'int' differs in levels of indirection from 'void *'
src/greenlet/greenlet.c(196): error C2065: 'gmain': undeclared identifier
src/greenlet/greenlet.c(196): error C2223: left of '->stack_start' must point to struct/union
src/greenlet/greenlet.c(197): error C2065: 'gmain': undeclared identifier
src/greenlet/greenlet.c(197): error C2223: left of '->stack_stop' must point to struct/union
src/greenlet/greenlet.c(198): error C2065: 'gmain': undeclared identifier
src/greenlet/greenlet.c(198): error C2223: left of '->run_info' must point to struct/union
src/greenlet/greenlet.c(200): error C2065: 'gmain': undeclared identifier
src/greenlet/greenlet.c(200): warning C4047: 'return': 'int *' differs in levels of indirection from 'int'
src/greenlet/greenlet.c(208): error C2065: 'PyGreenlet': undeclared identifier
src/greenlet/greenlet.c(208): error C2065: 'current': undeclared identifier
src/greenlet/greenlet.c(208): warning C4552: '*': result of expression not used
src/greenlet/greenlet.c(209): error C2065: 'PyGreenlet': undeclared identifier
src/greenlet/greenlet.c(209): error C2065: 'previous': undeclared identifier
src/greenlet/greenlet.c(209): warning C4552: '*': result of expression not used
src/greenlet/greenlet.c(219): error C2065: 'current': undeclared identifier
src/greenlet/greenlet.c(219): error C2065: 'PyGreenlet': undeclared identifier
src/greenlet/greenlet.c(219): error C2059: syntax error: ')'
src/greenlet/greenlet.c(224): error C2059: syntax error: 'else'
src/greenlet/greenlet.c(234): error C2059: syntax error: '<parameter-list>'
src/greenlet/greenlet.c(236): error C2143: syntax error: missing '{' before ':'
src/greenlet/greenlet.c(236): error C2059: syntax error: ':'
src/greenlet/greenlet.c(239): error C2099: initializer is not a constant
src/greenlet/greenlet.c(240): error C2373: 'ts_current': redefinition; different type modifiers
src/greenlet/greenlet.c(134): note: see declaration of 'ts_current'
src/greenlet/greenlet.c(240): error C2065: 'current': undeclared identifier
src/greenlet/greenlet.c(243): error C2059: syntax error: 'if'
src/greenlet/greenlet.c(251): error C2143: syntax error: missing ')' before '('
src/greenlet/greenlet.c(251): error C2091: function returns function
src/greenlet/greenlet.c(251): error C2059: syntax error: ')'
src/greenlet/greenlet.c(251): error C2143: syntax error: missing ')' before ';'
src/greenlet/greenlet.c(251): error C2373: 'Py_DECREF': redefinition; different type modifiers
C:\Users\HP\AppData\Local\Programs\Python\Python312\include\object.h(697): note: see declaration of 'Py_DECREF'
src/greenlet/greenlet.c(255): error C2065: 'tstate': undeclared identifier
src/greenlet/greenlet.c(255): error C2223: left of '->dict' must point to struct/union
src/greenlet/greenlet.c(255): error C2198: 'PyDict_GetItem': too few arguments for call
src/greenlet/greenlet.c(255): error C2099: initializer is not a constant
src/greenlet/greenlet.c(256): error C2059: syntax error: 'if'
src/greenlet/greenlet.c(260): error C2059: syntax error: 'if'
src/greenlet/greenlet.c(269): error C2143: syntax error: missing ')' before '('
src/greenlet/greenlet.c(269): error C2091: function returns function
src/greenlet/greenlet.c(269): error C2059: syntax error: ')'
src/greenlet/greenlet.c(269): error C2143: syntax error: missing ')' before ';'
src/greenlet/greenlet.c(269): error C2373: 'Py_DECREF': redefinition; different type modifiers
C:\Users\HP\AppData\Local\Programs\Python\Python312\include\object.h(697): note: see declaration of 'Py_DECREF'
src/greenlet/greenlet.c(272): error C2371: 'PyErr_Restore': redefinition; different basic types
C:\Users\HP\AppData\Local\Programs\Python\Python312\include\pyerrors.h(20): note: see declaration of 'PyErr_Restore'
src/greenlet/greenlet.c(276): error C2059: syntax error: 'if'
src/greenlet/greenlet.c(280): error C2059: syntax error: 'return'
src/greenlet/greenlet.c(281): error C2059: syntax error: '}'
src/greenlet/greenlet.c(379): error C2065: 'PyGreenlet': undeclared identifier
src/greenlet/greenlet.c(379): error C2059: syntax error: ')'
src/greenlet/greenlet.c(379): error C2223: left of '->stack_start' must point to struct/union
src/greenlet/greenlet.c(397): error C2143: syntax error: missing ')' before '*'
src/greenlet/greenlet.c(397): error C2143: syntax error: missing '{' before '*'
src/greenlet/greenlet.c(397): error C2059: syntax error: 'type'
src/greenlet/greenlet.c(397): error C2059: syntax error: ')'
src/greenlet/greenlet.c(429): error C2065: 'PyGreenlet': undeclared identifier
src/greenlet/greenlet.c(429): error C2297: '*': not valid as right operand has type 'int *'
src/greenlet/greenlet.c(430): error C2065: 'PyGreenlet': undeclared identifier
src/greenlet/greenlet.c(430): error C2065: 'owner': undeclared identifier
src/greenlet/greenlet.c(430): warning C4047: '=': 'int' differs in levels of indirection from 'int *volatile '
src/greenlet/greenlet.c(430): error C2106: '=': left operand must be l-value
src/greenlet/greenlet.c(437): error C2223: left of '->stack_saved' must point to struct/union
src/greenlet/greenlet.c(438): error C2223: left of '->stack_start' must point to struct/union
src/greenlet/greenlet.c(438): error C2223: left of '->stack_copy' must point to struct/union
src/greenlet/greenlet.c(438): error C2223: left of '->stack_saved' must point to struct/union
src/greenlet/greenlet.c(438): error C2168: 'memcpy': too few actual parameters for intrinsic function
src/greenlet/greenlet.c(439): error C2223: left of '->stack_copy' must point to struct/union
src/greenlet/greenlet.c(439): error C2198: 'PyMem_Free': too few arguments for call
src/greenlet/greenlet.c(440): error C2223: left of '->stack_copy' must point to struct/union
src/greenlet/greenlet.c(441): error C2223: left of '->stack_saved' must point to struct/union
src/greenlet/greenlet.c(443): error C2065: 'owner': undeclared identifier
src/greenlet/greenlet.c(443): error C2223: left of '->stack_start' must point to struct/union
src/greenlet/greenlet.c(444): error C2065: 'owner': undeclared identifier
src/greenlet/greenlet.c(444): error C2065: 'owner': undeclared identifier
src/greenlet/greenlet.c(444): error C2223: left of '->stack_prev' must point to struct/union
src/greenlet/greenlet.c(446): error C2065: 'owner': undeclared identifier
src/greenlet/greenlet.c(446): error C2065: 'owner': undeclared identifier
src/greenlet/greenlet.c(446): error C2223: left of '->stack_stop' must point to struct/union
src/greenlet/greenlet.c(446): error C2223: left of '->stack_stop' must point to struct/union
src/greenlet/greenlet.c(447): error C2065: 'owner': undeclared identifier
src/greenlet/greenlet.c(447): error C2065: 'owner': undeclared identifier
src/greenlet/greenlet.c(447): error C2223: left of '->stack_prev' must point to struct/union
src/greenlet/greenlet.c(449): error C2223: left of '->stack_prev' must point to struct/union
src/greenlet/greenlet.c(449): error C2065: 'owner': undeclared identifier
src/greenlet/greenlet.c(449): fatal error C1003: error count exceeds 100; stopping compilation
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\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 (.venv)
Not sure why I keep getting the error.
Upvotes: 0
Views: 286
Reputation: 686
Build errors like this are confusing and are often dependent on your specific configuration. Here we can see that you're on Windows and using a binary called amd64-cpython-312
- note that greenlet is not some simple library, it rewrites the threading logic; upon import this library goes into the Python internals and changes (monkey patches) the threading, SSL and socket libraries.
This makes greenlet unusually strict in terms of compatibility with Python. This is our first clue when debugging a build issue. The second clue is the first error you see:
greenlet\greenlet.h(42): error C2061: syntax error: identifier 'CFrame'
When I google that error, numerous results describe strict version matching between Python and greenlet releases. Check out this example answer: https://stackoverflow.com/a/73073740/4540711
All searches suggest that a version mismatch is at stake, yet greenlet 3.0.3 clearly calls out Python 3.12 as compatible: https://github.com/python-greenlet/greenlet/blob/3.0.3/setup.py#L243
So I don't have an easy answer for you. Some things to try:
Upvotes: 0