Opened 2 years ago

Closed 2 years ago

#65279 closed defect (fixed)

py39-cryptography fails to build: no module 'typing_extensions'

Reported by: breiter (Brian Reiter) Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: Cc:
Port: py-cryptography

Description

py39-cryptography is a dependency of py39-awscli2, not something that I had manually installed.

Manually installing py39-typing_extensions allowed the build to complete. I think that the issue is that py39-cryptography needs to declare a build and runtime dependency on py39-typing_extensions.

:info:build * Getting dependencies for wheel...
:info:build         =============================DEBUG ASSISTANCE==========================
:info:build         If you are seeing an error here please try the following to
:info:build         successfully install cryptography:
:info:build         Upgrade to the latest pip and try again. This will fix errors for most
:info:build         users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
:info:build         =============================DEBUG ASSISTANCE==========================
:info:build         
:info:build Traceback (most recent call last):
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pep517/in_process/_in_process.py", line 363, in <module>
:info:build     main()
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pep517/in_process/_in_process.py", line 345, in main
:info:build     json_out['return_val'] = hook(**hook_input['kwargs'])
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
:info:build     return hook(config_settings)
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/build_meta.py", line 177, in get_requires_for_build_wheel
:info:build     return self._get_build_requires(
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/build_meta.py", line 159, in _get_build_requires
:info:build     self.run_setup()
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/build_meta.py", line 174, in run_setup
:info:build     exec(compile(code, __file__, 'exec'), locals())
:info:build   File "setup.py", line 14, in <module>
:info:build     from setuptools_rust import RustExtension
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools_rust/__init__.py", line 1, in <module>
:info:build     from .build import build_rust
:info:build   File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools_rust/build.py", line 21, in <module>
:info:build     from typing_extensions import Literal
:info:build ModuleNotFoundError: No module named 'typing_extensions'
:info:build ERROR Backend subproccess exited when trying to invoke get_requires_for_build_wheel
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-cryptography/py39-cryptography/work/cryptography-37.0.2" && /opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -m build --wheel --no-isolation --outdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-cryptography/py39-cryptography/work 
:info:build Exit code: 1
:error:build Failed to build py39-cryptography: command execution failed
:debug:build Error code: CHILDSTATUS 59824 1
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-cryptography/py39-cryptography/main.log for details.
version:1

Change History (4)

comment:1 Changed 2 years ago by jmroot (Joshua Root)

Owner: set to stromnov
Port: py-cryptography added; py39-cryptography removed
Status: newassigned

comment:2 Changed 2 years ago by dbl001 (dbl)

Same error on OS X 12.4

Error: Failed to build py39-cryptography: command execution failed

 % conda list typing_extensions
# packages in environment at /Users/davidlaxer/anaconda3:
#
# Name                    Version                   Build  Channel
typing_extensions         4.1.1              pyh06a4308_0    anaconda

 % python3 -m pip install --upgrade pip
Requirement already satisfied: pip in /Users/davidlaxer/anaconda3/lib/python3.8/site-packages (22.1)
Collecting pip
  Downloading pip-22.1.2-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 7.9 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.1
    Uninstalling pip-22.1:
      Successfully uninstalled pip-22.1
Successfully installed pip-22.1.2

comment:4 Changed 2 years ago by markmentovai (Mark Mentovai)

Resolution: fixed
Status: assignedclosed

In 9624129da511f44f6e07f1eaa93f6d5e4fa2021d/macports-ports (master):

py-setuptools-rust: fix dependencies, use python.pep517

Closes: #65279

Note: See TracTickets for help on using tickets.