Hacker News new | past | comments | ask | show | jobs | submit login

The PEP in no way explains how to write a usable pyproject for ordinary projects. It's basically just targeted at people developing installers.

I meant package. A directory with an __init__.py. You can't install standalone script.py (or a generated wrapper) as /usr/local/bin/script with a pyproject.




> The PEP in no way explains how to write a usable pyproject for ordinary projects. It's basically just targeted at people developing installers.

Did you look at it[1]?

> I meant package. A directory with an __init__.py. You can't install standalone script.py (or a generated wrapper) as /usr/local/bin/script with a pyproject.

I still don't think I understand what your expectation is here: a `pyproject.toml` is just a metadata specification. The only difference between it and `setup.py` is that the latter is arbitrary code.

There's an old, long deprecated way to use `setup.py`, namely `setup.py install`. But that's been discouraged in favor of `pip install` for years, which behaves precisely the same way with `pyproject.toml`. If you want to install a script into `/usr/local/bin`, `pip install` with a package specified in `pyproject.toml` will work just fine.

[1]: https://peps.python.org/pep-0621/#example


Not doing that either … until there are ways for only the person (me) to hold the key to the revision submission into pip.


You're confusing `pip` with PyPI. `pip` is a package installer; you can use it to install local packages, or packages that are hosted on an index. In this case, we're solely talking about local packages.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: