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

Moved the metadata into setup.cfg #197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KOLANICH
Copy link
Contributor

@KOLANICH KOLANICH commented Jan 9, 2022

Added pyproject.toml.
Version is now populated automatically from git tags using setuptools_scm. Deleted bumpversion.sh.
Fixed some missing metadata fields.

@JeffLIrion
Copy link
Owner

I've never used a setup.cfg file before, what is the benefit over using setup.py?

Also, the CI checks did not pass.

@KOLANICH
Copy link
Contributor Author

I've never used a setup.cfg file before, what is the benefit over using setup.py?

No strong benefits currently:

  • it is still possible to organize package vendor-supplied code execution while building a package with setup.cfg + pyproject.toml, but it was discussed that the long-term goal is to eliminate package vendor-supplied code execution in this case
  • even more, soon setup.cfg will deprecated and its contents should be recommended to be moved into pyproject.toml (currently there is no automatic convertor setup.cfg -> pyproject.toml, but it will be more automatic, more secure and more reliable because of more constrained and parseable structure of setup.cfg, than setup.py -> setup.cfg, I guess even a bot automatically sending PRs will be possible).

@KOLANICH KOLANICH force-pushed the setup.cfg branch 2 times, most recently from bfda66d to 072445d Compare January 16, 2022 15:54
@JeffLIrion
Copy link
Owner

From some brief reading, it looks like pyproject.toml is the way of the future. So if you get the CI checks to pass and once I understand how it works, I'll merge this.

@KOLANICH KOLANICH force-pushed the setup.cfg branch 4 times, most recently from 8a82599 to dac6f82 Compare January 20, 2022 17:05
setup.py Show resolved Hide resolved
.gitignore Show resolved Hide resolved
@@ -41,3 +43,8 @@ jobs:
run: |
if python --version 2>&1 | grep -q "Python 2" || python --version 2>&1 | grep -q "Python 3.5" || python --version 2>&1 | grep -q "Python 3.6" ; then for synctest in $(cd tests && ls test*.py | grep -v async); do python -m unittest discover -s tests/ -t . -p "$synctest" || exit 1; done; fi
if python --version 2>&1 | grep -q "Python 3.7" || python --version 2>&1 | grep -q "Python 3.8" || python --version 2>&1 | grep -q "Python 3.9" || python --version 2>&1 | grep -q "Python 3.10"; then coverage run --source adb_shell -m unittest discover -s tests/ -t . && coverage report -m && coveralls; fi
- name: Upload wheel as a workflow artifact
Copy link
Owner

Choose a reason for hiding this comment

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

I haven't used GitHub Actions to upload an artifact. What's the benefit of doing so?

Copy link

Choose a reason for hiding this comment

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

What's the benefit of doing so?

The ability to download created files (e.g. wheels) to use them somehow. For example, to get a proper wheel before making a release.

setup.cfg Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
@KOLANICH
Copy link
Contributor Author

KOLANICH commented May 6, 2022

  1. I have fixed the scripts to take the version from git tags and to update it. It will only work if there are commits upon the previous tag. Otherwise one should use the retag script.
  2. I have cleaned up the scripts a bit. Some used to be determining package name and then discarding it. That code has been removed.

I haven't used GitHub Actions to upload an artifact. What's the benefit of doing so?

Not really a strong benefit, but sometimes allows you to get the artifact build on the CI. Can have various uses, from not-building the package as a part of other CI pipelines and using the wheel, to troubleshooting the issues on CI.

Added `pyproject.toml`.
Version is now populated automatically from git tags using `setuptools_scm`.
Deleted `bumpversion.sh`.
Fixed some missing metadata fields.
Fixed the scripts to work with `pyproject.toml` and cleaned them up.
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.

None yet

3 participants