-
Notifications
You must be signed in to change notification settings - Fork 76
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
move setup.cfg to pyproject.toml #352
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much cleaner now, great :) I inserted few minor suggestions, and I would only reorder the sections a bit (e.g., [tool.setuptools.packages.find]
should go under [tool.setuptools]
section).
"tox", | ||
"myst_parser", | ||
] | ||
publishing = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my project I have build
package as well in the publishing extra. Should be needed, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[tool.setuptools] | ||
include-package-data = true | ||
packages = ["{{ cookiecutter.package_name }}"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After reading up on setuptools package discovery and data file inclusion (check especially the comment in the pyproject.toml example) I think this whole section could be removed. For sure include-package-data = true
can be removed, because it is now true by default. The package discovery could be removed if we move to a src
-based layout.
This actually has two advantages:
- This above, i.e. simpler configuration.
- It also automatically supports single-file packages (you don't need a folder for a package if it only consists of one file, but to support that you normally need to reconfigure, see e.g. how I did that in kwandl; I think that with a
src
dir, though, that will also just be autodiscovered, yay!).
[tool.setuptools] | |
include-package-data = true | |
packages = ["{{ cookiecutter.package_name }}"] |
To be clear, this suggestion would have to be accompanied by adding a src
dir.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also agree that moving to a src-based layout would be the nicest way to go :)
This is a great PR, thanks for this effort! One additional change to a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is the same typo (almost) everywhere: reporitory
instead of repository
. For the rest feel free to merge when it's fixed :)
{{cookiecutter.directory_name}}/.github/next_steps/01_sonarcloud_integration.md
Outdated
Show resolved
Hide resolved
{{cookiecutter.directory_name}}/.github/next_steps/02_citation.md
Outdated
Show resolved
Hide resolved
{{cookiecutter.directory_name}}/.github/next_steps/02_citation.md
Outdated
Show resolved
Hide resolved
{{cookiecutter.directory_name}}/.github/next_steps/03_readthedocs.md
Outdated
Show resolved
Hide resolved
{{cookiecutter.directory_name}}/.github/next_steps/03_readthedocs.md
Outdated
Show resolved
Hide resolved
@gcroci2 good catch! downside of making a typo during a 'find & replace all' 😅 |
Ok, both other PRs are merged. There are some merge conflicts left to fix. Also, I was wondering: you now invoke Finally, if you are up for becoming a true UGHist, I warmly invite you to squash some of the commits (happy to do it together, I'm at the office tomorrow), but no worries if you don't have the time 😁 |
7656b95
to
3d9889c
Compare
@egpbos Yep, I indeed had to include Also, UGH challenge accepted 💪 I've rebased my commits on top of the merged main, and |
UGH! Super nice addition, thanks! |
This commit changed the test_subpackage build command, but left the now unnecessary '--sdist' and '--wheel' parameters. They are on by default for `python -m build`
This commit changed the test_subpackage build command, but left the now unnecessary '--sdist' and '--wheel' parameters. They are on by default for `python -m build`
Description
setup.py
andsetup.cfg
pyproject.toml
Some minor adjustments made during the translation:
>=64.0.0
tosetuptools
under[build-system]
: this is the first version to add support for PEP660: Editable installs for pyproject.toml based buildszip_safe
settinginclude-package-data = true
under[tool.setuptools]
in combination with requiringsetuptools-scm
. This automatically adds all data files that are included under source control.packages = {{ cookiecutter.package_name }}
under[tools.setuptools]
repository_url
to define an https github url under[project.urls]
, since it wouldn't accept the git url incookiecutter.repository
:Related issues:
pyproject.toml
only for installing the generated package #351Instructions to review the pull request
Create a
python-template-test
repo on GitHub (will be overwritten if existing)