Skip to content

Commit

Permalink
added .travis for testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
skuschel committed Sep 15, 2014
1 parent 16ff8b1 commit 6b44d8d
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 5 deletions.
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Check this file before committing a new version:
# http://lint.travis-ci.org/

language: python

python:
- "2.7"

before_install:
- uname -a
- free -m
- df -h
- ulimit -a
- python -V

virtualenv:
system_site_packages: true

# command to install dependencies
install:
- sudo apt-get update -qq
- if [[ $TRAVIS_PYTHON_VERSION == "2.7" ]]; then sudo apt-get install python-matplotlib python-scipy; fi
- pip install -r pip-requirements.txt

# run tests
script:
- ./run-tests
5 changes: 5 additions & 0 deletions pip-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--index-url https://pypi.python.org/simple/

pep8
nose
-e .
20 changes: 18 additions & 2 deletions postpic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,25 @@
import analyzer
import plotting

__version__ = '0.0.0'
__all__ = ['datareader', 'analyzer', 'plotting']

# Use Git description for __version__ if present
# read version from installed metadata
from pkg_resources import get_distribution, DistributionNotFound
try:
import os.path
_dist = get_distribution('postpic')
# Normalize case for Windows systems
dist_loc = os.path.normcase(_dist.location)
here = os.path.normcase(__file__)
if not here.startswith(os.path.join(dist_loc, 'postpic')):
# not installed, but there is another version that *is*
raise DistributionNotFound
except DistributionNotFound:
__version__ = 'Please install this project with setup.py'
else:
__version__ = _dist.version

# add Git description for __version__ if present
try:
import subprocess as sub
import os.path
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@
# along with postpic. If not, see <http://www.gnu.org/licenses/>.
#
from setuptools import setup
from postpic import __version__


setup(name='postpic',
version=__version__,
version='0.0.0',
author='Stephan Kuschel',
author_email='[email protected]',
description='The open source particle-in-cell post processor.',
Expand Down

0 comments on commit 6b44d8d

Please sign in to comment.