| | |
| | | |
| | | .. code-block:: bash |
| | | |
| | | cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master |
| | | cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout 1.10-branch |
| | | |
| | | If prompted for the first item, accept the default ``yes`` by hitting return. |
| | | |
| | |
| | | #. ``pytest.ini`` is a configuration file for running tests. |
| | | |
| | | #. ``setup.py`` is the file you'll use to test and distribute your application. |
| | | It is a standard :term:`setuptools` ``setup.py`` file. |
| | | It is a standard :term:`Setuptools` ``setup.py`` file. |
| | | |
| | | .. index:: |
| | | single: PasteDeploy |
| | |
| | | code into a version control repository, ``setup.py sdist`` places only *Python |
| | | source files* (files ending with a ``.py`` extension) into tarballs generated |
| | | by ``python setup.py sdist``. This means, for example, if your project was not |
| | | checked into a setuptools-compatible source control system, and your project |
| | | checked into a Setuptools-compatible source control system, and your project |
| | | directory didn't contain a ``MANIFEST.in`` file that told the ``sdist`` |
| | | machinery to include ``*.pt`` files, the ``myproject/templates/mytemplate.pt`` |
| | | file would not be included in the generated tarball. |
| | |
| | | The ``MANIFEST.in`` file contains declarations which tell it to include files |
| | | like ``*.pt``, ``*.css`` and ``*.js`` in the generated tarball. If you include |
| | | files with extensions other than the files named in the project's |
| | | ``MANIFEST.in`` and you don't make use of a setuptools-compatible version |
| | | ``MANIFEST.in`` and you don't make use of a Setuptools-compatible version |
| | | control system, you'll need to edit the ``MANIFEST.in`` file and include the |
| | | statements necessary to include your new files. See |
| | | https://docs.python.org/2/distutils/sourcedist.html#principle for more |
| | | information about how to do this. |
| | | |
| | | You can also delete ``MANIFEST.in`` from your project and rely on a setuptools |
| | | You can also delete ``MANIFEST.in`` from your project and rely on a :term:`Setuptools` |
| | | feature which simply causes all files checked into a version control system to |
| | | be put into the generated tarball. To allow this to happen, check all the |
| | | files that you'd like to be distributed along with your application's Python |
| | | files into Subversion. After you do this, when you rerun ``setup.py sdist``, |
| | | all files checked into the version control system will be included in the |
| | | tarball. If you don't use Subversion, and instead use a different version |
| | | control system, you may need to install a setuptools add-on such as |
| | | control system, you may need to install a :term:`Setuptools` add-on such as |
| | | ``setuptools-git`` or ``setuptools-hg`` for this behavior to work properly. |
| | | |
| | | .. index:: |
| | |
| | | ``setup.py`` |
| | | ~~~~~~~~~~~~ |
| | | |
| | | The ``setup.py`` file is a :term:`setuptools` setup file. It is meant to be |
| | | The ``setup.py`` file is a :term:`Setuptools` setup file. It is meant to be |
| | | used to define requirements for installing dependencies for your package and |
| | | testing, as well as distributing your application. |
| | | |
| | |
| | | :language: python |
| | | :linenos: |
| | | |
| | | The ``setup.py`` file calls the setuptools ``setup`` function, which does |
| | | The ``setup.py`` file calls the :term:`Setuptools` ``setup`` function, which does |
| | | various things depending on the arguments passed to ``pip`` on the command |
| | | line. |
| | | |
| | | Within the arguments to this function call, information about your application |
| | | is kept. While it's beyond the scope of this documentation to explain |
| | | everything about setuptools setup files, we'll provide a whirlwind tour of what |
| | | everything about :term:`Setuptools` setup files, we'll provide a whirlwind tour of what |
| | | exists in this file in this section. |
| | | |
| | | Your application's name can be any string; it is specified in the ``name`` |