summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2014-11-14 16:16:06 +0100
committerSebastian Thiel <byronimo@gmail.com>2014-11-14 16:16:38 +0100
commit0f09906d27affb8d08a96c07fc3386ef261f97af (patch)
treed40ad34a07acdaab828f82ff05029f897bb20bc9
parente1ad78eb7494513f6c53f0226fe3cb7df4e67513 (diff)
parentc914637ab146c23484a730175aa10340db91be70 (diff)
downloadgitpython-0f09906d27affb8d08a96c07fc3386ef261f97af.tar.gz
Merge branch 'hashar-tox' into 0.3
Make tox available, see https://github.com/gitpython-developers/GitPython/pull/179 [skip ci]
-rw-r--r--.gitignore3
-rw-r--r--README.md21
-rw-r--r--requirements.txt2
-rwxr-xr-xsetup.py2
-rw-r--r--test-requirements.txt4
-rw-r--r--tox.ini20
6 files changed, 48 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 2e8e1749..787b3d44 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,6 @@ cover/
/doc/_build
nbproject
*.sublime-workspace
+
+/*egg-info
+/.tox
diff --git a/README.md b/README.md
index a3800f92..44b55748 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,9 @@ 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
@@ -22,15 +25,27 @@ The object database implementation is optimized for handling large quantities of
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
+
### SOURCE
GitPython's git repo is available on GitHub, which can be browsed at [github](https://github.com/gitpython-developers/GitPython) and cloned like that:
diff --git a/requirements.txt b/requirements.txt
index 77af7ff8..c9260b12 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,2 @@
GitPython
-gitdb>=0.6.0 \ No newline at end of file
+gitdb>=0.6.0
diff --git a/setup.py b/setup.py
index ed04a581..064a6e7d 100755
--- a/setup.py
+++ b/setup.py
@@ -16,6 +16,8 @@ v = open(path.join(path.dirname(__file__), 'VERSION'))
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):
diff --git a/test-requirements.txt b/test-requirements.txt
new file mode 100644
index 00000000..d9425c03
--- /dev/null
+++ b/test-requirements.txt
@@ -0,0 +1,4 @@
+coverage
+flake8
+nose
+mock
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 00000000..60bfb1d9
--- /dev/null
+++ b/tox.ini
@@ -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/