-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
second take at setuptools_scm #1834
second take at setuptools_scm #1834
Conversation
HOWTORELEASE.rst
Outdated
@@ -3,11 +3,9 @@ How to release pytest | |||
|
|||
Note: this assumes you have already registered on pypi. | |||
|
|||
1. Bump version numbers in ``_pytest/__init__.py`` (``setup.py`` reads it). | |||
1. Check and finalize ``CHANGELOG.rst``. |
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.
We probably want to mention to generate the tag locally right before creating the package, correct?
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.
im considering a setuptools_scm feature where the branch name would be considered as well
Besides my comment on |
5b7113f
to
d6e1021
Compare
My previous comment is still valid, I think:
😁 |
actually i have a pending setuptools_scm update for solving those details more nice - will show later today |
Did you give up on this, or will try on another branch? |
@nicoddemus i'll pick this up when either setuptools_scm supports branches or we decide to get rid of the features branch |
I might be missing something, but I don't really see why. Doesn't setuptools_scm determine the version based on the nearest tag? So if I tag a commit |
@nicoddemus yes, but its a bit of a pain when a feature branch for example has a "wrong" version attached for quite a while |
Can you elaborate a bit what do you mean by "its a bit of a pain when a feature branch for example has a "wrong" version attached for quite a while"? I insist because I would love to use |
@nicoddemus setuptools_scm currently works based only on tags, so its not aware on how branches should bump the last version, and while it is supported to put certain tags in to help, its not exactly well received to litter the history with extra tags to keep setuptools_scm happy |
Sorry, I still don't quite get what the issue is, bear with me... from my POV the version is important basically only when making a release, and at that point we will have a tag at the exact location we need it to be. Or am I I missing something? |
if we are fine with such a limitation, we can just switch over right now |
I'm 👍 on it, unless I'm missing a situation where the development version is important. |
will rebase after pass |
👍 Linting broke because of some bad interaction between setuptools-scm and |
since setuptools 18.6 fixes the issues with develop installs https://github.com/pypa/setuptools/blob/master/CHANGES.rst#186 pypa/setuptools#439
6a691b3
to
2cf4227
Compare
Unfortunately no. It think all freeze tools don't support including the packaging metadata (see marcelotduarte/cx_Freeze#216) and I suspect even after including package metadata
I understand, but
I would prefer if we found a solution to that, given that Just to add some context, we freeze pytest extensively together with our applications at work, so we can run the tests using the frozen executable. This is invaluable to catch packaging errors. |
@@ -47,6 +47,9 @@ commands= | |||
|
|||
[testenv:linting] | |||
basepython = python2.7 | |||
# needed to keep check-manifest working | |||
setenv = | |||
SETUPTOOLS_SCM_PRETEND_VERSION=2.0.1 |
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 it seems this fixes the check-manifest issue. 😁
Can we switch to the write_to
option now?
Nppe, since write_to breaks check manifest |
I'm a little confused then, why do you need to set |
@nicoddemus pretend_version is for the breakage that is incurred from not having version data in whatever check-manifest copies around, the other breakage is incurred because check-manifest does nit allow for generated files in a sdist that aren't in the scm |
Perhaps we can use the [check-manifest]
ignore =
.travis.yml |
@nicoddemus thanks for that hint |
@nicoddemus unknown breaks hypothesis - im going to go back to None |
Hmm wait, but this was working before with hypthosis right? I mean, hypothesis should be seeing the correct version obtained from But if we do find a reasonable explanation for the above, how about using |
pytest i can directly fix, hypothesis i cant |
Why you don't like my suggestion of |
@nicoddemus unknown doesnt break on bad version checks due to lexical order, 0.0.0 does in any case |
Fair enough. 👍 |
@nicoddemus as far as i can tell introducing setuptools_scm will warrant a major release due to the cahnge to |
What changes about it? |
it could be none, and it an include local version components, |
But that doesn't affect releases, which will always have a Do you agree? |
Merging as this now looks great, thanks @RonnyPfannschmidt! |
This breaks hypothesis, and maybe other plugins doing pytest version checking: HypothesisWorks/hypothesis#611 I still maintain my opinion that the benefits of saving some 10s of work for bumping the version number (which can trivially be automated, too) is by no means worth the breakage this causes everywhere... |
Definitely I agree, but that was not supposed to happen. Can you provide more details on how it was possible to install pytest and somehow |
Ah, doing another I wanted to run a
edit: Oh. (pytest-mock) version, not pytest (mock-version). 😆
|
I figured, no worries. This will only happen if one has an old installation and didn't execute a |
since setuptools 18.6 fixes the issues with develop installs
https://github.com/pypa/setuptools/blob/master/CHANGES.rst#186
pypa/setuptools#439