From 00a08a307574b231a5a8c1142bc675732a03632b Mon Sep 17 00:00:00 2001 From: Tom Lazar Date: Fri, 16 Aug 2013 14:26:57 +0200 Subject: add custom tox config that creates a development environment --- HACKING.txt | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'HACKING.txt') diff --git a/HACKING.txt b/HACKING.txt index 5b5dcc458..563903f2f 100644 --- a/HACKING.txt +++ b/HACKING.txt @@ -16,13 +16,31 @@ checkout. - Check out a read-only copy of the Pyramid source:: - $ git clone git://github.com/Pylons/pyramid.git + $ git clone git://github.com/Pylons/pyramid.git . (alternately, create a writeable fork on GitHub and check that out). +Since pyramid is a framework and not an application, it can be +convenient to work against a sample application, preferably in its +own virtualenv. A quick way to achieve this is to (ab-)use ``tox`` +with a custom configuration file that's part of the checkout:: + + tox -c hacking-tox.ini + +This will create a python-2.7 based virtualenv named ``env27`` (pyramid's +``.gitconfig` ignores all top-level folders that start with ``env`` specifically +for this use case) and inside that a simple pyramid application named +``hacking`` that you can then fire up like so:: + + cd env27/hacking + ../bin/pserve development.ini + +Alternatively, if you don't want to install ``tox`` at this point, +you an achieve the same manually by following these steps: + - Create a virtualenv in which to install Pyramid:: - $ virtualenv2.6 --no-site-packages env + $ virtualenv --no-site-packages env - Install ``setuptools-git`` into the virtualenv (for good measure, as we're using git to do version control):: -- cgit v1.2.3 From 7a2df29602b207954a4d00fae4556f57ed3675e1 Mon Sep 17 00:00:00 2001 From: Andreas Zeidler Date: Fri, 16 Aug 2013 16:42:08 +0200 Subject: add info how to run the tests using pytest (http://pytest.org/) --- HACKING.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'HACKING.txt') diff --git a/HACKING.txt b/HACKING.txt index 563903f2f..87538d0ad 100644 --- a/HACKING.txt +++ b/HACKING.txt @@ -128,6 +128,13 @@ Running Tests $ cd ~/hack-on-pyramid/pyramid $ /usr/bin/tox +- The tests can also be run usign ``pytest`` (http://pytest.org/). This is + intended as a convenience for people who are more used or fond of ``pytest``. + Run the tests like so:: + + $ pip install pytest + $ py.test --strict pyramid/ + Test Coverage ------------- -- cgit v1.2.3 From 852e015f9b3864b0c07569a9753c4107b8d1238a Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 16 Aug 2013 09:48:19 -0500 Subject: recommend easy_install until we don't --- HACKING.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'HACKING.txt') diff --git a/HACKING.txt b/HACKING.txt index 87538d0ad..5d33aa0ab 100644 --- a/HACKING.txt +++ b/HACKING.txt @@ -40,7 +40,7 @@ you an achieve the same manually by following these steps: - Create a virtualenv in which to install Pyramid:: - $ virtualenv --no-site-packages env + $ virtualenv env - Install ``setuptools-git`` into the virtualenv (for good measure, as we're using git to do version control):: @@ -132,7 +132,7 @@ Running Tests intended as a convenience for people who are more used or fond of ``pytest``. Run the tests like so:: - $ pip install pytest + $ $VENV/bin/easy_install pytest $ py.test --strict pyramid/ Test Coverage -- cgit v1.2.3