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
Feature Request: Add __version__ to awscrt #257
Comments
graebm
added a commit
that referenced
this issue
May 12, 2021
## Overview This PR should resolve #257 and address a couple other low hanging fixes for the AWS CRT Python bindings. ### Add __version__ attribute This piece addresses #257 by adding moving the version specifier for this package out of the `setup.py` and into a more accessible place in the top level `__init__.py` file. This will allow easy access on a static attribute (e.g. `awscrt.__version__`) bringing this package more inline with Python standards. ### Add a long_description While I was fixing the version, I noticed we're not uploading any useful readme information to PyPI. The package is currently just a [blank page](https://pypi.org/project/awscrt/). I added the readme as the `long_description` which is standard practice to provide general information to users on PyPI. **Note this syntax requires `wheel>=31.0` to work correctly. I couldn't find release dependencies but that needs to be verified before merging.** ### Add a version badge to README Added basic version badge to the README that updates with each release so anyone can see the latest version from their already downloaded copy. ### Fixed License Specifier The Trove Classifier for the license was also used in the license field when the package was set up which generates odd metadata on PyPI. I moved it to the expected plain text specifier so it displays correctly now. ## Testing I ran the `update_version.py` script and the `test-version-exists` script to test. I wasn't able to find other testing infrastructure but happy to do more if you have suggestions. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Authored-by: Nate Prewitt <Nate.Prewitt@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Most well formed Python packages will provide a dunder version attribute on their top level package name. This provides a uniform way to get versioning metadata without requiring
pkg_resources
look ups. There's a number of ways that have been used to integrate this value into your setup.py, so I've provided a few examples for ideas. This is minor quality of life fix, but brings crt more in line with the rest of the ecosystem.Examples:
The text was updated successfully, but these errors were encountered: