Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pyproject.toml #101

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Khenziii
Copy link

Since PEP-518, pyproject.toml is the preferred way to specify build system requirements.

Having this file makes the project fit into the ecosystem better, and provides many benefits, such as making users able to build distributable binaries:

$ python -m build
[...]
Successfully built sherloq-0.91.tar.gz and Sherloq-0.91-py3-none-any.whl
$ ls dist 
Sherloq-0.91-py3-none-any.whl  sherloq-0.91.tar.gz

which can later be installed like this:

$ pip install dist/Sherloq-0.91-py3-none-any.whl

learn more about the wheel format here

pyproject.toml can also specify lots of metadata, such as license, version of program, authors, maintainers, etc.

This is necessary (afaik).

In `pyproject.toml`, I have specified a `sherloq` script:

```
[...]
scripts = {sherloq = "gui.sherloq:main"}
[...]
```

(This will allow users to use `sherloq` command after installing the
package.)

The string: `"gui.sherloq:main"` needs to be set to
`<module>:<function>`, so just `"gui.sherloq"` wouldn't work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant