Skip to content
This repository has been archived by the owner on May 28, 2022. It is now read-only.

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
posita committed Mar 14, 2017
1 parent d324edf commit 24e5686
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 23 deletions.
14 changes: 7 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
import os.path
import sys
sys.path.append(os.path.pardir)
from setup import _SETUP_ARGS
from setup import SETUP_ARGS
# _setup = {}
# execfile(os.path.join(os.getcwd(), os.path.pardir, 'setup.py'), _setup, _setup)
# _SETUP_ARGS = _setup['_SETUP_ARGS']
# SETUP_ARGS = _setup['SETUP_ARGS']

# -- General configuration ------------------------------------------------

Expand Down Expand Up @@ -57,16 +57,16 @@
master_doc = 'index'

# General information about the project.
project = _SETUP_ARGS['name']
author = _SETUP_ARGS['author']
project = SETUP_ARGS['name']
author = SETUP_ARGS['author']
copyright = u'2015-2017, {}'.format(author)

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The full version, including alpha/beta/rc tags.
release = _SETUP_ARGS['version']
release = SETUP_ARGS['version']
# The short X.Y version.
version = '.'.join(release.split('.')[:2])

Expand Down Expand Up @@ -160,8 +160,8 @@
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, '{}'.format(project), '{} Documentation'.format(project),
author, project, _SETUP_ARGS['description'],
_SETUP_ARGS['classifiers'][0]),
author, project, SETUP_ARGS['description'],
SETUP_ARGS['classifiers'][0]),
]


Expand Down
2 changes: 1 addition & 1 deletion docs/contrib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ There are only a few guidelines:
Tests can be run with ``tox [-e TOX_ENV]`` (requires `tox <https://tox.readthedocs.org/en/latest/>`_) or ``"${PYTHON:-python}" setup.py test``.

There are two helper scripts that may be of interest.
To set up a virtual environment (via ``virtualenv``) for development and to run unit tests using _`tox` from that virtual environment, you can do the following:
To set up a virtual environment (via ``virtualenv``) for development and to run unit tests using `tox`_ from that virtual environment, you can do the following:

.. code-block:: sh
Expand Down
4 changes: 2 additions & 2 deletions docs/release_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ If those files are missing or appear to be modified from their originals, then p

- [ ] `git push --tags`

- [ ] `python setup.py sdist upload`
- [ ] `python3.x setup.py bdist_wheel sdist && python2.7 setup.py bdist_wheel`

- [ ] Upload `txrc.egg-info/PKG-INFO` to [`https://pypi.python.org/pypi?:action=submit_form&name=txrc&version=X.Y.Z`](https://pypi.python.org/pypi?:action=submit_form&name=txrc&version=X.Y.Z), if necessary (work-around)
- [ ] `twine upload`

- [ ] `git checkout master`

Expand Down
6 changes: 3 additions & 3 deletions helpers/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [ "${#}" -ne 3 ] ; then
exit 1
fi

_PKG='txrc'
PKG="$( python -c 'import setup ; print(setup.SETUP_ARGS["name"])' )"
MAJOR="${1}"
MINOR="${2}"
PATCH="${3}"
Expand All @@ -31,7 +31,7 @@ TAG="v${VERS}"

set -ex
git checkout -b "${VERS}-release"
perl -pi -e 's{^__version__\s*=\s*\(\s*0,\s*0,\s*0\s*\)$}{__version__ = ( '"${MAJOR}"', '"${MINOR}"', '"${PATCH}"' )}g ;' "${_PKG}/version.py"
perl -pi -e 's{master}{'"${TAG}"'}g ; s{pypi/([^/]+/)'"${_PKG}"'(\.svg)?$}{pypi/\1'"${_PKG}"'/'"${VERS}"'\2}g' README.rst
perl -pi -e 's{^__version__\s*=\s*\(\s*0,\s*0,\s*0\s*\)$}{__version__ = ( '"${MAJOR}"', '"${MINOR}"', '"${PATCH}"' )}g ;' "${PKG}/version.py"
perl -pi -e 's{master}{'"${TAG}"'}g ; s{pypi/([^/]+/)'"${PKG}"'(\.svg)?$}{pypi/\1'"${PKG}"'/'"${VERS}"'\2}g' README.rst
git commit --all --message "Update version and release ${TAG}."
git tag --sign --force --message "Release ${TAG}." "${TAG}"
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
__vers_str__ = _namespace.get('__vers_str__')
__release__ = _namespace.get('__release__', __vers_str__)

_SETUP_ARGS = {
SETUP_ARGS = {
'name': 'txrc',
'version': __vers_str__,
'author': 'Matt Bogosian',
Expand Down Expand Up @@ -100,4 +100,4 @@

if __name__ == '__main__':
os.environ['COVERAGE_PROCESS_START'] = os.environ.get('COVERAGE_PROCESS_START', os.path.join(_MY_DIR, '.coveragerc'))
setuptools.setup(**_SETUP_ARGS)
setuptools.setup(**SETUP_ARGS)
17 changes: 9 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ skip_missing_interpreters = true

[travis] # --------------------------------------------------------------

# "check" permanently broken for 3.3
2.7 = py27, lint, check
3.3 = py33, lint
3.4 = py34, lint, check
3.5 = py35, lint, check
3.6 = py36, lint, check
pypy = pypy, lint, check
pypy3 = pypy3, lint, check
python =
2.7: py27, lint, check
# "check" permanently broken for 3.3
3.3: py33, lint
3.4: py34, lint, check
3.5: py35, lint, check
3.6: py36, lint, check
pypy: pypy, lint, check
pypy3: pypy3, lint, check

[travis:env] # ----------------------------------------------------------

Expand Down

0 comments on commit 24e5686

Please sign in to comment.