Skip to content

Support for tox #179

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

Merged
merged 3 commits into from
Nov 14, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ cover/
/doc/_build
nbproject
*.sublime-workspace

/*egg-info
/.tox
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ include LICENSE
include CHANGES
include AUTHORS
include README
include requirements.txt

graft git/test/fixtures
graft git/test/performance
Expand Down
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,36 @@ The object database implementation is optimized for handling large quantities of
- Tested with nose 1.3.0
* Mock by Michael Foord used for tests
- Tested with 1.0.1
* Coverage - used for tests coverage

The list of dependencies are listed in /requirements.txt and /test-requirements.txt. The installer takes care of installing them for you though.

### INSTALL

If you have downloaded the source code:

python setup.py install
or if you want to obtain a copy more easily:

or if you want to obtain a copy from the Pypi repository:

pip install gitpython


Both commands will install the required package dependencies.

A distribution package can be obtained for manual installation at:

http://pypi.python.org/pypi/GitPython

### RUNNING TESTS

The easiest way to run test is by using [tox](https://pypi.python.org/pypi/tox) a wrapper around virtualenv. It will take care of setting up environnements with the proper dependencies installed and execute test commands. To install it simply:

pip install tox

Then run:

tox

### DEVELOPMENT STATUS

[![Build Status](https://travis-ci.org/gitpython-developers/GitPython.svg?branch=0.3)](https://travis-ci.org/gitpython-developers/GitPython)
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Remember to update README.md
gitdb>=0.5.1
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
VERSION = v.readline().strip()
v.close()

with open('requirements.txt') as reqs_file:
requirements = reqs_file.read().splitlines()

class build_py(_build_py):
def run(self):
Expand Down Expand Up @@ -73,7 +75,7 @@ def _stamp_version(filename):
package_data = {'git.test' : ['fixtures/*']},
package_dir = {'git':'git'},
license = "BSD License",
install_requires='gitdb >= 0.5.1',
install_requires=requirements,
zip_safe=False,
long_description = """\
GitPython is a python library used to interact with Git repositories""",
Expand Down
5 changes: 5 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Remember to update README.md
coverage
flake8
nose
mock
20 changes: 20 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[tox]
envlist = py26,py27,flake8

[testenv]
commands = nosetests
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt

[testenv:cover]
commands = nosetests --with-coverage

[testenv:flake8]
commands = flake8

[testenv:venv]
commands = {posargs}

[flake8]
#show-source = True
exclude = .tox,.venv,build,dist,doc,git/ext/