• Home
  • Raw
  • Download

Lines Matching +full:command +full:- +full:and +full:- +full:control

8 a distutils extension as a separate project, and then have projects that need
12 commands and ``setup()`` arguments just by defining "entry points". These
13 are mappings from command or argument names to a specification of where to
15 Services and Plugins` above for some more background on entry points.)
19 ---------------
23 command, you might add something like this to your distutils extension
36 a ``setuptools.Command`` subclass.)
39 (e.g. by running "install" or "develop" with a site-packages installation
40 directory) the command(s) will be available to any ``setuptools``-based setup
41 scripts. It is not necessary to use the ``--command-packages`` option or
42 to monkeypatch the ``distutils.command`` package to install your commands;
49 When creating commands, and specially when defining custom ways of building
57 ----------------------------
60 are only supported through imperative execution and not supported through
83 object will have the initial value of the attribute set to ``None``, and the
85 a non-None value. Here's an example validation function::
95 the attribute name, and the attribute value. It should raise a
97 is invalid. Remember, your function will only be called with non-None values,
98 and the default value of arguments defined this way is always None. So, your
115 --------------------------------
119 ``Distribution.version`` from SCM-metadata may need to hook into the
126 first and the default is zero (0).
128 Plugins may read, alter, and set properties on the distribution, but each
133 .. _Adding new EGG-INFO Files:
135 Adding new EGG-INFO Files
136 -------------------------
139 develop plugins with application or framework-specific metadata included in
140 the plugins' EGG-INFO directory, for easy access via the ``pkg_resources``
143 that defines a new setup keyword, and then uses that data to write an EGG-INFO
144 file when the ``egg_info`` command is run.
146 The ``egg_info`` command looks for extension points in an ``egg_info.writers``
147 group, and calls them to write the files. Here's a simple example of a
149 lines that will be written to ``foo_bar.txt`` in the EGG-INFO directory of any
159 "foo_bar.txt = setuptools.command.egg_info:write_arg",
166 strings, and another one that looks up a setup argument and writes it to
177 three arguments: a ``egg_info`` command instance, the basename of the file to
178 write (e.g. ``foo_bar.txt``), and the actual full filename that should be
181 In general, writer functions should honor the command object's ``dry_run``
182 setting when writing files, and use the ``distutils.log`` object to do any
184 the ``cmd`` object's ``write_file()``, ``delete_file()``, and
189 .. _Adding Support for Revision Control Systems:
191 Adding Support for Revision Control Systems
192 -------------------------------------------------
197 - Git and Mercurial: :pypi:`setuptools_scm`
198 - SVN: :pypi:`setuptools_svn`
201 by another revision control system, you can do so by adding an entry point to
203 accepting a single directory name, and should yield all the filenames within
204 that directory (and any subdirectories thereof) that are under revision
205 control.
207 For example, if you were going to create a plugin for a revision control system
210 .. code-block:: python
215 And you would register it in a setup script using something like this::
223 Then, anyone who wants to use your plugin can simply install it, and their
226 It is not necessary to distribute source control plugins with projects that
227 simply use the other source control system, or to specify the plugins in
229 command, setuptools automatically records what files were found in the
231 to have revision control at all. However, if someone is working on a package
235 A few important points for writing revision control file finders:
238 passed-in directory name. Absolute paths are NOT allowed, nor are relative
239 paths that reference a parent directory of the passed-in directory.
247 * Your finder function SHOULD NOT raise any errors, and SHOULD deal gracefully
249 control system itself. It *may*, however, use ``distutils.log.warn()`` to