-
Notifications
You must be signed in to change notification settings - Fork 124
Use setuptools_scm for version number #481
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
Codecov Report
@@ Coverage Diff @@
## master #481 +/- ##
==========================================
- Coverage 90.96% 90.96% -0.01%
==========================================
Files 11 11
Lines 2868 2867 -1
==========================================
- Hits 2609 2608 -1
Misses 259 259
Continue to review full report at Codecov.
|
|
This PR is currently failing on the VSTS build. I think it might be a problem with the build configuration. The test that is failing does:
The only way that |
|
@kotfu I configured the VSTS macOS build to simply use pytest directly, so yeah it is just testing the code in place. My bad. In the long run I’m going to switch the VSTS build to be Yaml based so the configuration is in our GitHub repo, but that feature is in preview so I didn’t want to rely on it yet. In the meantime, see if you can create a free account at visualstudio.com and send me an email with your account name and I’ll add you as an admin to the cmd2 project there so you can tweak the build configuration. Alternatively just tell me what you think the best way to fix it is and I’ll change it. But it would probably be good for you to have access as well. |
|
|
||
| from pkg_resources import get_distribution, DistributionNotFound | ||
| try: | ||
| __version__ = get_distribution(__name__).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.
So this is finally going to make me abandon my PYTHONPATH hack way of doing cmd2 development and switch to the pip way instead using:
$ cd ~/src/cmd2
$ pip install -e .But that is probably a good thing ...
|
@kotfu I modified the VSTS build so that it first uses pip to install $ pip install -e .You should have gotten an email invite to join that VSTS account/project. The VSTS macOS build capability is in somewhat of a preview state. A little down the road we will switch to using a YAML file to define the build to make it obvious what is going on and we will probably test on a couple versions of Python on macOS instead of just one. But I figured some automated build on macOS is better than no automated build on macOS ... |
For issue #470, remove hard coded version numbers. Instead use setuptools_scm, which derives the version number from git tags.
setuptools_scmhas a couple of drawbacks:setuptools_scmis opinionated. If you follow semantic versioning, you must tag minor releases with the a patch level of '0', i.e. '2.0.0', not '2.0'0.9.4.dev73+g4da2d37.d20180729. This is only visible to developers (because only developers should be running untagged versions ofcmd2), but can be modified if we really want to change it.The good news is that this PR takes away much of the pain of version increments.