Lines Matching +full:require +full:- +full:directory
1 -----------------
3 -----------------
7 ``alias`` - Define shortcuts for commonly used commands
18 Setuptools therefore allows you to define "aliases" - shortcut names for
25 setup.py alias --global-config daily egg_info --tag-build=development
30 setup.py daily bdist_egg # generate a daily-build .egg file
31 setup.py daily sdist # generate a daily-build source distro
35 ``egg_info --tag-build=development``.
41 uses that command. For example, this (project-local) alias::
43 setup.py alias bdist_egg bdist_egg rotate -k1 -m.egg
50 You can remove a defined alias with the ``--remove`` (or ``-r``) option, e.g.::
52 setup.py alias --global-config --remove daily
56 Aliases can be defined on a project-specific, per-user, or sitewide basis. The
57 default is to define or remove a project-specific alias, but you can use any of
69 ``bdist_egg`` - Create a Python Egg for the project
77 are cross-platform (for "pure" packages), directly importable, and contain
80 directly, or they can be placed in a directory on ``sys.path`` and then
84 the project's metadata (``.egg-info``) directory. If you have added any extra
85 metadata files to the ``.egg-info`` directory, those files will be included in
86 the new egg file's metadata directory, for use by the egg runtime system or by
93 ``--dist-dir=DIR, -d DIR``
94 Set the directory where the ``.egg`` file will be placed. If you don't
95 supply this, then the ``--dist-dir`` setting of the ``bdist`` command
96 will be used, which is usually a directory named ``dist`` in the project
97 directory.
99 ``--plat-name=PLATFORM, -p PLATFORM``
104 distutils platform names, so it may ignore or reject eggs with non-standard
107 cross-compiling or doing some other unusual things, you might find a use
110 ``--exclude-source-files``
113 EGG-INFO directory or its subdirectories, since for example there may be
116 bundled for proprietary end-user applications, or for "embedded" scenarios
128 ``--keep-temp, -k``
129 Keep the contents of the ``--bdist-dir`` tree around after creating the
132 ``--bdist-dir=DIR, -b DIR``
133 Set the temporary directory for creating the distribution. The entire
134 contents of this directory are zipped to create the ``.egg`` file, after
138 ``--skip-build``
140 install-and-compress phases.
145 ``develop`` - Deploy the project source in "Development Mode"
154 The ``develop`` command works by creating an ``.egg-link`` file (named for the
156 ``site-packages`` directory, it also updates an ``easy-install.pth`` file so
161 a separate directory, as specified) that will ensure the project's dependencies
166 Last, but not least, the ``develop`` command invokes the ``build_ext -i``
168 up-to-date, and the ``egg_info`` command to ensure the project's metadata is
172 keep the project's scripts, metadata and extensions up-to-date. Most other
173 kinds of changes to your project should not require any build operations or
175 script (e.g. changing an entry point definition) require you to re-run the
180 have dependencies that need to be installed and you use ``--exclude-scripts``
186 ``--uninstall, -u``
187 Un-deploy the current project. You may use the ``--install-dir`` or ``-d``
188 option to designate the staging area. The created ``.egg-link`` file will
189 be removed, if present and it is still pointing to the project directory.
190 The project directory will be removed from ``easy-install.pth`` if the
191 staging area is Python's ``site-packages`` directory.
196 wrappers in the first place, if you use the ``--exclude-scripts`` (aka
197 ``-x``) option when you run ``develop`` to deploy the project.
199 ``--multi-version, -m``
200 "Multi-version" mode. Specifying this option prevents ``develop`` from
201 adding an ``easy-install.pth`` entry for the project(s) being deployed, and
203 removed upon successful deployment. In multi-version mode, no specific
205 ``pkg_resources.require()`` to put it on ``sys.path``, or you are running
207 script calls ``require()`` for you.)
209 Note that if you install to a directory other than ``site-packages``,
211 used in ``site-packages`` (at least in Python 2.3 and 2.4). So, if you use
212 the ``--install-dir`` or ``-d`` option (or they are set via configuration
213 file(s)) your project and its dependencies will be deployed in multi-
216 ``--install-dir=DIR, -d DIR``
217 Set the installation directory (staging area). If this option is not
220 will be the ``site-packages`` directory, but if you are using distutils
225 ``--script-dir=DIR, -s DIR``
226 Set the script installation directory. If you don't supply this option
228 an ``--install-dir`` (via command line or config file), then this option
229 defaults to the same directory, so that the scripts will be able to find
234 ``--exclude-scripts, -x``
238 ``--always-copy, -a``
240 are already present in another directory on ``sys.path``. By default, if
242 a directory on ``sys.path``, it will not be copied to the staging area.
244 ``--egg-path=DIR``
245 Force the generated ``.egg-link`` file to use a specified relative path
246 to the source directory. This can be useful in circumstances where your
247 installation directory is being shared by code running under multiple
250 respect to the installation directory. If you use this option when
262 ``egg_info`` - Create egg metadata and set build tags
265 This command performs two operations: it updates a project's ``.egg-info``
266 metadata directory (used by the ``bdist_egg``, ``develop``, and ``test``
272 commands. (It also generates the ``.egg-info/SOURCES.txt`` manifest file, which
278 group. See the section on :ref:`Adding new EGG-INFO Files` below for more details.
279 Note that using additional metadata writers may require you to include a
285 -----------------------
292 ``--tag-build=NAME, -b NAME``
294 processes "pre-release" version suffixes beginning with the letters "a"
299 always leave off --tag-build and then use one or both of the following
303 it on the command line using ``-b ""`` or ``--tag-build=""`` as an argument
306 ``--tag-date, -d``
307 Add a date stamp of the form "-YYYYMMDD" (e.g. "-20050528") to the
310 ``--no-date, -D``
319 explanation of pre- and post-release tags, as well as tips on how to choose and
323 location of the project's ``.egg-info`` directory. Commands that need to find
324 the project's source directory or metadata should get it from this setting:
328 --------------------------
330 ``--egg-base=SOURCEDIR, -e SOURCEDIR``
331 Specify the directory that should contain the .egg-info directory. This
333 necessarily the same as your project directory; some projects use a ``src``
335 to specify this directory, as it is normally determined from the
337 no ``package_dir`` set, this option defaults to the current directory.
341 ---------------------
345 setup.py egg_info --tag-date --tag-build=DEV bdist_egg
350 setup.py egg_info -RDb "" sdist bdist_egg
357 ``rotate`` - Delete outdated distribution files
361 directory will gradually fill up with older source and/or binary distribution
363 only the N most-recently modified files matching a given pattern.
365 ``--match=PATTERNLIST, -m PATTERNLIST``
366 Comma-separated list of glob patterns to match. This option is *required*.
367 The project name and ``-*`` is prepended to the supplied patterns, in order
369 have a shared distribution directory for multiple projects). Typically,
374 ``--keep=COUNT, -k COUNT``
376 identified by a pattern specified with the ``--match`` option, delete all
377 but the COUNT most-recently-modified files in that group. This option is
380 ``--dist-dir=DIR, -d DIR``
381 Directory where the distributions are. This defaults to the value of the
382 ``bdist`` command's ``--dist-dir`` option, which will usually be the
385 **Example 1**: Delete all .tar.gz files from the distribution directory, except
388 setup.py rotate --match=.tar.gz --keep=3
391 directory, except the most recently modified one for each Python version::
393 setup.py rotate --match=-py2.3*.egg,-py2.4*.egg --keep=1
398 ``saveopts`` - Save used options to a configuration file
402 since you also have to translate the configuration options from command-line
406 the ``mingw32`` C compiler, then saves the --compiler setting as the default
409 setup.py build --compiler=mingw32 saveopts
415 to the site-wide (global) distutils configuration::
417 setup.py build --compiler=mingw32 saveopts -g
423 setup.py saveopts -g build --compiler=mingw32
430 --------------------------
434 global or per-user configuration files, or to a manually-specified filename.
436 ``--global-config, -g``
438 package directory. You must have write access to that directory to use
439 this option. You also can't combine this option with ``-u`` or ``-f``.
441 ``--user-config, -u``
444 with ``-g`` or ``-f``.
446 ``--filename=FILENAME, -f FILENAME``
448 combine this option with ``-g`` or ``-u``. Note that if you specify a
449 non-standard filename, the ``distutils`` and ``setuptools`` will not
459 ``setopt`` - Set a distutils or setuptools option in a config file
469 setup.py setopt --command=build --option=compiler --set-value=mingw32
472 installation directory (short option names)::
474 setup.py setopt -c install -o install_lib -r
479 ``--command=COMMAND, -c COMMAND``
482 ``--option=OPTION, -o OPTION``
485 ``--set-value=VALUE, -s VALUE``
486 The value to set the option to. Not needed if ``-r`` or ``--remove`` is
489 ``--remove, -r``
499 ``test`` - Build package and run a unittest suite
507 When doing test-driven development, or running automated builds that need
512 project's source on ``sys.path``, after first running ``build_ext -i`` and
514 up-to-date.
527 non-``unittest`` tests in ``TestSuite`` objects. So, if you are using a test
534 you supply the ``-q`` or ``--quiet`` option, either as a global option to
535 the setup script (e.g. ``setup.py -q test``) or as an option for the ``test``
536 command itself (e.g. ``setup.py test -q``). There is one other option
539 ``--test-suite=NAME, -s NAME``
550 provide a ``--test-suite`` option, an error will occur.
557 ``upload`` - Upload source and/or egg distributions to PyPI
566 <https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives>`_.