Skip to content

Commit

Permalink
Publish micro - testing publishing again.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Jones committed Aug 26, 2015
1 parent eae8851 commit 5978854
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ script:
- pep8 crabigator
- pylint crabigator
- nosetests --with-coverage
after_success:
- if [ "${TRAVIS_PYTHON_VERSION}" == "3.4" ]; then COVERALLS_REPO_TOKEN=${COVERALLS_REPO_TOKEN} coveralls; fi
- export PUB=$(git log --format=%B -n 1 ${TRAVIS_COMMIT} | head -1 | grep -E "^Publish (major|minor|micro)" | awk '{print $2}' || echo "no")
- if [ "${TRAVIS_PYTHON_VERSION}" == "3.4" -a "${PUB}" != "no" ]; then python setup.py publish --bump=${PUB} --github-user=${GITHUB_USER} --github-token=${GITHUB_TOKEN} --github-slug=${TRAVIS_REPO_SLUG} --pypi-user=${PYPI_USER} --pypi-pass=${PYPI_PASS}; fi
Expand Down
10 changes: 7 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Packaging/Publishing script for the crabigator python library."""

import base64
import configparser
import datetime
import json
import os
Expand All @@ -11,6 +10,11 @@
import subprocess
import sys

try:
import ConfigParser as configparser
except ImportError:
import configparser

try:
import urllib2 as url
except ImportError:
Expand Down Expand Up @@ -109,15 +113,15 @@ def run(self):
call('git pull')
call('python setup.py sdist')
call('python setup.py bdist_wheel')
if not os.path.exists(os.path.expand_user('~/.pypirc')):
if not os.path.exists(os.path.expanduser('~/.pypirc')):
config = configparser.RawConfigParser()
config.add_section('distutils')
config.set('distutils', 'index-servers', 'pypi')
config.add_section('pypi')
config.set('pypi', 'repository', 'https://pypi.python.org/pypi')
config.set('pypi', 'username', self.pypi_user)
config.set('pypi', 'password', self.pypi_pass)
with open(os.path.expand_user('!/.pypirc'), 'wb') as pypirc_file:
with open(os.path.expanduser('!/.pypirc'), 'wb') as pypirc_file:
config.write(pypirc_file)
call('twine upload dist/*')

Expand Down

0 comments on commit 5978854

Please sign in to comment.