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

Initial commit for switching to pyproject.toml #30

Merged
merged 4 commits into from
Jan 23, 2024

Conversation

mirai-mjelavic
Copy link
Member

Migration from setup.py to pyproject.toml.

I have not managed to find a way to migrate MANIFEST.in, or tox since it uses some legacy parser in pyproject.toml which throws errors.

.coveragerc could be moved to pyproject.toml but we use the file itself within tox.ini so I don't know how we would handle reading the coverage configuration from toml as part of tox.

Open to all suggestions and to learn more, have been wrestling myself with some of these errors but unsuccessfully. Also open to using a different build-backend if you prefer.

@mirai-mjelavic
Copy link
Member Author

Maybe a bit more elaboration on two topics:

  1. Regarding MANIFEST.in [FR] Support specifying MANIFEST.in config via pyproject.toml pypa/setuptools#3341 it looks like it is not yet supported by setuptools, but I suppose we can switch to another one or we could delete it altogether? Currently it includes LICENSE, README and requirements and LICENSE and README are specified in .toml already or how do you read this situation?

  2. tox to .toml -> https://tox.wiki/en/4.11.4/config.html#pyproject-toml I have tried to use this and open a .flake8 file for flake8 separately but I could not get tox to work from my CLI with this legacy parameter in .toml. It could not get parsed and I lost way too much time trying to figure it out. I do remember stumbling on another issue where if you use hatchling or something like that it could be possibly specified .toml but I did not want to venture into something that I did not know if should be considered in the first place.

@mirai-mjelavic mirai-mjelavic linked an issue Jan 8, 2024 that may be closed by this pull request
@mirai-mjelavic
Copy link
Member Author

Forgot to add @davide-vitiello as well per his request in the issue.

@RolandASc
Copy link
Member

Hi @mirai-mjelavic , regarding the two open points about MANIFEST and TOX, I think we can defer them to later.
A third point I'd like to raise is the second action though, i.e. publishing to PyPI. I suppose we should update that one.

@mirai-mjelavic
Copy link
Member Author

Hi @mirai-mjelavic , regarding the two open points about MANIFEST and TOX, I think we can defer them to later. A third point I'd like to raise is the second action though, i.e. publishing to PyPI. I suppose we should update that one.

I have changed the publish.yml following this guide with testpypi as well -> https://packaging.python.org/en/latest/tutorials/packaging-projects/

https://test.pypi.org/project/secretsanta/0.1.0/ contains the end result.

@RolandASc
Copy link
Member

@mirai-mjelavic , I suppose the expecting build failure in the title of the PR can be removed now?

@mirai-mjelavic mirai-mjelavic changed the title Initial commit for switching to pyproject.toml, expecting build failure Initial commit for switching to pyproject.toml Jan 23, 2024
Copy link
Member

@RolandASc RolandASc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks good to me, maybe one last small thing to already increment the version as an upcoming development version?

@mirai-mjelavic mirai-mjelavic merged commit 69de0fb into master Jan 23, 2024
6 checks passed
@mirai-mjelavic mirai-mjelavic deleted the issue-25/switch-to-pyproject-toml branch January 23, 2024 12:59
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.

Switch to pyproject.toml
2 participants