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

Trying to build a wheel of YARL with the command python -m build --wheel issued at the root returns an error from _backend.py #1001

Closed
1 task done
Michael-B-G opened this issue Mar 5, 2024 · 22 comments

Comments

@Michael-B-G
Copy link

Michael-B-G commented Mar 5, 2024

Describe the bug

Using Python 3.9.18

So, if I navigate to the root of the yarl directory and issue the command python -m build --wheel, I get the following:

python -m build --wheel

Creating virtualenv isolated environment...
Installing packages in isolated environment... (expandvars, setuptools >= 47, tomli; python_version < '3.11')
Getting build dependencies for wheel...
running egg_info
writing yarl.egg-info/PKG-INFO
writing dependency_links to yarl.egg-info/dependency_links.txt
writing requirements to yarl.egg-info/requires.txt
writing top-level names to yarl.egg-info/top_level.txt
reading manifest file 'yarl.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '.cache' found anywhere in distribution
warning: no previously-included files found matching 'yarl/.c'
warning: no previously-included files found matching 'yarl/.html'
warning: no previously-included files found matching 'yarl/.so'
warning: no previously-included files found matching 'yarl/*.pyd'
no previously-included directories found matching 'docs/_build'
adding license file 'LICENSE'
adding license file 'NOTICE'
writing manifest file 'yarl.egg-info/SOURCES.txt'
Installing packages in isolated environment... (Cython, wheel)
Building wheel...
Accelerated build *
**Traceback (most recent call last):
File "/{venv_home}/env/lib64/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/{venv_home}/env/lib64/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/{venv_home}/env/lib64/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/usr/lib64/python3.9/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/tmp/py_dependencies/yarl-1.9.4/packaging/pep517_backend/_backend.py", line 287, in build_wheel
with maybe_prebuild_c_extensions(
File "/usr/lib64/python3.9/contextlib.py", line 119, in enter
return next(self.gen)
File "/tmp/py_dependencies/yarl-1.9.4/packaging/pep517_backend/_backend.py", line 266, in maybe_prebuild_c_extensions
_cythonize_cli_cmd(cythonize_args)
NameError: name '_cythonize_cli_cmd' is not defined

ERROR Backend subprocess exited when trying to invoke build_wheel**

The same thing happens if I try with building a wheel using frozenlist-1.4.1

To Reproduce

See above

Expected behavior

The wheel is built successfully.

Logs/tracebacks

Traceback (most recent call last):
File "/{venv_home}/env/lib64/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/{venv_home}/env/lib64/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/{venv_home}/env/lib64/python3.9/site-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/usr/lib64/python3.9/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/tmp/py_dependencies/yarl-1.9.4/packaging/pep517_backend/_backend.py", line 287, in build_wheel
with maybe_prebuild_c_extensions(
File "/usr/lib64/python3.9/contextlib.py", line 119, in enter
return next(self.gen)
File "/tmp/py_dependencies/yarl-1.9.4/packaging/pep517_backend/_backend.py", line 266, in maybe_prebuild_c_extensions
_cythonize_cli_cmd(cythonize_args)
NameError: name '_cythonize_cli_cmd' is not defined

ERROR Backend subprocess exited when trying to invoke build_wheel

Python Version

Python 3.9.18

multidict Version

Name: multidict
Version: 6.0.5
Summary: multidict implementation
Home-page: https://github.com/aio-libs/multidict
Author: Andrew Svetlov
Author-email: andrew.svetlov@gmail.com
License: Apache 2
Location: /{venv_home}/env/lib/python3.9/site-packages
Requires:
Required-by:

yarl Version

Name: yarl
Version: 1.9.4
Summary: Yet another URL library
Home-page: https://github.com/aio-libs/yarl
Author: Andrew Svetlov
Author-email: andrew.svetlov@gmail.com
License: Apache-2.0
Location: /{venv_home}/env/lib/python3.9/site-packages
Requires: idna, multidict
Required-by:

OS

NAME="Red Hat Enterprise Linux"
VERSION="9.3 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.3"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.3 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.3
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.3"

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct
@Michael-B-G Michael-B-G added the bug label Mar 5, 2024
@webknjaz
Copy link
Member

webknjaz commented Mar 6, 2024

Hi, would this be reproducible under the UBI container? The traceback indicates a problem with Cython.
FWIW we have wheels published to the PyPI so it worked at the time of release. Perhaps, there's a new Cython version that got published after..

The problem with frozenlist would support this theory. You could pin the version of Cython by setting the PIP_CONSTRAINT env var for the build invocation and specifying some older version of Cython in that constraint file.

@webknjaz
Copy link
Member

webknjaz commented Mar 6, 2024

@hroncok have you seen any problems with this on Fedora recently? (short of that tmp dir recursion that's still unfixed)

@webknjaz webknjaz changed the title Trying to build a wheel of YARL with the command "python -m build --wheel" issued at the root returns an error from _backend.py Trying to build a wheel of YARL with the command python -m build --wheel issued at the root returns an error from _backend.py Mar 6, 2024
@hroncok
Copy link
Contributor

hroncok commented Mar 6, 2024

For the record, I don't see anything about yarl in Fedora at all. I only know about this package via #992 via befeleme/pyp2spec#44

@hroncok
Copy link
Contributor

hroncok commented Mar 6, 2024

I suspect this fails silently:

with suppress(ImportError):
# NOTE: Only available for wheel builds that bundle C-extensions. Declared
# NOTE: by `get_requires_for_build_wheel()` and
# NOTE: `get_requires_for_build_editable()`, when `pure-python`
# NOTE: is not passed.
from Cython.Build.Cythonize import main as _cythonize_cli_cmd
and then here
_cythonize_cli_cmd(cythonize_args)
it isn't defined.

@hroncok
Copy link
Contributor

hroncok commented Mar 6, 2024

Cython is not listed in

yarl/pyproject.toml

Lines 1 to 9 in bd5ff24

[build-system]
requires = [
# NOTE: The following build dependencies are necessary for initial
# NOTE: provisioning of the in-tree build backend located under
# NOTE: `packaging/pep517_backend/`.
"expandvars",
"setuptools >= 47", # Minimum required for `version = attr:`
"tomli; python_version < '3.11'",
]

@hroncok
Copy link
Contributor

hroncok commented Mar 6, 2024

But the log says:

Installing packages in isolated environment... (Cython, wheel)

It would be helpful to see what Cython version was installed.

@webknjaz
Copy link
Member

webknjaz commented Mar 6, 2024

Yeah, that's injected by the backend through the hook for wheels. The underlying pip invocation likely selects the latest Cython version 3.0.9 released yesterday. The previous release was in Jan. This would explain the timing.

I only tagged you, Miro, since Fedora is close enough to RHEL so it might've shown up in your packaging automation by now. I'm sure it'll break in your RPMs soon.

It seems to me Cython must've renamed imports (which aren't exactly public API, TBF). The import errors are suppressed and so this only fails on accessing the importables. Which is definitely a bug I need to address, probably asking Cython for a more stable API going forward.

@hroncok
Copy link
Contributor

hroncok commented Mar 6, 2024

That was my first guess as well, but from Cython.Build.Cythonize import main as _cythonize_cli_cmd works with cython 3.0.9.

@hroncok
Copy link
Contributor

hroncok commented Mar 6, 2024

@MichaelGoldsbie where did you get build from / how do you install it?

@hroncok
Copy link
Contributor

hroncok commented Mar 6, 2024

I cannot reproduce this:

$ cat /etc/os-release 
NAME="Red Hat Enterprise Linux"
VERSION="9.3 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.3"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.3 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.3
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.3"

$ python3.9 -m venv venv
$ . venv/bin/activate
(venv) $ pip install build
...

(venv) $ pip list
Package            Version
------------------ -------
build              1.1.1
importlib-metadata 7.0.1
packaging          23.2
pip                21.2.3
pyproject_hooks    1.0.0
setuptools         53.0.0
tomli              2.0.1
zipp               3.17.0

(venv) $ python --version
Python 3.9.18

(venv) $ python -m build --wheel
* Creating venv isolated environment...
* Installing packages in isolated environment... (expandvars, setuptools >= 47, tomli; python_version < '3.11')
* Getting build dependencies for wheel...
running egg_info
writing yarl.egg-info/PKG-INFO
writing dependency_links to yarl.egg-info/dependency_links.txt
writing requirements to yarl.egg-info/requires.txt
writing top-level names to yarl.egg-info/top_level.txt
reading manifest file 'yarl.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.cache' found anywhere in distribution
warning: no previously-included files found matching 'yarl/*.c'
warning: no previously-included files found matching 'yarl/*.html'
warning: no previously-included files found matching 'yarl/*.so'
warning: no previously-included files found matching 'yarl/*.pyd'
no previously-included directories found matching 'docs/_build'
adding license file 'LICENSE'
adding license file 'NOTICE'
writing manifest file 'yarl.egg-info/SOURCES.txt'
* Installing packages in isolated environment... (Cython, wheel)
* Building wheel...
**********************
* Accelerated build *
**********************
[1/1] Cythonizing /tmp/.tmp-yarl-pep517-87q4kt4h/src/yarl/_quoting_c.pyx
running bdist_wheel
running build
running build_py
copying yarl/__init__.py -> build/lib.linux-x86_64-cpython-39/yarl
copying yarl/_quoting.py -> build/lib.linux-x86_64-cpython-39/yarl
copying yarl/_quoting_py.py -> build/lib.linux-x86_64-cpython-39/yarl
copying yarl/_url.py -> build/lib.linux-x86_64-cpython-39/yarl
running egg_info
writing yarl.egg-info/PKG-INFO
writing dependency_links to yarl.egg-info/dependency_links.txt
writing requirements to yarl.egg-info/requires.txt
writing top-level names to yarl.egg-info/top_level.txt
reading manifest file 'yarl.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.cache' found anywhere in distribution
warning: no previously-included files found matching 'yarl/*.html'
warning: no previously-included files found matching 'yarl/*.pyd'
no previously-included directories found matching 'docs/_build'
adding license file 'LICENSE'
adding license file 'NOTICE'
writing manifest file 'yarl.egg-info/SOURCES.txt'
copying yarl/__init__.pyi -> build/lib.linux-x86_64-cpython-39/yarl
copying yarl/_quoting_c.pyi -> build/lib.linux-x86_64-cpython-39/yarl
copying yarl/_quoting_c.pyx -> build/lib.linux-x86_64-cpython-39/yarl
copying yarl/py.typed -> build/lib.linux-x86_64-cpython-39/yarl
running build_ext
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/yarl
copying build/lib.linux-x86_64-cpython-39/yarl/_quoting_c.cpython-39-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/wheel/yarl
copying build/lib.linux-x86_64-cpython-39/yarl/__init__.py -> build/bdist.linux-x86_64/wheel/yarl
copying build/lib.linux-x86_64-cpython-39/yarl/_quoting.py -> build/bdist.linux-x86_64/wheel/yarl
copying build/lib.linux-x86_64-cpython-39/yarl/_quoting_py.py -> build/bdist.linux-x86_64/wheel/yarl
copying build/lib.linux-x86_64-cpython-39/yarl/_url.py -> build/bdist.linux-x86_64/wheel/yarl
copying build/lib.linux-x86_64-cpython-39/yarl/__init__.pyi -> build/bdist.linux-x86_64/wheel/yarl
copying build/lib.linux-x86_64-cpython-39/yarl/_quoting_c.pyi -> build/bdist.linux-x86_64/wheel/yarl
copying build/lib.linux-x86_64-cpython-39/yarl/_quoting_c.pyx -> build/bdist.linux-x86_64/wheel/yarl
copying build/lib.linux-x86_64-cpython-39/yarl/py.typed -> build/bdist.linux-x86_64/wheel/yarl
running install_egg_info
Copying yarl.egg-info to build/bdist.linux-x86_64/wheel/yarl-1.9.5.dev0-py3.9.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/yarl-1.9.5.dev0.dist-info/WHEEL
creating '/builddir/build/yarl/dist/.tmp-qrftwa2v/yarl-1.9.5.dev0-cp39-cp39-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'yarl/__init__.py'
adding 'yarl/__init__.pyi'
adding 'yarl/_quoting.py'
adding 'yarl/_quoting_c.cpython-39-x86_64-linux-gnu.so'
adding 'yarl/_quoting_c.pyi'
adding 'yarl/_quoting_c.pyx'
adding 'yarl/_quoting_py.py'
adding 'yarl/_url.py'
adding 'yarl/py.typed'
adding 'yarl-1.9.5.dev0.dist-info/LICENSE'
adding 'yarl-1.9.5.dev0.dist-info/METADATA'
adding 'yarl-1.9.5.dev0.dist-info/NOTICE'
adding 'yarl-1.9.5.dev0.dist-info/WHEEL'
adding 'yarl-1.9.5.dev0.dist-info/top_level.txt'
adding 'yarl-1.9.5.dev0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built yarl-1.9.5.dev0-cp39-cp39-linux_x86_64.whl

@Michael-B-G
Copy link
Author

Michael-B-G commented Mar 6, 2024

@Michael-B-G where did you get build from / how do you install it?

I got the build from PyPi: https://pypi.org/project/yarl/. I tried getting the wheel by--in a Python virtual environment--navigating to the root of the yarl directory and issuing the command python -m build --wheel. And yes, I can see the version of Cython here is 3.0.9. (Previously I was getting the packages from cloning the GitHub directory but for aiohttp I noticed that some necessary c-extension files were missing in https://github.com/aio-libs/aiohttp/tree/master/aiohttp, whereas they existed on PyPi).

Oh, and I forgot to mention one other thing--I'm this exact same problem for the frozenlist package as well.

@webknjaz
Copy link
Member

webknjaz commented Mar 6, 2024

Thanks for checking, Miro!

I got the build from PyPi: https://pypi.org/project/yarl/. I tried getting the wheel by--in a Python virtual environment--navigating to the root of the yarl directory and issuing the command python -m build --wheel. And yes, I can see the version of Cython here is 3.0.9. (Previously I was getting the packages from cloning the GitHub directory but for aiohttp I noticed that some necessary c-extension files were missing in https://github.com/aio-libs/aiohttp/tree/master/aiohttp, whereas they existed on PyPi).

FWIW the wheels still get built just fine under Python 3.9 in our CI. Here's one of fresh jobs from earlier today: https://github.com/aio-libs/yarl/actions/runs/8171206597/job/22338955861?pr=1002#step:6:7830. Of course, it's not RHEL but I don't see why it'd be different, honestly.

The aiohttp project is still packaged differently, and you can only compile C-extensions if you run extra commands like cythonizing files after cloning from Git. Check out the CI setup to learn exactly what's called there.

Oh, and I forgot to mention one other thing--I'm this exact same problem for the frozenlist package as well.

You did mention it. But as things stand, the information provided is not enough to declare it broken as there's no reproducer that works outside of your machine. You didn't demonstrate any proof of the Cython version that gets installed in the ephemeral build env, by the way. It's not the same as your venv.

@hroncok
Copy link
Contributor

hroncok commented Mar 6, 2024

I got the build from PyPi: https://pypi.org/project/yarl/.

I mean, where did you get the python -m build command from, how did you install the build package, not how you build yarl. (It's hard to use build as the project name in a sentence.)

@Michael-B-G
Copy link
Author

python -m pip install build

Requirement already satisfied: build in /{venv_home}/env/lib/python3.9/site-packages (1.1.1)
Requirement already satisfied: packaging>=19.0 in /{venv_home}/env/lib/python3.9/site-packages (from build) (23.2)
Requirement already satisfied: pyproject_hooks in /{venv_home}/env/lib/python3.9/site-packages (from build) (1.0.0)
Requirement already satisfied: importlib-metadata>=4.6 in /{venv_home}/env/lib/python3.9/site-packages (from build) (7.0.1)
Requirement already satisfied: tomli>=1.1.0 in /{venv_home}/env/lib/python3.9/site-packages (from build) (2.0.1)
Requirement already satisfied: zipp>=0.5 in /{venv_home}/env/lib/python3.9/site-packages (from importlib-metadata>=4.6->build) (3.17.0)

@Michael-B-G
Copy link
Author

You didn't demonstrate any proof of the Cython version that gets installed in the ephemeral build env, by the way. It's not the same as your venv.

Sorry, what do you mean by "ephemeral build env"? What more information can I provide to help with this?

@webknjaz
Copy link
Member

webknjaz commented Mar 6, 2024

@Michael-B-G PEP 517 builds have the frontend create a temporary virtualenv, populate it with build deps, invoke building and then delete. It's not persisted anywhere, and so it's usually referred to as ephemeral — it only exists during the invocation of pypa/build or pip, or another frontend. build allows skipping the env management in which case it's the caller's responsibility to populate it. The behavior you describe would happen if you were to pass --no-isolation which you claim not to. That's why Miro was asking where you got it — having a patched version would explain it. Though, your output isn't consistent with such a case because it shows installing build deps.

I honestly don't know how to help you since you're the only person on the internet having this behavior so it must be something broken in your env.

You could try putting a copy of that seemingly broken import right before the line with NameError. To see if it errors out exactly as we think. You could also print out sys.path there to see if it contains anything weird. You could check if you modify $PYTHONPATH in your terminal/shell in strange ways.
By the way, doing python -Im build (with that -I!) would eliminate the possibility of external import path influence.

Increasing verbosity of all your commands could shed the light on unexpected things like hitting a custom package index instead of the PyPI. Do you have a pip config on disk, by the way?

Another thing you could do is making and sharing an asciinema recording in hopes somebody would be able to spot something in your process.

Besides that, you may try making a container that shows your problem. Without any usable way to reproduce it, I can only conclude this with "works on my machine" 🤷‍♂️

@webknjaz
Copy link
Member

webknjaz commented Mar 6, 2024

Additionally, may I ask for your motivation in building wheels by yourself? Most people shouldn't need it and the downstream distro users are usually expected to use what their ecosystem's curated software repositories provide.

@Michael-B-G
Copy link
Author

Michael-B-G commented Mar 6, 2024

Thank you for your help. I tried with the -"I" flag as well but got the same results.

I inserted a print(sys.path) statement just before the error occurs and got:

['/{venv_home}/yarl-1.9.4/packaging', '/{venv_home}/env/lib/python3.9/site-packages/pyproject_hooks/_in_process', '/usr/lib64/python39.zip', '/usr/lib64/python3.9', '/usr/lib64/python3.9/lib-dynload', '/tmp/build-env-qp95b833/lib64/python3.9/site-packages', '/tmp/build-env-qp95b833/lib/python3.9/site-packages']

I don't have a pip config on my disk. For verbosity, I would require this, right? https://verboselogs.readthedocs.io/en/latest/readme.html#:~:text=The%20verboselogs%20package%20extends%20Python's,predefined%20DEBUG%20and%20NOTSET%20levels.

However, I am unable to install the logging package due to some syntax error, and I'm not sure if I feel like trying to troubleshoot this due to being a distraction from the main problem, but here's what it says:

`python -m pip install logging
Defaulting to user installation because normal site-packages is not writeable
Collecting logging
  Using cached logging-0.4.9.6.tar.gz (96 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: logging
  Building wheel for logging (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [39 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-5vcyzufz/logging_51f6723257c142a5bb6d2176b6794fc5                                                                                                             /setup.py", line 3, in <module>
          setup(name = "logging",
        File "/usr/lib64/python3.9/distutils/core.py", line 134, in setup
          ok = dist.parse_command_line()
        File "/usr/lib64/python3.9/distutils/dist.py", line 483, in parse_comman                                                                                                             d_line
          args = self._parse_command_opts(parser, args)
        File "/usr/lib/python3.9/site-packages/setuptools/dist.py", line 951, in                                                                                                              _parse_command_opts
          nargs = _Distribution._parse_command_opts(self, parser, args)
        File "/usr/lib64/python3.9/distutils/dist.py", line 539, in _parse_comma                                                                                                             nd_opts
          cmd_class = self.get_command_class(command)
        File "/usr/lib/python3.9/site-packages/setuptools/dist.py", line 790, in                                                                                                              get_command_class
          self.cmdclass[command] = cmdclass = ep.load()
        File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line                                                                                                              2450, in load
          return self.resolve()
        File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line                                                                                                              2456, in resolve
          module = __import__(self.module_name, fromlist=['__name__'], level=0)
        File "/{venv_home}/.local/lib/python3.9/site-packages/wheel/bdist_                                                                                                             wheel.py", line 28, in <module>
          from .metadata import pkginfo_to_metadata
        File "/{venv_home}/.local/lib/python3.9/site-packages/wheel/metada                                                                                                             ta.py", line 15, in <module>
          from .vendored.packaging.requirements import Requirement
        File "/{venv_home}/.local/lib/python3.9/site-packages/wheel/vendor                                                                                                             ed/packaging/requirements.py", line 7, in <module>
          from ._parser import parse_requirement as _parse_requirement
        File "/{venv_home}/.local/lib/python3.9/site-packages/wheel/vendor                                                                                                             ed/packaging/_parser.py", line 10, in <module>
          from ._tokenizer import DEFAULT_RULES, Tokenizer
        File "/{venv_home}/.local/lib/python3.9/site-packages/wheel/vendor                                                                                                             ed/packaging/_tokenizer.py", line 6, in <module>
          from .specifiers import Specifier
        File "/{venv_home}/.local/lib/python3.9/site-packages/wheel/vendor                                                                                                             ed/packaging/specifiers.py", line 26, in <module>
          from .utils import canonicalize_version
        File "/{venv_home}/.local/lib/python3.9/site-packages/wheel/vendor                                                                                                             ed/packaging/utils.py", line 8, in <module>
          from .tags import Tag, parse_tag
        File "/{venv_home}/.local/lib/python3.9/site-packages/wheel/vendor                                                                                                             ed/packaging/tags.py", line 5, in <module>
          import logging
        File "/tmp/pip-install-5vcyzufz/logging_51f6723257c142a5bb6d2176b6794fc5                                                                                                             /logging/__init__.py", line 618
          raise NotImplementedError, 'emit must be implemented '\
                                   ^
      SyntaxError: invalid syntax
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem wit                                                                                                             h pip.
  ERROR: Failed building wheel for logging
  Running setup.py clean for logging
Failed to build logging
ERROR: Could not build wheels for logging, which is required to install pyprojec                                                                                                             t.toml-based projects

I'm hesitant to make a recording because I want to anonymize as much about the server (like its name) as I can, though I might consider it.

@webknjaz
Copy link
Member

However, I am unable to install the logging package due to some syntax error

You shouldn't need to install anything third party. There's logging in stdlib. However, that's not what I was asking. I was merely suggesting you'd add more CLI flags to the commands you're running, like -v or -vvvvv.

By the way, compare python -Im build --wheel -vvvvv vs. python -Im pip wheel --no-deps -vvvvv . — these two frontends have slight differences.

Oh, and have you tried adding from Cython.Build.Cythonize import main as _cythonize_cli_cmd in the place where you printed sys.path earlier?

@webknjaz
Copy link
Member

I'm hesitant to make a recording because I want to anonymize as much about the server (like its name) as I can, though I might consider it.

I was kinda expecting you'd be testing this on your machine or in a container/VM, not it production..

@Michael-B-G
Copy link
Author

Michael-B-G commented May 30, 2024

I wasn't testing in production--it was a shared dev server, yet its FQDN and other aspects of its directory path contained references to the company name.

Regardless, I have no more need for this thread three months later. Thank you for your help, everyone!

@webknjaz
Copy link
Member

Alright, closing then.

@webknjaz webknjaz closed this as not planned Won't fix, can't repro, duplicate, stale May 30, 2024
@webknjaz webknjaz removed the bug label May 30, 2024
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

3 participants