| | |
| | | use the `VENV` environment variable instead of absolute path of the |
| | | virtual environment. |
| | | |
| | | **On UNIX:** |
| | | On UNIX |
| | | ^^^^^^^ |
| | | |
| | | .. code-block:: text |
| | | |
| | |
| | | New python executable in /home/foo/env/bin/python |
| | | Installing setuptools.............done. |
| | | |
| | | **On Windows:** |
| | | On Windows |
| | | ^^^^^^^^^^ |
| | | |
| | | Set the `VENV` environment variable. |
| | | |
| | |
| | | Install Pyramid Into the Virtual Python Environment |
| | | --------------------------------------------------- |
| | | |
| | | **On UNIX:** |
| | | On UNIX |
| | | ^^^^^^^ |
| | | |
| | | .. code-block:: text |
| | | |
| | | $ $VENV/bin/easy_install pyramid |
| | | |
| | | **On Windows:** |
| | | On Windows |
| | | ^^^^^^^^^^ |
| | | |
| | | .. code-block:: text |
| | | |
| | |
| | | |
| | | Change directory to the ``pyramidtut`` directory. |
| | | |
| | | **On UNIX:** |
| | | On UNIX |
| | | ^^^^^^^ |
| | | |
| | | .. code-block:: text |
| | | |
| | | $ cd pyramidtut |
| | | |
| | | **On Windows:** |
| | | On Windows |
| | | ^^^^^^^^^^ |
| | | |
| | | .. code-block:: text |
| | | |
| | |
| | | The below instructions assume your current working directory is the |
| | | "virtualenv" named "pyramidtut". |
| | | |
| | | **On UNIX:** |
| | | On UNIX |
| | | ------- |
| | | |
| | | .. code-block:: text |
| | | |
| | | $ $VENV/bin/pcreate -s alchemy tutorial |
| | | |
| | | **On Windows:** |
| | | On Windows |
| | | ---------- |
| | | |
| | | .. code-block:: text |
| | | |
| | |
| | | directory you created in :ref:`sql_making_a_project`, and run the |
| | | ``setup.py develop`` command using the virtualenv Python interpreter. |
| | | |
| | | **On UNIX:** |
| | | On UNIX |
| | | ------- |
| | | |
| | | .. code-block:: text |
| | | |
| | | $ cd tutorial |
| | | $ $VENV/bin/python setup.py develop |
| | | |
| | | **On Windows:** |
| | | On Windows |
| | | ---------- |
| | | |
| | | .. code-block:: text |
| | | |
| | |
| | | After you've installed the project in development mode, you may run |
| | | the tests for the project. |
| | | |
| | | **On UNIX:** |
| | | On UNIX |
| | | ------- |
| | | |
| | | .. code-block:: text |
| | | |
| | | $ $VENV/bin/python setup.py test -q |
| | | |
| | | **On Windows:** |
| | | On Windows |
| | | ---------- |
| | | |
| | | .. code-block:: text |
| | | |
| | |
| | | To get this functionality working, we'll need to install the ``nose`` and |
| | | ``coverage`` packages into our ``virtualenv``: |
| | | |
| | | **On UNIX:** |
| | | On UNIX |
| | | ------- |
| | | |
| | | .. code-block:: text |
| | | |
| | | $ $VENV/bin/easy_install nose coverage |
| | | |
| | | **On Windows:** |
| | | On Windows |
| | | ---------- |
| | | |
| | | .. code-block:: text |
| | | |
| | |
| | | Once ``nose`` and ``coverage`` are installed, we can actually run the |
| | | coverage tests. |
| | | |
| | | **On UNIX:** |
| | | On UNIX |
| | | ------- |
| | | |
| | | .. code-block:: text |
| | | |
| | | $ $VENV/bin/nosetests --cover-package=tutorial --cover-erase --with-coverage |
| | | |
| | | **On Windows:** |
| | | On Windows |
| | | ---------- |
| | | |
| | | .. code-block:: text |
| | | |
| | |
| | | Type the following command, make sure you are still in the ``tutorial`` |
| | | directory (the directory with a ``development.ini`` in it): |
| | | |
| | | **On UNIX:** |
| | | On UNIX |
| | | ------- |
| | | |
| | | .. code-block:: text |
| | | |
| | | $ $VENV/bin/initialize_tutorial_db development.ini |
| | | |
| | | **On Windows:** |
| | | On Windows |
| | | ---------- |
| | | |
| | | .. code-block:: text |
| | | |
| | |
| | | |
| | | Start the application. |
| | | |
| | | **On UNIX:** |
| | | On UNIX |
| | | ------- |
| | | |
| | | .. code-block:: text |
| | | |
| | | $ $VENV/bin/pserve development.ini --reload |
| | | |
| | | **On Windows:** |
| | | On Windows |
| | | ---------- |
| | | |
| | | .. code-block:: text |
| | | |