-
Notifications
You must be signed in to change notification settings - Fork 79
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
Use versioneer to manage __version__ #429
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.
@martinfleis Would else anything need to change (e.g. in conf.py
)?
Everything that uses |
I'm for trying it. |
Well, as far as I can tell, the current version of the release scripts actually uses the github api to build the version list, not the first line of the This means that (a) starting versioneer in one package should not break its compatibility with the metapackage scripts and (b) we don't have to adopt versioneer everywhere, if need be. That makes this very desirable... So, I propose:
@sjsrey, does this look ok to you? |
Shall we go ahead and merge this or should we wait for @sjsrey's explicit approval? |
I'd wait for @sjsrey because he wasn't present at the last meeting when we discussed this. |
Will look at this tomorrow. Been occupied with family/life issues for a few weeks. |
No rush at all. Hope everything is OK. |
I think this should be merged as it is a much-improved way to handle the versioning. There are likely to be some rough edges in the ecosystem (maybe in the doc generation and perhaps the meta release) but these should be adjusted to adopt this approach. |
Following today's chat on using automatised way of
__version__
management, this addsversioneer
-based implementation.It is a pretty straightforward PR.
versioneer
setup.cfg
with the following contentsEach project should replace
lipbysal
with the relevant name here.setup.py
Remove reading of version from
__init__
:Import versioneer and use it within
setup()
:I am wrapping existing
{"build_py": build_py}
in versioneer's one.__version__
from__init__.py
Everything else is automated. For details, see the changes in this PR.
How it works:
4.5.1.post2
is the latest tag,23
is the number of commits since that tag,gb400dc0e
is the ID of the latest commit.To use it across pysal ecosystem, we will need to do the same in all packages and probably change some meta-package machinery that may expect
__version__
in a different way.