-
-
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
Merged
nicoddemus
merged 7 commits into
pytest-dev:features
from
RonnyPfannschmidt:setuptools-scm-take-2
Apr 27, 2017
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c3aee4b
second take at setuptools_scm
RonnyPfannschmidt 31e6fe8
HOWTORELEASE.tst: use restructuredtext autonumbering
RonnyPfannschmidt c0a51f5
restore check-manifst functionality
RonnyPfannschmidt 2cf4227
restore linting, drop _pytest._version for check-manifest
RonnyPfannschmidt 4242bf6
use unknown to specify unknown versions
RonnyPfannschmidt e02cb6d
restore setuptools_scm write_to usage
RonnyPfannschmidt a280e43
fix import error
RonnyPfannschmidt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,9 @@ include/ | |
*~ | ||
.hypothesis/ | ||
|
||
# autogenerated | ||
_pytest/_version.py | ||
# setuptools | ||
.eggs/ | ||
|
||
doc/*/_build | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,63 +3,61 @@ 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). | ||
#. Check and finalize ``CHANGELOG.rst``. | ||
|
||
2. Check and finalize ``CHANGELOG.rst``. | ||
|
||
3. Write ``doc/en/announce/release-VERSION.txt`` and include | ||
#. Write ``doc/en/announce/release-VERSION.txt`` and include | ||
it in ``doc/en/announce/index.txt``. Run this command to list names of authors involved:: | ||
|
||
git log $(git describe --abbrev=0 --tags)..HEAD --format='%aN' | sort -u | ||
|
||
4. Regenerate the docs examples using tox:: | ||
#. Regenerate the docs examples using tox:: | ||
|
||
tox -e regen | ||
|
||
5. At this point, open a PR named ``release-X`` so others can help find regressions or provide suggestions. | ||
#. At this point, open a PR named ``release-X`` so others can help find regressions or provide suggestions. | ||
|
||
6. Use devpi for uploading a release tarball to a staging area:: | ||
#. Use devpi for uploading a release tarball to a staging area:: | ||
|
||
devpi use https://devpi.net/USER/dev | ||
devpi upload --formats sdist,bdist_wheel | ||
|
||
7. Run from multiple machines:: | ||
#. Run from multiple machines:: | ||
|
||
devpi use https://devpi.net/USER/dev | ||
devpi test pytest==VERSION | ||
|
||
Alternatively, you can use `devpi-cloud-tester <https://github.com/nicoddemus/devpi-cloud-tester>`_ to test | ||
the package on AppVeyor and Travis (follow instructions on the ``README``). | ||
|
||
8. Check that tests pass for relevant combinations with:: | ||
#. Check that tests pass for relevant combinations with:: | ||
|
||
devpi list pytest | ||
|
||
or look at failures with "devpi list -f pytest". | ||
|
||
9. Feeling confident? Publish to pypi:: | ||
#. Feeling confident? Publish to pypi:: | ||
|
||
devpi push pytest==VERSION pypi:NAME | ||
|
||
where NAME is the name of pypi.python.org as configured in your ``~/.pypirc`` | ||
file `for devpi <http://doc.devpi.net/latest/quickstart-releaseprocess.html?highlight=pypirc#devpi-push-releasing-to-an-external-index>`_. | ||
|
||
10. Tag the release:: | ||
#. Tag the release:: | ||
|
||
git tag VERSION <hash> | ||
git push origin VERSION | ||
|
||
Make sure ``<hash>`` is **exactly** the git hash at the time the package was created. | ||
|
||
11. Send release announcement to mailing lists: | ||
#. Send release announcement to mailing lists: | ||
|
||
- [email protected] | ||
- [email protected] | ||
- [email protected] (only for minor/major releases) | ||
|
||
And announce the release on Twitter, making sure to add the hashtag ``#pytest``. | ||
|
||
12. **After the release** | ||
#. **After the release** | ||
|
||
a. **patch release (2.8.3)**: | ||
|
||
|
@@ -81,5 +79,3 @@ Note: this assumes you have already registered on pypi. | |
9. Push ``master`` and ``features``. | ||
|
||
c. **major release (3.0.0)**: same steps as that of a **minor release** | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
# | ||
__version__ = '3.1.0.dev0' | ||
__all__ = ['__version__'] | ||
|
||
try: | ||
from ._version import version as __version__ | ||
except ImportError: | ||
# broken installation, we don't even try | ||
# unknown only works because we do poor mans version compare | ||
__version__ = 'unknown' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,3 @@ | |
else: | ||
print('No .git directory found, skipping checking the manifest file') | ||
sys.exit(0) | ||
|
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
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
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
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.
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?