Skip to content

Commit 1a45e12

Browse files
authored
Merge pull request #188 from nicoddemus/travis-deploy
Travis deploy and release 1.5.4
2 parents 0f77b6e + 7ad4bd7 commit 1a45e12

File tree

8 files changed

+46
-114
lines changed

8 files changed

+46
-114
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ __pycache__/
1010
.eggs/
1111

1212
dist/*
13+
/py/_version.py
14+
.pytest_cache/

.hgignore

Lines changed: 0 additions & 29 deletions
This file was deleted.

.hgtags

Lines changed: 0 additions & 68 deletions
This file was deleted.

.travis.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,23 @@ matrix:
1717
- python: '2.7'
1818
# using a different option due to pytest-addopts pytester issues
1919
env: PYTEST_XADDOPTS="-n 3 --runslowtests" DEPS="pytest~=3.0.0 pytest-xdist"
20+
21+
- stage: deploy
22+
python: '3.6'
23+
env:
24+
install: pip install -U setuptools setuptools_scm
25+
script: skip
26+
deploy:
27+
provider: pypi
28+
user: nicoddemus
29+
distributions: sdist bdist_wheel
30+
skip_upload_docs: true
31+
password:
32+
secure: VNYW/sZoD+9DzKCe6vANNXXJR7jP7rwySafQ33N1jAnCrdylQjEN/p6tSfUe8jDi3wDpLPL9h8pwfxuUT7CRxglHov3Qe7zSeywixvHan5aFahQiQ8+gucYIM7wITHH3oQs7jN35pnhdnF+QlW2+eDCL6qOLU5XwuRhsDKXjQ/hUWR5hlX5EniD1gzyKEf6j1YCpST87tKpeLwVEYEmsucdkUZuXhxDtyaWQHWiPsLWwh/slQtUJEHeLF26r8UxFy0RiGne9jR+CzRfH5ktcA9/pArvp4VuwOii+1TDxVSYP7+I8Z+eUKN9JBg12QLaHwoIN/8J+MvHCkuf+OGSLM3sEyNRJGDev372xg3K7ylIkeeK4WXirKEp2ojgN8tniloDjnwdu/gPWBnrXuooA60tNoByHFa8KbMZAr2B2sQeMxD4VZGr1N8l0rX4gRTrwvdk3i3ulLKVSwkXaGn+GrfZTTboa7dEnpuma8tv1niNCSpStYIy7atS8129+5ijV3OC8DzOMh/rVbO9WsDb/RPG3yjFiDvEJPIPeE0l/m5u42QBqtdZSS2ia7UWTJBiEY09uFMTRmH5hhE/1aiYBbvAztf5CReUbeKdSQz3L8TTSZqewtFZmXTkX97/xQnrEpsnGezIM2DNuMEuQG3MxGkNCxwbQKpx/bkHdrD75yMk=
33+
on:
34+
tags: true
35+
repo: pytest-dev/py
36+
2037
allow_failures:
2138
- python: 'pypy-5.4'
2239
install:

CHANGELOG

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
(unreleased)
2-
============
1+
1.5.4 (2018-06-27)
2+
==================
33

44
- fix pytest-dev/pytest#3451: don't make assumptions about fs case sensitivity
55
in ``make_numbered_dir``.

HOWTORELEASE.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Release Procedure
2+
-----------------
3+
4+
#. Create a branch ``release-X.Y.Z`` from the latest ``master``.
5+
6+
#. Manually update the ``CHANGELOG`` and commit.
7+
8+
#. Open a PR for this branch targeting ``master``.
9+
10+
#. After all tests pass and the PR has been approved by at least another maintainer, publish to PyPI by creating and pushing a tag::
11+
12+
git tag X.Y.Z
13+
git push [email protected]:pytest-dev/py X.Y.Z
14+
15+
Wait for the deploy to complete, then make sure it is `available on PyPI <https://pypi.org/project/py>`_.
16+
17+
#. Merge your PR to ``master``.

py/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@
1818
import apipkg
1919
lib_not_mangled_by_packagers = False
2020
vendor_prefix = ''
21-
__version__ = '1.5.3'
21+
22+
try:
23+
from ._version import version as __version__
24+
except ImportError:
25+
# broken installation, we don't even try
26+
__version__ = "unknown"
2227

2328

2429
apipkg.initpkg(__name__, attr={'_apipkg': apipkg, 'error': error}, exportdefs={

setup.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
1-
import os
2-
import sys
3-
41
from setuptools import setup, find_packages
52

63

7-
def get_version():
8-
p = os.path.join(os.path.dirname(
9-
os.path.abspath(__file__)), "py", "__init__.py")
10-
with open(p) as f:
11-
for line in f.readlines():
12-
if "__version__" in line:
13-
return line.strip().split("=")[-1].strip(" '")
14-
raise ValueError("could not read version")
15-
16-
174
def main():
185
setup(
196
name='py',
207
description='library with cross-python path, ini-parsing, io, code, log facilities',
218
long_description=open('README.rst').read(),
22-
version=get_version(),
9+
use_scm_version={"write_to": "py/_version.py"},
10+
setup_requires=["setuptools-scm"],
2311
url='http://py.readthedocs.io/',
2412
license='MIT license',
2513
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],

0 commit comments

Comments
 (0)