#67096 closed defect (fixed)
build_getjobsarg's mishandling of build.cmd causes it to add jobs arg incorrectly
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | jmroot (Joshua Root) |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 2.9.0 |
Component: | base | Version: | 2.8.1 |
Keywords: | Cc: | jmroot (Joshua Root) | |
Port: | python-1.0 |
Description
In both the scons and cmake-language-server ports, trying to switch them from python 3.10 to python 3.11 resulted in this inscrutable error:
python -m build: error: unrecognized arguments: -j8
It looks like the python portgroup only adds the jobs arg when not ${python.pep517}
, and ${python.pep517}
is on by default for python 3.11 and later.
But MacPorts base adds the jobs arg whenever ${build.cmd}
matches *make*
, *ninja*
, or *scons*
. The python portgroup misuses ${build.cmd}
when ${python.pep517}
, setting it to ${python.bin} -m build --wheel --no-isolation --outdir ${workpath}
. The base check for whether this matches *make*
triggers for the cmake-language-server port, and the check for whether this matches *scons*
triggers for the scons port, because of the inclusion of ${workpath}
.
Setting ${build.cmd}
to the build command and putting the args in either ${build.pre_args}
or ${build.post_args}
should solve the problem.
Change History (4)
comment:1 Changed 19 months ago by jmroot (Joshua Root)
Component: | ports → base |
---|---|
Summary: | python portgroup's misuse of build.cmd causes base to add jobs arg → build_getjobsarg's mishandling of build.cmd causes it to add jobs arg incorrectly |
comment:2 Changed 19 months ago by jmroot (Joshua Root)
Owner: | set to jmroot |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:3 Changed 19 months ago by jmroot (Joshua Root)
comment:4 Changed 11 months ago by jmroot (Joshua Root)
Milestone: | → MacPorts 2.9.0 |
---|
In 2fafcefd752f326433e80636867be76775bb3531/macports-base (master):