-
Notifications
You must be signed in to change notification settings - Fork 106
Add version information to setup.cfg #93
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
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.
Thanks for this PR!
The purpose of setuptools_scm
is to keep the release process simple without manually updated versions, so it'd be great if we can somehow leverage that functionality still.
See my other comment...
setuptools_rust/__init__.py
Outdated
from .tomlgen import tomlgen_rust, find_rust_extensions | ||
from .utils import Binding, Strip | ||
|
||
__version__ = "0.11.6.dev1" |
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.
To make it easier to do releases, can we use setuptools_scm
version hard-coding?
e.g. in pyproject.toml
:
[tool.setuptools_scm]
write_to = "pkg/version.py"
and then refer to the generated file here?
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.
Nice trick! I was not aware of this feature. Please check out the update to my PR.
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.
Thanks! I will test this quickly 👍
setuptools_rust/__init__.py
Outdated
from .test import test_rust | ||
from .tomlgen import tomlgen_rust, find_rust_extensions | ||
from .utils import Binding, Strip | ||
from .version import __version__ |
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.
From testing I think this needs to be:
from .version import __version__ | |
from .version import version as __version__ |
... does that match your experience too?
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.
Oops, I initially used a template with __version__
. I removed the template and forgot to re-generate version.py
before I pushed the change.
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.
👍 yeah I considered adding a template but thought the default was nicer too.
- add `setuptools_rust.__version__` - populate setup.cfg's version field from `setuptools_rust.__version__` - require setuptools >= 46.1 Resolves: PyO3#91 Signed-off-by: Christian Heimes <[email protected]>
Signed-off-by: Christian Heimes <[email protected]>
bbf34da
to
120e04d
Compare
Many thanks! CI seemed to have an issue so I force-pushed to fix; hope that's okay. |
setuptools_rust.__version__
setuptools_rust.__version__
Version
0.11.6.dev1
means that the current main branch is indevelopment phase of an upcoming 0.11.6 release.
Resolves: #91
Signed-off-by: Christian Heimes [email protected]