Opened 3 years ago

Closed 3 years ago

#63693 closed defect (fixed)

py-packaging broken since PEP 517 update

Reported by: markmentovai (Mark Mentovai) Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: py-bootstrap-modules py-packaging

Description

Since fdc9a8128eaf enabled the PEP 517 build for py-packaging, and even after the circular dependency fix in 4f75f6c7edc3, py-packaging does not build. I’ve tested py39-packaging, but presumably this is a problem for py37-packaging and higher per that package’s Portfile.

From a completely clean MacPorts test installation in /tmp with no ports installed:

mark@thingamajigger zsh% port -N install py39-packaging
--->  Computing dependencies for py39-packaging
--->  Dependencies to be installed: py39-bootstrap-modules python39 bzip2 expat gettext libiconv gperf ncurses libedit libffi openssl openssl11 zlib xz pkgconfig python3_select python_select sqlite3 py39-parsing py39-setuptools
[…]
--->  Attempting to fetch packaging-21.0.tar.gz from https://files.pythonhosted.org/packages/source/p/packaging
--->  Verifying checksums for py39-packaging
--->  Extracting py39-packaging
--->  Configuring py39-packaging
--->  Building py39-packaging
Error: Failed to build py39-packaging: command execution failed
Error: See /tmp/macports/var/macports/logs/_private_tmp_macports_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-packaging/py39-packaging/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there
is a bug.
Error: Processing of port py39-packaging failed
[…]

/tmp/macports/var/macports/logs/_private_tmp_macports_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-packaging/py39-packaging/main.log offers:

[…]
:info:build writing manifest file 'packaging.egg-info/SOURCES.txt'
:info:build usage: _in_process.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
:info:build    or: _in_process.py --help [cmd1 cmd2 ...]
:info:build    or: _in_process.py --help-commands
:info:build    or: _in_process.py cmd --help
:info:build error: invalid command 'bdist_wheel'
:info:build Traceback (most recent call last):
:info:build   File "/tmp/macports/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
:info:build     return _run_code(code, main_globals, None,
:info:build   File "/tmp/macports/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
:info:build     exec(code, run_globals)
:info:build   File "/tmp/macports/share/py39-bootstrap-modules/pep517/build.py", line 134, in <module>
:info:build     main(parser.parse_args())
[…]
:info:build   File "/tmp/macports/share/py39-bootstrap-modules/pep517/wrappers.py", line 322, in _call_hook
:info:build     self._subprocess_runner(
:info:build   File "/tmp/macports/share/py39-bootstrap-modules/pep517/wrappers.py", line 66, in default_subprocess_runner
:info:build     check_call(cmd, cwd=cwd, env=env)
:info:build   File "/tmp/macports/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
:info:build     raise CalledProcessError(retcode, cmd)
:info:build subprocess.CalledProcessError: Command '['/private/tmp/macports/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9', '/tmp/macports/share/py39-bootstrap-modules/pep517/in_process/_in_process.py', 'build_wheel', '/private/tmp/macports/var/macports/build/_private_tmp_macports_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-packaging/py39-packaging/work/.tmp/tmph0vp_0qr']' returned non-zero exit status 1.
:info:build Command failed:  cd "/private/tmp/macports/var/macports/build/_private_tmp_macports_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-packaging/py39-packaging/work/packaging-21.0" && /tmp/macports/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -m pep517.build --no-deps --binary --out-dir /private/tmp/macports/var/macports/build/_private_tmp_macports_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-packaging/py39-packaging/work /private/tmp/macports/var/macports/build/_private_tmp_macports_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-packaging/py39-packaging/work/packaging-21.0 
:info:build Exit code: 1
:error:build Failed to build py39-packaging: command execution failed
:debug:build Error code: CHILDSTATUS 77746 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 /tmp/macports/var/macports/logs/_private_tmp_macports_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-packaging/py39-packaging/main.log for details.

If I revert both 4f75f6c7edc3 and fdc9a8128eaf, I’m able to complete installation.

I suppose that the way to break the circular dependency would be to add py-packaging to py-bootstrap-modules.

I experienced this on both macOS 11.6 20G165 on x86_64 with Xcode 12.5.1 12E507 and macOS 12.0.1 21A559 on x86_64 with Xcode 13.1 13A1030d. I’m using MacPorts base 2.7.1, and ports are synced to macports-ports 32e30aa94072.

Change History (2)

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

Cc: jmroot removed
Port: py-bootstrap-modules py-packaging added

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

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.