diff options
| author | Chris McDonough <chrism@plope.com> | 2011-09-04 14:52:18 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-09-04 14:52:18 -0400 |
| commit | d0ec94cfd0a87e5c5c705b33267039eec6f0794f (patch) | |
| tree | 0aa58163418e16f27e5831d0fc5f8444c78f89b5 /docs | |
| parent | 3171fbe0e2c9e99cdadcc0a1fd4d583ddc7a7fca (diff) | |
| download | pyramid-d0ec94cfd0a87e5c5c705b33267039eec6f0794f.tar.gz pyramid-d0ec94cfd0a87e5c5c705b33267039eec6f0794f.tar.bz2 pyramid-d0ec94cfd0a87e5c5c705b33267039eec6f0794f.zip | |
Add Windows analogues to all command lines. Closes #144
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/narr/install.rst | 16 | ||||
| -rw-r--r-- | docs/narr/project.rst | 74 |
2 files changed, 65 insertions, 25 deletions
diff --git a/docs/narr/install.rst b/docs/narr/install.rst index f543753ce..a1e7ce382 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -18,10 +18,10 @@ run :app:`Pyramid`. Python 2.6.6, and Python 2.7.2. :app:`Pyramid` does not run under any version of Python before 2.5, and does not yet run under Python 3.X. -:app:`Pyramid` is known to run on all popular Unix-like systems such as +:app:`Pyramid` is known to run on all popular UNIX-like systems such as Linux, MacOS X, and FreeBSD as well as on Windows platforms. It is also -known to run on Google's App Engine, :term:`PyPy` (1.5), and :term:`Jython` -(2.5.2). +known to run on Google's App Engine, :term:`PyPy` (1.5 and 1.6), and +:term:`Jython` (2.5.2). :app:`Pyramid` installation does not require the compilation of any C code, so you need only a Python interpreter that meets the @@ -204,9 +204,9 @@ into your setuptools-enabled Python interpreter, use the $ easy_install virtualenv -This command should succeed, and tell you that the virtualenv package -is now installed. If it fails due to permission errors, you may need -to install it as your system's administrative user. For example: +This command should succeed, and tell you that the virtualenv package is now +installed. If it fails due to permission errors, you may need to install it +as your system's administrative user. For example: .. code-block:: text @@ -238,7 +238,7 @@ following: depending on the packages you've already got installed into your Python's "main" site-packages dir. -.. warning:: If you're on UNIX, *do not* use ``sudo`` to run the +.. warning:: *do not* use ``sudo`` to run the ``virtualenv`` script. It's perfectly acceptable (and desirable) to create a virtualenv as a normal user. @@ -250,7 +250,7 @@ Installing :app:`Pyramid` Into the Virtual Python Environment After you've got your ``env`` virtualenv installed, you may install :app:`Pyramid` itself using the following commands from within the -virtualenv (``env``) directory you created in the last step: +virtualenv (``env``) directory you created in the last step. .. code-block:: text diff --git a/docs/narr/project.rst b/docs/narr/project.rst index 2bd2122c3..102078353 100644 --- a/docs/narr/project.rst +++ b/docs/narr/project.rst @@ -92,25 +92,38 @@ the ``virtualenv`` command. To start a :app:`Pyramid` :term:`project`, use the ``paster`` facility installed within the virtualenv. In :ref:`installing_chapter` we called the virtualenv directory ``env``; the following command assumes that our current working directory is that -directory. +directory. We'll choose the ``pyramid_starter`` scaffold for this purpose. -We'll choose the ``pyramid_starter`` scaffold for this purpose. +On UNIX: .. code-block:: text $ bin/paster create -t pyramid_starter +Or on Windows: + +.. code-block:: text + + $ Scripts\paster.exe create -t pyramid_starter + The above command uses the ``paster create`` command to create a project with the ``pyramid_starter`` scaffold. To use a different scaffold, such as -``pyramid_routesalchemy``, you'd just change the last argument. For example: +``pyramid_routesalchemy``, you'd just change the last argument. For example, +on UNIX: .. code-block:: text $ bin/paster create -t pyramid_routesalchemy +Or on Windows: + +.. code-block:: text + + $ Scripts\paster.exe create -t pyramid_routesalchemy + ``paster create`` will ask you a single question: the *name* of the project. You should use a string without spaces and with only letters in it. Here's -sample output from a run of ``paster create`` for a project we name +sample output from a run of ``paster create`` on UNIX for a project we name ``MyProject``: .. code-block:: text @@ -135,9 +148,9 @@ sample output from a run of ``paster create`` for a project we name .. note:: You may encounter an error when using ``paster create`` if a dependent Python package is not installed. This will result in a traceback - ending in ``pkg_resources.DistributionNotFound: <package name>``. - Simply run ``bin/easy_install``, with the missing package name from the - error message to work around this issue. + ending in ``pkg_resources.DistributionNotFound: <package name>``. Simply + run ``bin/easy_install`` (or ``Script\easy_install.exe`` on Windows), with + the missing package name from the error message to work around this issue. As a result of invoking the ``paster create`` command, a project is created in a directory named ``MyProject``. That directory is a :term:`project` @@ -175,18 +188,29 @@ command ``python setup.py develop`` The file named ``setup.py`` will be in the root of the paster-generated project directory. The ``python`` you're invoking should be the one that -lives in the ``bin`` directory of your virtual Python environment. Your -terminal's current working directory *must* be the newly created project -directory. For example: +lives in the ``bin`` (or ``Scripts`` on Windows) directory of your virtual +Python environment. Your terminal's current working directory *must* be the +newly created project directory. + +On UNIX: .. code-block:: text + $ cd MyProject $ ../bin/python setup.py develop -Elided output from a run of this command is shown below: +Or on Windows: + +.. code-block:: text + + $ cd MyProject + $ ..\Scripts\python.exe setup.py develop + +Elided output from a run of this command on UNIX is shown below: .. code-block:: text + $ cd MyProject $ ../bin/python setup.py develop ... Finished processing dependencies for MyProject==0.0 @@ -206,17 +230,25 @@ Running The Tests For Your Application To run unit tests for your application, you should invoke them using the Python interpreter from the :term:`virtualenv` you created during :ref:`installing_chapter` (the ``python`` command that lives in the ``bin`` -directory of your virtualenv): +directory of your virtualenv). + +On UNIX: .. code-block:: text $ ../bin/python setup.py test -q -Here's sample output from a test run: +Or on Windows: + +.. code-block:: text + + $ ..\Scripts\python.exe setup.py test -q + +Here's sample output from a test run on UNIX: .. code-block:: text - $ python setup.py test -q + $ ../bin/python setup.py test -q running test running egg_info writing requirements to MyProject.egg-info/requires.txt @@ -254,13 +286,21 @@ Running The Project Application Once a project is installed for development, you can run the application it represents using the ``paster serve`` command against the generated -configuration file. In our case, this file is named ``development.ini``: +configuration file. In our case, this file is named ``development.ini``. + +On UNIX: .. code-block:: text $ ../bin/paster serve development.ini -Here's sample output from a run of ``paster serve``: +On Windows: + +.. code-block:: text + + $ ..\Scripts\paster.exe serve development.ini + +Here's sample output from a run of ``paster serve`` on UNIX: .. code-block:: text @@ -279,7 +319,7 @@ restart. This typically makes development easier, as changes to Python code made within a :app:`Pyramid` application is not put into effect until the server restarts. -For example: +For example, on UNIX: .. code-block:: text |
