Lines Matching full:distribution

33 Eggs are a distribution format for Python modules, similar in concept to
35 However, unlike a pure distribution format, eggs can also be installed and
42 a distribution to co-exist in the same Python installation, with individual
60 distribution
63 importable distribution
67 pluggable distribution
68 An importable distribution whose filename unambiguously identifies its
82 necessarily active. More than one distribution (i.e. release version) for
87 ``sys.path``. At most one distribution (release version) of a given
99 default version of a distribution that is available to software that
162 the package's contents.) Whenever a Distribution's ``activate()`` method
220 affected distribution is activated. For example::
258 ``installer`` callback that will be invoked when a needed distribution
260 display a dialog, automatically download the needed distribution, or
266 Locate distribution specified by ``requires`` and run its ``script_name``
272 act as a proxy for the "real" scripts in a distribution. A wrapper script
277 probably want to use the ``run_script()`` method of a ``Distribution``
289 advertised by an individual distribution, there is no particular ordering.
316 distribution for a given project can be active in a given ``WorkingSet``.
324 Find a distribution matching ``req`` (a ``Requirement`` instance).
325 If there is an active distribution for the requested project, this
327 ``req``. But, if there is an active distribution for the project and it
329 If there is no active distribution for the requested project, ``None``
339 requirement that cannot be met by an already-installed distribution; it
340 should return a ``Distribution`` or ``None``. (See the ``obtain()`` method
352 doesn't already have a distribution active in the set. If it's
376 a new distribution (such as a plug-in component) has been added to a working
381 Invoke ``callback(distribution)`` once for each active distribution that is
474 An "environment" is a collection of ``Distribution`` objects, usually ones
512 specified at creation time, and only if the distribution hasn't already
513 been added. (i.e., adding the same distribution more than once is a no-op.)
519 Is distribution ``dist`` acceptable for this environment? If it's not
524 Add a distribution or environment to an ``Environment`` instance, returning
534 Add a distribution or environment to an ``Environment`` instance
541 Find distribution best matching ``req`` and usable on ``working_set``
544 suitable distribution is already active. (This may raise
546 active in the specified ``working_set``.) If a suitable distribution isn't
547 active, this method returns the newest distribution in the environment
548 that meets the ``Requirement`` in ``req``. If no suitable distribution is
557 to attempt other ways of obtaining a distribution before falling back
578 distribution needs.
635 If ``dist_or_version`` is a ``Distribution`` object, its project name must
691 or group, either from a specific distribution or from all active distributions
709 entry points will be included in the distribution's metadata. For more
712 Each project distribution can advertise at most one entry point of a given
728 In the following functions, the ``dist`` argument can be a ``Distribution``
731 ``Requirement``, the specified distribution is located (and added to sys.path
732 if not already present). An error will be raised if a matching distribution is
741 Load the named entry point from the specified distribution, or raise
746 the specified distribution. Returns ``None`` if the distribution has not
750 Return the distribution's entry point map for ``group``, or the full entry
751 map for the distribution. This function always returns a dictionary,
752 even if the distribution advertises no entry points. If ``group`` is given,
765 sys.path. (Within entry points for a particular distribution, however,
787 distribution needs in order to provide this entry point. When the
792 a ``Distribution`` instance.
825 distribution.
844 distribution. If ``env`` is supplied, it must be an ``Environment``, and it
848 ``Distribution`` instance or None.
859 ``Distribution`` Objects
862 ``Distribution`` objects represent collections of Python code that may or may
865 the distribution depends on, what entry points the distribution advertises, and
872 Most commonly, you'll obtain ``Distribution`` objects from a ``WorkingSet`` or
875 available distributions, respectively.) You can also obtain ``Distribution``
887 Return a ``Distribution`` object for a given ``Requirement`` or string.
888 If ``dist_spec`` is already a ``Distribution`` instance, it is returned.
890 it is used to locate and activate a matching distribution, which is then
894 or creating a new distribution format, you may also need to create
895 ``Distribution`` objects directly, using one of the three constructors below.
898 access any resources or metadata associated with the distribution. ``metadata``
900 If it is None, an ``EmptyProvider`` is used instead. ``Distribution`` objects
904 ``Distribution.from_location(location, basename, metadata=None, **kw)`` (classmethod)
905 Create a distribution for ``location``, which must be a string such as a
907 ``basename`` is a string naming the distribution, like ``Foo-1.2-py2.4.egg``.
910 properties of the created distribution. Any additional keyword arguments
911 are forwarded to the ``Distribution()`` constructor.
913 ``Distribution.from_filename(filename, metadata=None**kw)`` (classmethod)
914 Create a distribution by parsing a local filename. This is a shorter way
915 of saying ``Distribution.from_location(normalize_path(filename),
917 distribution whose location is the normalize form of the filename, parsing
919 additional keyword arguments are forwarded to the ``Distribution()``
922 ``Distribution(location,metadata,project_name,version,py_version,platform,precedence)``
923 Create a distribution by setting its properties. All arguments are
926 ``EGG_DIST``; for more details see ``precedence`` under `Distribution
932 ``Distribution`` Attributes
936 A string indicating the distribution's location. For an importable
937 distribution, this is the string that would be added to ``sys.path`` to
939 simply a filename, URL, or other way of locating the distribution.
942 A string, naming the project that this distribution is for. Project names
944 projects on PyPI. When a ``Distribution`` is constructed, the
958 A string denoting what release of the project this distribution contains.
959 When a ``Distribution`` is constructed, the ``version`` argument is passed
963 ``Distribution`` to try to discover its version by reading its ``PKG-INFO``
969 distribution's ``version``. ``dist.parsed_version`` is a shortcut for
973 ``parsed_version`` may result in a ``ValueError`` if the ``Distribution``
978 The major/minor Python version the distribution supports, as a string.
982 A string representing the platform the distribution is intended for, or
983 ``None`` if the distribution is "pure Python" and therefore cross-platform.
987 A distribution's ``precedence`` is used to determine the relative order of
1001 ``Distribution`` Methods
1005 Ensure distribution is importable on ``path``. If ``path`` is None,
1006 ``sys.path`` is used instead. This ensures that the distribution's
1008 namespace package fixups or declarations. (That is, if the distribution
1010 and that the distribution's contents for those namespace packages are
1015 that ensures this method is called whenever a distribution is added to it.
1022 Return a ``Requirement`` instance that matches this distribution's project
1026 List the ``Requirement`` objects that specify this distribution's
1028 of "extras" defined by the distribution, and the list returned will then
1032 Create a copy of the distribution. Any supplied keyword arguments override
1033 the corresponding argument to the ``Distribution()`` constructor, allowing
1034 you to change some of the copied distribution's attributes.
1037 Return what this distribution's standard filename should be, not including
1038 the ".egg" extension. For example, a distribution for project "Foo"
1041 converted to underscores. (``Distribution.from_location()`` will convert
1045 Distribution objects are hashed and compared on the basis of their parsed
1050 by the distribution. See the section above on `Entry Points`_ for more
1055 such point is advertised by this distribution.
1066 the entry point isn't advertised by this distribution, or there is some
1069 In addition to the above methods, ``Distribution`` objects also implement all
1086 If the distribution was created with a ``metadata`` argument, these resource and
1088 Otherwise, they are delegated to an ``EmptyProvider``, so that the distribution
1090 so that supporting custom importers or new distribution formats can be done
1122 importable (i.e., be in a distribution or directory on ``sys.path``), and the
1127 multiple distributions, and is therefore ambiguous as to which distribution
1132 distribution is added to the ``WorkingSet`` and ``sys.path`` if one was not
1135 relative to the root of the identified distribution; i.e. its first path
1137 distribution.
1171 distribution format involved.
1181 resource. If the resource is in an archive distribution (such as a zipped
1228 for a new distribution archive format, you may need to use the following
1271 distribution. Metadata resources are virtual files or directories containing
1272 information about the distribution, such as might be used by an extensible
1279 or ``IResourceProvider`` interfaces. ``Distribution`` objects implement this
1285 ``Distribution`` from the current working set (searching the current
1286 ``Environment`` if necessary and adding the newly found ``Distribution``
1291 you get back may not be a pluggable distribution, depending on the method
1305 The methods provided by objects (such as ``Distribution`` instances) that
1351 run a script that doesn't exist in the distribution it was requested from.
1354 A distribution needed to fulfill a requirement could not be found.
1361 One of the "extras" requested was not recognized by the distribution it
1391 ``Distribution`` instances found under that path item. (The ``only`` flag,
1392 if true, means the finder should yield only ``Distribution`` objects whose
1499 has no metadata or resources. ``Distribution`` objects created without
1507 Create an ``IResourceProvider`` for a filesystem-based distribution, where
1509 is the filesystem location of the distribution's metadata directory.
1515 Create an ``IResourceProvider`` for a zipfile-based distribution. The
1595 ``Requirement`` string, as a distribution name, or a PyPI project name.
1643 Return true if a distribution built on the ``provided`` platform may be used
1733 * Added the ``extras`` attribute to ``Distribution``, the ``find_plugins()``
1740 versions for safe use in constructing egg filenames from a Distribution
1743 * Added ``Distribution.clone()`` method, and keyword argument support to other
1744 ``Distribution`` constructors.
1750 * Don't raise an error when an invalid (unfinished) distribution is found
1788 * When a distribution is activated, it now checks whether any contained
1804 EntryPoint, and Distribution objects' extras handling.
1831 ``Distribution`` (by calling ``require()`` if a suitable distribution
1835 path will be module-relative, rather than relative to the distribution's
1838 * ``Distribution`` objects now implement the ``IResourceProvider`` and
1842 * ``Distribution`` and ``Requirement`` both have a ``project_name``
1846 * The ``path`` attribute of ``Distribution`` objects is now ``location``,
1848 time now). The ``location`` of ``Distribution`` objects in the filesystem
1851 (including ``Distribution.from_filename()``) ensure this invariant, but if
1852 you use a more generic API like ``Distribution()`` or
1853 ``Distribution.from_location()`` you should take care that you don't
1854 create a distribution with an un-normalized filesystem path.
1856 * ``Distribution`` objects now have an ``as_requirement()`` method that
1857 returns a ``Requirement`` for the distribution's project name and version.
1859 * Distribution objects no longer have an ``installed_on()`` method, and the
1909 ``Requirement`` instance. The callable must return a ``Distribution``
1910 object, or ``None`` if no distribution is found. This feature is used by
1928 arbitrary distribution names and versions found on PyPI.