[MacPorts] #65097: py38-jinja2 @3.1.2 does not build macOS High Sierra, Version 10.12.6, because: /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8: No module named install.__main__; 'install' is a package and cannot be directly executed
MacPorts
noreply at macports.org
Sun May 1 02:55:48 UTC 2022
#65097: py38-jinja2 @3.1.2 does not build macOS High Sierra, Version 10.12.6,
because:
/opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8:
No module named install.__main__; 'install' is a package and cannot be
directly executed
------------------------+------------------------
Reporter: ballapete | Owner: jmroot
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.7.2
Resolution: | Keywords: highsierra
Port: py-jinja2 |
------------------------+------------------------
Comment (by reneeotten):
Replying to [comment:6 ballapete]:
We recommend to stick with one way of installing packages, either through
MacPorts or using `pip` and avoid mixing/matching as this often leads to
problems that are difficult to diagnose....
Additionally, please make sure you have no packages installed in your
local user directory (e.g.,
`/Users/<username>/Library/Python/3.8/lib/python/site-packages/`) that
could possibly interfere.
> I uninstalled and then re-installed the four other packages with port.
When I now try to upgrade `py38-jinja2` I still get:
>
> {{{
> Executing: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_python_py-
jinja2/py38-jinja2/work/Jinja2-3.1.2" &&
/opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8
-m build --wheel --no-isolation --outdir
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work
> DEBUG: system: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_python_py-
jinja2/py38-jinja2/work/Jinja2-3.1.2" &&
/opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8
-m build --wheel --no-isolation --outdir
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work
> Traceback (most recent call last):
> File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py",
line 194, in _run_module_as_main
> return _run_code(code, main_globals, None,
> File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py",
line 87, in _run_code
> exec(code, run_globals)
> File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
/site-packages/build/__main__.py", line 390, in <module>
> main(sys.argv[1:], 'python -m build')
> File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
/site-packages/build/__main__.py", line 337, in main
> _setup_cli()
> File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
/site-packages/build/__main__.py", line 71, in _setup_cli
> colorama.init() # fix colors on windows
> AttributeError: module 'colorama' has no attribute 'init'
> Command failed: cd
"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_python_py-
jinja2/py38-jinja2/work/Jinja2-3.1.2" &&
/opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8
-m build --wheel --no-isolation --outdir
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work
> Exit code: 1
> Warning: The following existing file was hidden from the build system by
trace mode:
>
/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
/site-packages/colorama/__init__.py
> Error: Failed to build py38-jinja2: command execution failed
> }}}
>
> So I also uninstalled and re-installed py38-colorama. This does not
change anything.
that's a different problem than you mention when you opened this ticket.
The problem you have no is actually due to building in trace-mode, that
doesn't work properly with the PEP517 build tools. It tries to import the
`colorama` module and that fails because the port doesn't declare a
dependency on it - which it shouldn't as that is only needed on Windows.
The issue appears that the test whether the module is available works in
trace-mode, but then the actual usage doesn't. That's on my to-do list to
take a closer look... at this stage, please try again without trace mode
and see if that works now.
> BTW, I often see this warning:
{{{
>
/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
/site-packages/setuptools/command/install.py:34:
SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build
and pip and other standards-based tools.
}}}
That's just a deprecation warning for setuptools - these can be ignored
for now..
--
Ticket URL: <https://trac.macports.org/ticket/65097#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list