FreeBSD: Unrecognized `freebsd14` platform (in response to `mpm --pip upgrade --all`)
grahamperrin opened this issue ยท 7 comments
What happened?
% pipx install meta-package-manager
installed package meta-package-manager 5.10.2, installed using Python 3.9.16
These apps are now globally available
- mpm
done! โจ ๐ โจ% mpm --pip upgrade --all
Traceback (most recent call last):
File "/home/grahamperrin/.local/bin/mpm", line 5, in <module>
from meta_package_manager.__main__ import main
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/meta_package_manager/__init__.py", line 33, in <module>
from click_extra.logging import logger
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/click_extra/__init__.py", line 68, in <module>
from .config import ( # isort:skip
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/click_extra/config.py", line 73, in <module>
from .platform import is_windows
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/click_extra/platform.py", line 78, in <module>
CURRENT_OS_ID, CURRENT_OS_LABEL = current_os()
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/click_extra/platform.py", line 75, in current_os
raise SystemError(f"Unrecognized {sys.platform} platform.")
SystemError: Unrecognized freebsd14 platform.
% python --version
Python 3.9.16
% uname -aKU
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #27 main-n259662-ebdf27b6f367-dirty: Sun Dec 11 11:31:52 GMT 2022 grahamperrin@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG amd64 1400074 1400074
%
List package managers
% mpm --verbosity DEBUG --all-managers managers
Traceback (most recent call last):
File "/home/grahamperrin/.local/bin/mpm", line 5, in <module>
from meta_package_manager.__main__ import main
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/meta_package_manager/__init__.py", line 33, in <module>
from click_extra.logging import logger
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/click_extra/__init__.py", line 68, in <module>
from .config import ( # isort:skip
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/click_extra/config.py", line 73, in <module>
from .platform import is_windows
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/click_extra/platform.py", line 78, in <module>
CURRENT_OS_ID, CURRENT_OS_LABEL = current_os()
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/click_extra/platform.py", line 75, in current_os
raise SystemError(f"Unrecognized {sys.platform} platform.")
SystemError: Unrecognized freebsd14 platform.
%
Meta Package Manager version
% mpm --version
Traceback (most recent call last):
File "/home/grahamperrin/.local/bin/mpm", line 5, in <module>
from meta_package_manager.__main__ import main
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/meta_package_manager/__init__.py", line 33, in <module>
from click_extra.logging import logger
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/click_extra/__init__.py", line 68, in <module>
from .config import ( # isort:skip
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/click_extra/config.py", line 73, in <module>
from .platform import is_windows
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/click_extra/platform.py", line 78, in <module>
CURRENT_OS_ID, CURRENT_OS_LABEL = current_os()
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/click_extra/platform.py", line 75, in current_os
raise SystemError(f"Unrecognized {sys.platform} platform.")
SystemError: Unrecognized freebsd14 platform.
%
Meta Package Manager configuration
% mpm --show-params
Traceback (most recent call last):
File "/home/grahamperrin/.local/bin/mpm", line 5, in <module>
from meta_package_manager.__main__ import main
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/meta_package_manager/__init__.py", line 33, in <module>
from click_extra.logging import logger
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/click_extra/__init__.py", line 68, in <module>
from .config import ( # isort:skip
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/click_extra/config.py", line 73, in <module>
from .platform import is_windows
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/click_extra/platform.py", line 78, in <module>
CURRENT_OS_ID, CURRENT_OS_LABEL = current_os()
File "/usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager/lib/python3.9/site-packages/click_extra/platform.py", line 75, in current_os
raise SystemError(f"Unrecognized {sys.platform} platform.")
SystemError: Unrecognized freebsd14 platform.
%
Congratulation! You are my first FreeBSD user! ๐
I voluntarily implemented strict validation of platforms until I had a better understanding of what mpm
was capable of.
Now I guess there is no point of enforcing Linux checks. I'll relax these checks in the next release and consider the broader category of unix-like systems.
I just unlocked upstream the detection of platforms to any Unix-like distribution. mpm
will start to work on FreeBSD with the upcoming v5.11.0 release.
Just released mpm v5.11.0, which should work on *BSD.
I also have a "linux" self-contained binary named mpm_linux_x64-build-ed0293b.bin
that can be downloaded on the v.5.11.0 GitHub release. This might also work on *BSD but not certain of that.
Feel free to test them both and report me any issue.
Oh, and the *BSD support (and *Unix support) has been featured more pro-eminently in the support matrix in the readme so we can better target supported managers.
Just released mpm v5.11.0, which should work on *BSD. โฆ
Confirmed, thank you!
% pipx upgrade meta-package-manager
upgraded package meta-package-manager from 5.10.2 to 5.11.0 (location: /usr/home/grahamperrin/.local/pipx/venvs/meta-package-manager)
% mpm --pip upgrade --all
Upgrade all outdated packages from pip...
Fallback to calling upgrade operation on each outdated package.
error: DEPRECATION: evdev is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
error: error: subprocess-exited-with-error
error:
error: ร Running setup.py install for evdev did not run successfully.
error: โ exit code: 1
error: โฐโ> [39 lines of output]
error: running install
error: /home/grahamperrin/.local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
error: warnings.warn(
error: running build
error: running build_py
error: creating build
error: creating build/lib.freebsd-14.0-CURRENT-amd64-cpython-39
error: creating build/lib.freebsd-14.0-CURRENT-amd64-cpython-39/evdev
error: copying evdev/ff.py -> build/lib.freebsd-14.0-CURRENT-amd64-cpython-39/evdev
error: copying evdev/__init__.py -> build/lib.freebsd-14.0-CURRENT-amd64-cpython-39/evdev
error: copying evdev/events.py -> build/lib.freebsd-14.0-CURRENT-amd64-cpython-39/evdev
error: copying evdev/device.py -> build/lib.freebsd-14.0-CURRENT-amd64-cpython-39/evdev
error: copying evdev/evtest.py -> build/lib.freebsd-14.0-CURRENT-amd64-cpython-39/evdev
error: copying evdev/util.py -> build/lib.freebsd-14.0-CURRENT-amd64-cpython-39/evdev
error: copying evdev/ecodes.py -> build/lib.freebsd-14.0-CURRENT-amd64-cpython-39/evdev
error: copying evdev/eventio.py -> build/lib.freebsd-14.0-CURRENT-amd64-cpython-39/evdev
error: copying evdev/eventio_async.py -> build/lib.freebsd-14.0-CURRENT-amd64-cpython-39/evdev
error: copying evdev/uinput.py -> build/lib.freebsd-14.0-CURRENT-amd64-cpython-39/evdev
error: copying evdev/genecodes.py -> build/lib.freebsd-14.0-CURRENT-amd64-cpython-39/evdev
error: running build_ext
error: running build_ecodes
error: The 'linux/input.h' and 'linux/input-event-codes.h' include files
error: are missing. You will have to install the kernel header files in
error: order to continue:
error:
error: yum install kernel-headers-$(uname -r)
error: apt-get install linux-headers-$(uname -r)
error: emerge sys-kernel/linux-headers
error: pacman -S kernel-headers
error:
error: In case they are installed in a non-standard location, you may use
error: the '--evdev-headers' option to specify one or more colon-separated
error: paths. For example:
error:
error: python setup.py \
error: build \
error: build_ecodes --evdev-headers path/input.h:path/input-event-codes.h \
error: build_ext --include-dirs path/ \
error: install
error: [end of output]
error:
error: note: This error originates from a subprocess, and is likely not a problem with pip.
error: error: legacy-install-failure
error:
error: ร Encountered error while trying to install package.
error: โฐโ> evdev
error:
error: note: This is an issue with the package mentioned above, not pip.
error: hint: See above for output from the failure.
โฆ
Thanks @grahamperrin for the double-check! Hope you'll find great utility in mpm
! ๐ค
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.