3 ms·
What do you mean? You type `pip install west` and a binary will appear in `~/.local/bin/west`. This directory needs to be part of your $PATH variable. Done. Us
by mr_mitm 4y ago
What do you mean? You type `pip install west` and a binary will appear in `~/.local/bin/west`. This directory needs to be part of your $PATH variable. Done.
Using virtual envs or pipx or poetry or whatever are non-standard.
Packaging Python projects, however, ... don't get me started on the whole `setup.py`, `setup.cfg`, `pyproject.toml` debacle. This article has more information about it, but the fact that this is supposed to be the short version makes it even more infuriating: https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html https://blog.ganssle.io/articles/2021/10/setup-py-deprecated...
- kevin_thibedeau 4y agoWhat's really frustrating is how little information is out there for setting up a pyproject.toml. The community has really dropped the ball on their new shiny.
- BerislavLopac 4y agoYou are right to an extent, but this is because this "shiny" has been transforming since it was introduced. Originally, it was meant as a central point to define your build system requirements [0]; for this purpose it needs to include only two lines: [build-system] # Minimum requirements for the build system to execute. requires = ["setuptools", "wheel"] # PEP 508 specifications. Then, package managers like pipenv and poetry started using it as a central place to storing other project metadata like dependencies, description etc. Most package managers now have their own versions of that functionality, and it is currently being standardised to a common form [1]. Finally, many other projects have started adding support for keeping its configurations in pyproject.toml. Some (like black) don't even support any other form, while others (like flake8, and until recently mypy) are resisting this trend; but it is already so prevalent that it can be considered the standard. [0] https://peps.python.org/pep-0518/ https://peps.python.org/pep-0518/ [1] https://peps.python.org/pep-0621/ https://peps.python.org/pep-0621/
- mr_mitm 4y agoAnd yet, only having a pyproject.toml is apparently not sufficient either (besides the annoying flake8 resistance), at least if you want to support editable installs IIRC and you or your users aren't using the latest pip.
- BerislavLopac 4y agoSupport for PEP 660 was introduced in pip nearly a year ago [0]. Most build backends have implemented it since as well [1][2][3]. [0] https://pip.pypa.io/en/stable/news/#v21-3-1 https://pip.pypa.io/en/stable/news/#v21-3-1 [1] setuptools: https://github.com/pypa/setuptools/blob/main/CHANGES.rst#v6400 https://github.com/pypa/setuptools/blob/main/CHANGES.rst#v64... [2] flit: https://flit.pypa.io/en/latest/history.html?highlight=660#version-3-4 https://flit.pypa.io/en/latest/history.html?highlight=660#ve... [3] poetry: https://github.com/python-poetry/poetry-core/releases/tag/1.0.8 https://github.com/python-poetry/poetry-core/releases/tag/1....