-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
properly write version file even if in pretend mode #102
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before this, SETUPTOOLS_SCM_PRETEND_VERSION make setuptools_scm fail to write the `write_to` file correctly. this was apparently to avoid issues with archives, which we believe is not a problem anymore. this *is*, however, a problem for other tools like Debian packaging: there, we use the pretend mechanism to import the version number from the Debian packaging system (from `debian/changelog`, usually). this works at setup time: setuptools_scm has the proper environment and detects the version. but if the software was written to depend on the `write_to` file, it will fail to find that version at runtime because `setup.py` will not have written the `write_to` file properly at build time. this patch simply makes sure that the version is written even if the provided version number is a string, which is usually the case for pretend version numbers. a fixed test case is also provided. Closes: #101
|
test before patch: test after patch: |
RonnyPfannschmidt
approved these changes
Oct 5, 2016
|
well done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
before this, SETUPTOOLS_SCM_PRETEND_VERSION make setuptools_scm fail
to write the
write_tofile correctly. this was apparently to avoidissues with archives, which we believe is not a problem anymore.
this is, however, a problem for other tools like Debian packaging:
there, we use the pretend mechanism to import the version number from
the Debian packaging system (from
debian/changelog, usually). thisworks at setup time: setuptools_scm has the proper environment and
detects the version. but if the software was written to depend on the
write_tofile, it will fail to find that version at runtime becausesetup.pywill not have written thewrite_tofile properly at buildtime.
this patch simply makes sure that the version is written even if the
provided version number is a string, which is usually the case for
pretend version numbers. a fixed test case is also provided.
Closes: #101