#3355: Changes to the User Guide's Entry Points page -- by :user:`codeandfire`
#3361: Further minor corrections to the Entry Points page -- by :user:`codeandfire`
#3363: Rework some documentation pages to de-emphasize distutils
and the history
of packaging in the Python ecosystem. The focus of these changes is to make the
documentation easier to read for new users.
#3364: Update documentation about dependency management, removing mention to
the deprecated dependency_links
and adding some small improvements.
#3367: Extracted text about automatic resource extraction and the zip-safe flag
from userguide/miscellaneous
to deprecated/resource_extraction
and
deprecated/zip_safe
.
Extracted text about additional metadata files from
userguide/miscellaneous
into the existing userguide/extension
document.
Updated userguide/extension
to better reflect the status of the
setuptools project.
Removed userguide/functionalities_rewrite
(a virtually empty part of the
docs).
package_data
glob pattern matching for dotfiles -- by :user:`comabrewer`
package_dir
configuration.CHANGES.rst
-- by :user:`codeandfire`
test_setup_install_includes_dependencies
to work with custom PYTHONPATH
–- by :user:`hroncok`
namespace_packages
to raise an error instead of
warning.#3262: Formally added deprecation messages for namespace_packages
.
The methodology that uses pkg_resources
and namespace_packages
for
creating namespaces was already discouraged by the :doc:`setuptools docs
</userguide/package_discovery>` and the
:doc:`Python Packaging User Guide <PyPUG:guides/packaging-namespace-packages>`,
therefore this change just make the deprecation more official.
Users can consider migrating to native/implicit namespaces (as introduced in
PEP 420).
#3308: Relying on include_package_data
to ensure sub-packages are automatically
added to the build wheel distribution (as "data") is now considered a
deprecated practice.
This behaviour was controversial and caused inconsistencies (#3260).
Instead, projects are encouraged to properly configure packages
or use
discovery tools. General information can be found in :doc:`userguide/package_discovery`.
**
) in package_data
. -- by :user:`nullableVoidPtr`
install_requires
(in setup.py
) and
dependencies
(in pyproject.toml
) are specified.
The configuration in pyproject.toml
will take precedence over setup.py
(in accordance with PEP 621). A warning was added to inform users.#3307: Added introduction to references/keywords.
Added deprecation tags to test kwargs.
Moved userguide/keywords to deprecated section.
Clarified in deprecated doc what keywords came from distutils and which were added or changed by setuptools.
pyparsing
to 3.0.8 to avoid problems with
upcoming deprecation in Python 3.11.importlib-metadata
.setup.cfg
examples used when testing setuptools.config
.package_dir
obtained via auto-discovery.setup.py develop --user
install to the user site packages directory even if it is disabled in the current interpreter.install_as_egg
-- by :user:`delijati`
dist-info
command.readme
specified as dynamic in pyproject.toml
from being dynamically specified in setup.py
.setupcfg_examples.txt
in sdist
.setupcfg_examples.txt
prior to
running tests. By caching these files it should be possible to run the test suite
offline.trove-classifiers
to facilitate reproducibility.pyproject.toml
validation via validate-pyproject
v0.7.1.pyproject.toml
.
This tool can be executed via tox -e generate-validation-code
.#3215: Ignored a subgroup of invalid pyproject.toml
files that use the [project]
table to specify only requires-python
(transitional).
Warning
Please note that future releases of setuptools will halt the build process
if a pyproject.toml
file that does not match doc:the PyPA Specification
<PyPUG:specifications/declaring-project-metadata> is given.
#3215: Updated pyproject.toml
validation, as generated by validate-pyproject==0.6.1
.
#3218: Prevented builds from erroring if the project specifies metadata via
pyproject.toml
, but uses other files (e.g. setup.py
) to complement it,
without setting dynamic
properly.
Important
This is a transitional behaviour.
Future releases of setuptools
may simply ignore externally set metadata
not backed by dynamic
or even halt the build with an error.
#3224: Merge changes from pypa/distutils@e1d5c9b1f6
pyproject.toml
example in Quickstart -- by :user:`pablo-cardenas`.optional-dependencies
is set in pyproject.toml
.setup.py install
.
Note that calling setup.py install
directly is still deprecated and
will be removed in future versions of setuptools
.
Please check the release notes for :ref:`setup_install_deprecation_note`.setuptools.convert_path
to an internal function that is not exposed
as part of setuptools API.
Future releases of setuptools
are likely to remove this function.#3202: Changed behaviour of auto-discovery to not explicitly expand package_dir
for flat-layouts and to not use relative paths starting with ./
.
#3203: Prevented pyproject.toml
parsing from overwriting
dist.include_package_data
explicitly set in setup.py
with default
value.
#3208: Added a warning for non existing files listed with the file
directive in
setup.cfg
and pyproject.toml
.
#3208: Added a default value for dynamic classifiers
in pyproject.toml
when
files are missing and errors being ignored.
#3211: Disabled auto-discovery when distribution class has a configuration
attribute (e.g. when the setup.py
script contains setup(...,
configuration=...)
). This is done to ensure extension-only packages created
with numpy.distutils.misc_util.Configuration
are not broken by the safe
guard
behaviour to avoid accidental multiple top-level packages in a flat-layout.
Note
Users that don't set packages
, py_modules
, or configuration
are
still likely to observe the auto-discovery behavior, which may halt the
build if the project contains multiple directories and/or multiple Python
files directly under the project root.
To disable auto-discovery please explicitly set either packages
or
py_modules
. Alternatively you can also configure :ref:`custom-discovery`.
#3068: Deprecated setuptools.config.read_configuration
,
setuptools.config.parse_configuration
and other functions or classes
from setuptools.config
.
Users that still need to parse and process configuration from setup.cfg
can
import a direct replacement from setuptools.config.setupcfg
, however this
module is transitional and might be removed in the future
(the setup.cfg
configuration format itself is likely to be deprecated in the future).
#2894: If you purposefully want to create an "empty distribution", please be aware that some Python files (or general folders) might be automatically detected and included.
Projects that currently don't specify both packages
and py_modules
in their
configuration and contain extra folders or Python files (not meant for distribution),
might see these files being included in the wheel archive or even experience
the build to fail.
You can check details about the automatic discovery (and how to configure a different behaviour) in :doc:`/userguide/package_discovery`.
#3067: If the file pyproject.toml
exists and it includes project
metadata/config (via [project]
table or [tool.setuptools]
),
a series of new behaviors that are not backward compatible may take place:
include_package_data
will be considered to be True
.pyproject.toml
file according
to PEP 621 specification.pyproject.toml
will take precedence over those
specified in setup.cfg
or setup.py
.#2887: [EXPERIMENTAL] Added automatic discovery for py_modules
and packages
-- by :user:`abravalheri`.
Setuptools will try to find these values assuming that the package uses either
the src-layout (a src
directory containing all the packages or modules),
the flat-layout (package directories directly under the project root),
or the single-module approach (an isolated Python file, directly under
the project root).
The automatic discovery will also respect layouts that are explicitly
configured using the package_dir
option.
For backward-compatibility, this behavior will be observed only if both
py_modules
and packages
are not set.
(Note: specifying ext_modules
might also prevent auto-discover from
taking place)
If setuptools detects modules or packages that are not supposed to be in the
distribution, please manually set py_modules
and packages
in your
setup.cfg
or setup.py
file.
If you are using a flat-layout, you can also consider switching to
src-layout.
#2887: [EXPERIMENTAL] Added automatic configuration for the name
metadata
-- by :user:`abravalheri`.
Setuptools will adopt the name of the top-level package (or module in the case
of single-module distributions), only when name
is not explicitly
provided.
Please note that it is not possible to automatically derive a single name when the distribution consists of multiple top-level packages or modules.
#3066: Added vendored dependencies for :pypi:`tomli`, :pypi:`validate-pyproject`.
These dependencies are used to read pyproject.toml
files and validate them.
#3067: [EXPERIMENTAL] When using pyproject.toml
metadata,
the default value of include_package_data
is changed to True
.
#3068: [EXPERIMENTAL] Add support for pyproject.toml
configuration
(as introduced by PEP 621). Configuration parameters not covered by
standards are handled in the [tool.setuptools]
sub-table.
In the future, existing setup.cfg
configuration
may be automatically converted into the pyproject.toml
equivalent before taking effect
(as proposed in #1688). Meanwhile users can use automated tools like
:pypi:`ini2toml` to help in the transition.
Please note that the legacy backend is not guaranteed to work with
pyproject.toml
configuration.
-- by :user:`abravalheri`
#3125: Implicit namespaces (as introduced in PEP 420) are now considered by default
during :doc:`package discovery </userguide/package_discovery>`, when
setuptools
configuration and project metadata are added to the
pyproject.toml
file.
To disable this behaviour, use namespaces = False
when explicitly setting
the [tool.setuptools.packages.find]
section in pyproject.toml
.
This change is backwards compatible and does not affect the behaviour of
configuration done in setup.cfg
or setup.py
.
#3152: [EXPERIMENTAL] Added support for attr:
and cmdclass
configurations
in setup.cfg
and pyproject.toml
when package_dir
is implicitly
found via auto-discovery.
#3178: Postponed importing ctypes
when hiding files on Windows.
This helps to prevent errors in systems that might not have libffi
installed.
#3179: Merge with pypa/distutils@267dbd25ac
setuptools
via pyproject.toml
(using standard project metadata).setuptools.config
by separating configuration parsing (specific
to the configuration file format, e.g. setup.cfg
) and post-processing
(which includes directives such as file:
that can be used across different
configuration formats).MANIFEST.in
, that include links to PyPUG docs
and more prominent mentions to using a revision control system plugin as an
alternative.pkg_resources
as the recommended way of accessing data
files, in favour of importlib.resources.
Additionally more emphasis was put on the fact that package data files reside
inside the package directory (and therefore should be read-only).setuptools
wheel or sdist for being
used during tests with virtual environments.
Paths for these pre-built distribution files can now be set via the environment
variables: PRE_BUILT_SETUPTOOLS_SDIST
and PRE_BUILT_SETUPTOOLS_WHEEL
.__name__
to ensure consistent importing from inside and out.pkg_resources
for entry point handling.Warning
Users trying to install the unmaintained :pypi:`pathlib` backport
from PyPI/sdist
/source code may find problems when using setuptools >= 60.9.0
.
This happens because during the installation, the unmaintained
implementation of pathlib
is loaded and may cause compatibility problems
(it does not expose the same public API defined in the Python standard library).
Whenever possible users should avoid declaring pathlib
as a dependency.
An alternative is to pre-build a wheel for pathlib
using a separated
virtual environment with an older version of setuptools and install the
library directly from the pre-built wheel.
concurrent.futures
import lazy in vendored more_itertools
package to a avoid importing threading as a side effect (which caused
gevent/gevent#1865).
-- by :user:`maciejp-ro`
Home-page
in metadata if no url
is specified. -- by :user:`cdce8p`
setuptools.build_meta
in a in-tree
custom backend. This is a PEP 517-compliant way of dynamically specifying
build dependencies (e.g. when platform, OS and other markers are not enough).
-- by :user:`abravalheri`
wheel
to
PEP 517 requirements -- by :user:`webknjaz`
super().__init__()
-- by :user:`imba-tjd`
.origin
attribute of the distutils
module to the module's __file__
.requires
sorting when installing wheels as an egg dir._distutils_hack
-- by :user:`tiran`
sphinx-favicon
.scour
package.#2862: Added integration tests that focus on building and installing some packages in
the Python ecosystem via pip
-- by :user:`abravalheri`
#2952: Modified "vendoring" logic to keep license files.
#2968: Improved isolation for some tests that where inadvertently using the project
root for builds, and therefore creating directories (e.g. build
, dist
,
*.egg-info
) that could interfere with the outcome of other tests
-- by :user:`abravalheri`.
#2968: Introduced new test fixtures venv
, venv_without_setuptools
,
bare_venv
that rely on the jaraco.envs
package.
These new test fixtures were also used to remove the (currently problematic)
dependency on the pytest_virtualenv
plugin.
#2968: Removed tmp_src
test fixture. Previously this fixture was copying all the
files and folders under the project root, including the .git
directory,
which is error prone and increases testing time.
Since tmp_src
was used to populate virtual environments (installing the
version of setuptools
under test via the source tree), it was replaced by
the new setuptools_sdist
and setuptools_wheel
fixtures (that are build
only once per session testing and can be shared between all the workers for
read-only usage).
distutils.log.*
, use logging.getLogger(name).*
.pytest-virtualenv
in setup.cfg
.
PyPI rejects packages with dependencies external to itself.
Instead the test dependency was overwritten via tox.ini
distutils
is
deprecated. Users should extend classes provided by setuptools instead.distutils.errors
via setuptools.errors
.setuptools.errors
as a way of handling custom command
errors.distutils.commands
and
distutils.errors
in the porting guide.setup.py
-less projects in editable mode with :doc:`pip v21.1+
<pip:index>`, only having setup.cfg
and pyproject.toml
in
project root -- by :user:`webknjaz`
build_py
commands inheriting directly from
:mod:`distutils`, while still handling include_package_data=True
for
sdist
.include_package_data
and packages_data
in sdist
by replacing the loop breaking mechanism between the sdist
and
egg_info
commands -- by :user:`abravalheri`
data_files
option from the example in the
declarative configuration docs -- by :user:`abravalheri`
data_files
option from dict
to section
in
declarative configuration docs (to match previous example) -- by
:user:`abravalheri`
setup.py install
and easy_install
commands are now officially deprecated. Use other standards-based installers (like pip) and builders (like build). Workloads reliant on this behavior should pin to this major version of Setuptools. See Why you shouldn't invoke setup.py directly for more background.bdist_rpm
command. Binary packages should be built as wheels instead.
-- by :user:`hugovk`
configparser
's readfp
with read_file
, deprecated since Python 3.2.
-- by :user:`hugovk`
setup_requires
. Users are encouraged instead to migrate to PEP 518 build-system.requires
in pyproject.toml
. Users reliant on setup_requires
should consider pinning to this major version to avoid disruption.--owner
and --group
options to the sdist
command,
for specifying file ownership within the produced tarball (similarly
to the corresponding distutils sdist
options).use_2to3
is supplied but set to a false value.use_2to3
is supplied.[options.data_files]
values.SETUPTOOLS_EXT_SUFFIX
environment variable to override the suffix normally detected from the sysconfig
module.VSCMD_ARG_TGT_ARCH
environment variable.entry_points
are
supported in declarative configuration.
Tried to make the reading flow a bit leaner, gather some information
that were a bit dispersed.MANIFEST.in
but matched by either
the license_file
(deprecated) or license_files
options,
will be nevertheless included in the source distribution. - by :user:`cdce8p`
License-File
(multiple) to the output package metadata.
The field will contain the path of a license file, matched by the
license_file
(deprecated) and license_files
options,
relative to .dist-info
. - by :user:`cdce8p`
PKG-INFO
. - by :user:`cdce8p`
DeprecationWarning
due to threading.Thread.setDaemon
in tests -- by :user:`tirkarthi`
license_file
option is now marked as deprecated.
Use license_files
instead. -- by :user:`cdce8p`
license_file
nor license_files
is specified, the sdist
option will now auto-include files that match the following patterns:
LICEN[CS]E*
, COPYING*
, NOTICE*
, AUTHORS*
.
This matches the behavior of bdist_wheel
. -- by :user:`cdce8p`
license_file
and license_files
options now support glob patterns. -- by :user:`cdce8p`
VendorImporter.find_spec()
method to get rid
of ImportWarning
that Python 3.10 emits when only the old-style
importer hooks are present -- by :user:`webknjaz`
license_files
option. -- by :user:`cdce8p`
bdist_wininst
command. Binary packages should be built as wheels instead. -- by :user:`hroncok`
setup.py
-- by :user:`layday`
No significant changes.
sphinx-inline-tabs
extension to allow for comparison of setup.py
and its equivalent setup.cfg
-- by :user:`amy-lei`
[metadata]
section of setup.cfg
case-sensitive. Users having
uppercase option spellings will get a warning suggesting to make them to lowercase
-- by :user:`melissa-kun-li`
extras_require
and data_files
of setup.cfg
to support the usage of dashes. Method will warn users when they use a dash-separated key which in the future will only allow an underscore. Note: the method performs the dash to underscore conversion to preserve compatibility, but future versions will no longer support it -- by :user:`melissa-kun-li`
AttributeError
by raising DistutilsSetupError
in dist.check_specifier()
when specifier is not a string -- by :user:`melissa-kun-li`
upload_docs
command. An html builder will be used.
Note: upload_docs
is deprecated for PyPi, but is supported for other sites -- by :user:`melissa-kun-li`
tox -- -p no:xdist
.create_module()
and exec_module()
methods in VendorImporter
to get rid of ImportWarning
-- by :user:`hroncok`
pkg_resources
behavior for zipimport now matches the regular behavior, and finds
.egg-info
(previously would only find .dist-info
) -- by :user:`thatch`
Makefile
support -- by :user:`webknjaz`
:user:
role to Sphinx config -- by :user:`webknjaz`
setuptools.command.bdist_rpm
module that are no longer needed, because
they are part of the bdist_rpm
module in distutils in Python
3.5.0. Therefore, code was removed from setuptools.command.bdist_rpm
.SETUPTOOLS_USE_DISTUTILS=local
to help identify and work through the reported issues with distutils adoption, mainly to file issues and pull requests with pypa/distutils such that distutils performs as needed across every supported environment.subprocess._optim_args_from_interpreter_flags
.SETUPTOOLS_USE_DISTUTILS
is set to stdlib
, Setuptools will fall back to the legacy behavior. Use of this escape hatch is discouraged, but it is provided to ease the transition while proper fixes for edge cases can be addressed.setup_requires
itself. They are reported as build requirements for the
frontend to install.safe_version
function documentationdistutils
is imported before setuptools
when distutils
replacement is not enabled.raise new_exception from old_exception
setuptools
or setuptools.distutils_patch
, Setuptools will expose its bundled version as a top-level distutils
package (and unload any previously-imported top-level distutils package), retaining the expectation that distutils
' objects are actually Setuptools objects.
To avoid getting any legacy behavior from the standard library, projects are advised to always "import setuptools" prior to importing anything from distutils. This behavior happens by default when using pip install
or pep517.build
. Workflows that rely on setup.py (anything)
will need to first ensure setuptools is imported. One way to achieve this behavior without modifying code is to invoke Python thus: python -c "import setuptools; exec(open('setup.py').read())" (anything)
.pkg_resources.py31compat.makedirs
in favor of the stdlib. Use os.makedirs()
instead.__requires__
directive in easy-install wrapper scripts.Distribution.finalize_options
prior to invoking _install_setup_requires
, broken since v42.0.0.Distribution.finalize_options
prior to invoking _install_setup_requires
, broken since v42.0.0.setuptools<45
.attr:
now extracts variables through rudimentary examination of the AST,
thereby supporting modules with third-party imports. If examining the AST
fails to find the variable, attr:
falls back to the old behavior of
importing the module. Works on Python 3 only.No significant changes.
2to3
deprecation warnings from TestDevelop.test_2to3_user_mode
.bdist_wininst
command. Binary packages should be built as wheels instead..dist-info
as distribution metadata.build_meta
(a bare minimum, not completed).lib2to3
PendingDeprecationWarning
and DeprecationWarning
in tests,
because lib2to3
is deprecated in Python 3.9.No significant changes.
No significant changes.
easy_install.check_site_dir
, ensure the installation directory exists.pkg_resources
prefer find_spec
(PEP 451) to find_module
.setuptools.extern.some_module
gives the same object as setuptools._vendor.some_module
. This makes Metadata picklable again.--user
option is now always available. A warning is issued if the user site directory is not available.PYTHONPATH
has been turned into a warning.tests
and docs
dependencies in metadata (extras).pyproject.toml
in source distribution by default. Projects relying on the previous behavior where pyproject.toml
was excluded by default should stop relying on that behavior or add exclude pyproject.toml
to their MANIFEST.in file.build-system.requires
and adds PEP 517 build support by declaring itself as the build-backend
. It additionally specifies build-system.backend-path
to rely on itself for those builders that support it.find-links
option in setup.cfg
.setup_requires
/tests_require
requirements, with the following differences in behavior:python_requires
allow_hosts
easy_install option (index_url
/find_links
are still honored)license_files
option in setup.cfg
to automatically
include multiple license files in a source distribution.imp
module with local re-implementation in setuptools._imp
.pkg_resources.Requirement
hash/equality implementation: take PEP 508 direct URL into account.python3.10
.test
command, with the recommendation that users migrate to tox
.python_requires
values are supplied.imp
module.package_data
check: ensure the dictionary values are lists/tuples of strings.html.unescape
to avoid accessing HTMLParser.unescape
when not necessary. HTMLParser.unescape
is deprecated and will be removed in Python 3.9.UnicodeDecodeError
occurs while reading a metadata file.dist/
directory contained existing .whl
files.setup.cfg
-only projects when using the setuptools.build_meta
backend. Projects that have enabled PEP 517 no longer need to have a setup.py
and can use the purely declarative setup.cfg
configuration file instead.pkg_resources.parse_requirements
-style requirements in setup_requires
when setup.py
is invoked from the setuptools.build_meta
build backend.PKG-INFO
or METADATA
file in the exception
text when the Version:
header can't be found.build_meta:__legacy__
backend, a "compatibility mode" PEP 517 backend that can be used as the default when build-backend
is left unspecified in pyproject.toml
.pkg_resources.resource_string
and similar no longer accept paths that traverse parents, that begin with a leading /
. Violations of this expectation raise DeprecationWarnings and will become errors. Additionally, any paths that are absolute on Windows are strictly disallowed and will raise ValueErrors.setuptools
will now automatically include licenses if setup.cfg
contains a license_file
attribute, unless this file is manually excluded inside MANIFEST.in
.urllib.parse.urlparse
led to problems as reported in #1663 and #1668. This change serves as an alternative to #1499 and fixes #1668.license
field in setup.cfg
files now explicitly raise an error.setuptools.package_index
no longer relies on the deprecated urllib.parse.splituser
per Python #27485.author
or author_email
fields generated malformed package metadata.requires
parameter in setup()
.pkg_resources.normalize_path
, additional path normalization is now performed to ensure path values to a directory is always the same, preventing false positives when checking scripts have a consistent prefix to set up on Windows.DeprecationWarning
and are thus visible by default.build_meta.build_sdist
now includes setup.py
in source distributions by default.get_metadata_version
and read_pkg_file
onto distutils.DistributionMetadata
to retain the correct version on the PKG-INFO
file in the (deprecated) upload
command.rpmbuild
packages is required for the bdist_rpm
command.setup.cfg
for src/ layouts
setup.cfg
metadata table.pip install
instead of ez_setup.py
.setuptools
distribution documentation to remove some outdated information.setup.cfg
minimum version for version and project_urls.recursive-include setuptools/_vendor
to contain only .py and .txt files.concurrent.futures
backport futures
to the Python 2.7 test suite requirements.pkg_resources.normalize_path
, fix issue on Cygwin when cwd contains symlinks.u""
literals.data_files
in setup.cfg
.--dist-dir
and the build_meta
sdist directory argument to point to the same target (meaning the build frontend no longer needs to clean manually the dist dir to avoid multiple sdist presence, and setuptools no longer needs to handle conflicts between the two)..egg-info
directory whenever egg_info
command is run.build_meta.get_requires_for_build_sdist
now does not include the wheel
package anymore.egg_info
command when tagging is used.upload
and register
commands.six.PY2
and six.PY3
.pyproject.toml
to ["wheel"]
.__dir__()
implementation to pkg_resources.Distribution()
that
includes the attributes in the _provider
instance variable.setuptools
specific long_description_content_type
,
project_urls
and provides_extras
fields are now set consistently
after any distutils
setup_keywords
calls, allowing them to override
values.tox
environment for documentation builds.towncrier
for changelog management.wheel
no longer installs on it.pkg_resources
, now support loading resources
for modules loaded by the SourcelessFileLoader
.pkg_resources.parse_version
.
Removed the SetuptoolsVersion
and
SetuptoolsLegacyVersion
names as well. They should not
have been used, but if they were, replace with
Version
and LegacyVersion
from packaging.version
.Provides-Extra
in metadata when
no extra is present (but environment markers are).build_ext
behavior for
compatibility.build_ext
to refine detection of
Cython availability.build_ext
now uses the
new_build_ext.long_description_type
to setup.cfg
declarative config as intended and documented.pkg_resources.ZipProvider
.data_files
handling when installing from wheel.install_requires
as
unordered sequences (sets or dicts).build_meta
module.setup_requires
in setup.cfg
files.EntryPoint.__init__
.bdist_egg --exclude-source-files
now tested and works
on Python 3.setuptools.build_meta
module, an implementation
of PEP-517 for Setuptools-defined packages.dist_info
command for producing dist_info
metadata.pkg_resources.find_on_path
to facilitate an optimization
for paths with many non-version entries.Description-Content-Type
metadata field. See here for
documentation on how to use this field.
pytest-runner-N.N
would satisfy the installation
of pytest
.setup_requires
with a conflicting
transitive dependency, fix #1124).access
or stat
and using os.listdir
instead.file:
directive
in metadata.long_description in setup.cfg
.setup.cfg
(same treatment as
for #1081)..egg
extension alone.pkg_resources
now uses inspect.getmro
to
resolve classes in method resolution order.install_requires
are now processed and treated as nameless extras_require
with markers, allowing their metadata in requires.txt to be
correctly generated.py31compat.makedirs
to correctly honor
exist_ok
parameter.pkg_resources.ensure_directory
.upload_docs
command for sites other than PyPI.
Only warehouse is dropping support, but services like
devpi continue to
support docs built by setuptools' plugins. See
this comment
for more context on the motivation for this change.python_requires
and py_modules
.os.unlink
same as os.remove
in
auto_chmod
error handler.getpass.getuser()
.build_info
now accepts two new parameters
to optimize and customize the building of C libraries.#581: Instead of vendoring the growing list of
dependencies that Setuptools requires to function,
Setuptools now requires these dependencies just like
any other project. Unlike other projects, however,
Setuptools cannot rely on setup_requires
to
demand the dependencies it needs to install because
its own machinery would be necessary to pull those
dependencies if not present (a bootstrapping problem).
As a result, Setuptools no longer supports self upgrade or
installation in the general case. Instead, users are
directed to use pip to install and upgrade using the
wheel
distributions of setuptools.
Users are welcome to contrive other means to install or upgrade Setuptools using other means, such as pre-installing the Setuptools dependencies with pip or a bespoke bootstrap tool, but such usage is not recommended and is not supported.
As discovered in #940, not all versions of pip will successfully install Setuptools from its pre-built wheel. If you encounter issues with "No module named six" or "No module named packaging", especially following a line "Running setup.py egg_info for package setuptools", then your pip is not new enough.
There's an additional issue in pip where setuptools is upgraded concurrently with other source packages, described in pip #4253. The proposed workaround is to always upgrade Setuptools first prior to upgrading other packages that would upgrade Setuptools.
Installation via pip, as indicated in the Python Packaging User's Guide, is the officially-supported mechanism for installing Setuptools, and this recommendation is now explicit in the much more concise README.
Other edits and tweaks were made to the documentation. The codebase is unchanged.
tag_svn_revision
distribution option. If Subversion tagging support is
still desired, consider adding the functionality to
setuptools_svn in setuptools_svn #2.dis.Bytecode
on Python 3.4 and later in
setuptools.depends
.__file__
is
always a str
, modeling the behavior observed by the
interpreter when invoking scripts and modules.global-exclude .foo
will not match all
*.foo
files any more. Package authors must add an explicit
wildcard, such as global-exclude *.foo
, to match all
.foo
files. See #886, #849.sdist
command no longer suppresses the inclusion
of data files, re-aligning with the expectation of distutils
and addressing #274 and #521.pkg_resources
now
ignores empty egg-info directories and gives precedence to
packages whose versions are lexicographically greatest,
a rough approximation for preferring the latest available
version.MANIFEST.in
had implicit wildcard
matching. This caused global-exclude .foo
to exclude
all *.foo
files, but also global-exclude bar.py
to
exclude foo_bar.py
.setuptools.command.sdist
to re-use most of
the functionality directly from distutils.command.sdist
for the add_defaults
method with strategic overrides.
See #750 for rationale.certifi.where()
to locate
the bundle.find_packages()
, restore support for excluding
a parent package without excluding a child package.-nspkg.pth
behavior on Python 3.3+ where
PEP-420 functionality is adequate. Fixes pip #1924.find_packages()
so that find_packages(exclude=['foo']) == []
, excluding subpackages of foo
.
Previously, find_packages(exclude=['foo']) == ['foo.bar']
,
even though the parent foo
package was excluded.__module__
. Improves
compatibility with other packages that might have previously
patched distutils functions (i.e. NumPy).monkey
module to encapsulate
the distutils monkeypatching behavior.Now use Warehouse by default for
upload
, patching distutils.config.PyPIRCCommand
to
affect default behavior.
Any config in .pypirc should be updated to replace
with
Similarly, any passwords stored in the keyring should be updated to use this new value for "system".
The upload_docs
command will continue to use the python.org
site, but the command is now deprecated. Users are urged to use
Read The Docs instead.
#776: Use EXT_SUFFIX for py_limited_api renaming.
#774 and #775: Use LegacyVersion from packaging when detecting numpy versions.
pkg_resources.get_default_cache
now defers to the
:pypi:`appdirs` project to
resolve the cache directory. Adds a vendored dependency on
appdirs to pkg_resources.py_limited_api
to Extension,
it must be passed as a keyword argument.numpy.distutils
and distutils._msvccompiler
for numpy < 1.11.2 (Fix issue #728, error also fixed in Numpy).library_dir_option
patch (Error is related to numpy.distutils
and make errors on non Numpy users).library_dir_option
.library_dir_option
.dependency_links
and all links will be tried until a working download link is encountered.#674: Default sys.path
manipulation by easy-install.pth
is now "raw", meaning that when writing easy-install.pth
during any install operation, the sys.path
will not be
rewritten and will no longer give preference to easy_installed
packages.
To retain the old behavior when using any easy_install
operation (including setup.py install
when setuptools is
present), set the environment variable:
SETUPTOOLS_SYS_PATH_TECHNIQUE=rewrite
This project hopes that that few if any environments find it necessary to retain the old behavior, and intends to drop support for it altogether in a future release. Please report any relevant concerns in the ticket for this change.
sys.executable
would
produce an improperly-formatted shebang header,
introduced in 12.0 with the fix for #188.os.link
to avoid hard linking
in sdist.make_distribution
, avoiding errors on
systems that support hard links but not on the
file system in which the build is occurring.python_requires
is supplied.python_requires
keyword.setup.py
now will fail fast and with a helpful
error message when the necessary metadata is missing.setuptools.msvc
now redirect
user to Visual C++ Build Tools web page.setuptools.msvc
mainly
for Python 2 and Linux.setuptools.msvc9_support
to
setuptools.msvc
.Re-release of v23.2.0, which was missing the intended commits.
tag_svn_revision
distribution
option.build_py
command, it will be handled just as with
text on Python 3.Intended to be v21.3.0, but jaraco accidentally released as a major bump.
site.getsitepackages
._CONFIG_VARS
from distutils
rather than from sysconfig
to allow distutils.sysconfig.customize_compiler
configure the OS X compiler for -dynamiclib
.python_implmentation
marker.distutils.msvc9compiler
in mingw environments.pkg_resources
module.pkg_resources
around new Requirement
implementation.pkg_resources.Requirement
objects are
now a subclass of packaging.requirements.Requirement
,
allowing any environment markers and url (if any) to be
affiliated with the requirementChangelog now includes release dates and links to PEPs.
BB Pull Request #173: Replace dual PEP 345 _markerlib implementation and PEP 426 implementation of environment marker support from packaging 16.1 and PEP 508. Fixes Issue #122. See also BB Pull Request #175, BB Pull Request #168, and BB Pull Request #164. Additionally:
Requirement.parse
no longer retains the order of extras.parse_requirements
now requires that all versions be PEP-440 compliant, as revealed in #499. Packages released with invalid local versions should be re-released using the proper local version syntax, e.g.mypkg-1.0+myorg.1
.
upload_docs
command to also honor keyring
for password resolution.--record
. This version of setuptools
can no longer be used to upgrade pip earlier than 6.0.setuptools.launch
shim now loads scripts in a new
namespace, avoiding getting relative imports from
the setuptools package on Python 2.Added a new entry script setuptools.launch
,
implementing the shim found in
pip.util.setuptools_build
. Use this command to launch
distutils-only packages under setuptools in the same way that
pip does, causing the setuptools monkeypatching of distutils
to be invoked prior to invoking a script. Useful for debugging
or otherwise installing a distutils-only package under
setuptools when pip isn't available or otherwise does not
expose the desired functionality. For example:
$ python -m setuptools.launch setup.py develop
Issue #488: Fix dual manifestation of Extension class in extension packages installed as dependencies when Cython is present.
importlib.machinery
in pkg_resources
to avoid missing detection on relevant
platforms.build_py
command when package is empty.pkg_resources.WorkingSet
and pkg_resources.Distribution
that supports replacing an extant package with a new one,
allowing for setup_requires dependencies to supersede installed
packages for the session.repr
, which can be
incorrect (especially on Python 2).ez_setup.py
now
automatically detects
the latest version of setuptools (using PyPI JSON API) rather
than hard-coding a particular value.egg_info.get_pkg_info_revision
.easy_install._adjust_header
.test.test_args
a non-data property; alternate fix
for the issue reported in BB Pull Request #155.ez_setup
bootstrap module, unload all
pkg_resources
modules following download.BB Pull Request #135: Setuptools now allows disabling of
the manipulation of the sys.path
during the processing of the easy-install.pth file. To do so, set
the environment variable SETUPTOOLS_SYS_PATH_TECHNIQUE
to
anything but "rewrite" (consider "raw"). During any install operation
with manipulation disabled, setuptools packages will be appended to
sys.path naturally.
Future versions may change the default behavior to disable manipulation. If so, the default behavior can be retained by setting the variable to "rewrite".
Issue #257: easy_install --version
now shows more detail
about the installation location and Python version.
Refactor setuptools.findall in preparation for re-submission back to distutils.
find_packages
.Dropped support for builds with Pyrex. Only Cython is supported.
Issue #288: Detect Cython later in the build process, after
setup_requires
dependencies are resolved.
Projects backed by Cython can now be readily built
with a setup_requires
dependency. For example:
ext = setuptools.Extension('mylib', ['src/CythonStuff.pyx', 'src/CStuff.c']) setuptools.setup( ... ext_modules=[ext], setup_requires=['cython'], )
For compatibility with older versions of setuptools, packagers should
still include src/CythonMod.c
in the source distributions or
require that Cython be present before building source distributions.
However, for systems with this build of setuptools, Cython will be
downloaded on demand.
Issue #396: Fixed test failure on OS X.
BB Pull Request #136: Remove excessive quoting from shebang headers for Jython.
setuptools.tests
from the
installed packages.pkg_resources._initialize_master_working_set
, allowing for
imperative re-initialization of the master working set.setuptools.sandbox._execfile()
with Python 3.1.BB Pull Request #126: DistributionNotFound message now lists the package or packages that required it. E.g.:
pkg_resources.DistributionNotFound: The 'colorama>=0.3.1' distribution was not found and is required by smlib.log.
Note that zc.buildout once dependended on the string rendering of this message to determine the package that was not found. This expectation has since been changed, but older versions of buildout may experience problems. See Buildout #242 for details.
pkg_resources.Distribution
.EntryPoint.load
.Distribution.hashcmp
so that Distributions with
None for pyversion or platform can be compared against Distributions
defining those attributes.__ne__
to Requirement class.--to-dir
to customize save directory or
allow for re-use of existing repository of setuptools versions. See
BB Pull Request #112 for background.easy_install
no longer will default to installing
packages to the "user site packages" directory if it is itself installed
there. Instead, the user must pass --user
in all cases to install
packages to the user site packages.
This behavior now matches that of "pip install". To configure
an environment to always install to the user site packages, consider
using the "install-dir" and "scripts-dir" parameters to easy_install
through an appropriate distutils config file.Re-release of 13.0. Intermittent connectivity issues caused the release process to fail and PyPI uploads no longer accept files for 13.0.
setup_requires
to metadata
(previously added in 8.4 and removed in 9.0).setuptools.command.easy_install.extract_wininst_cfg()
with Python 2.6 and 2.7.ez_setup.use_setuptools()
.ez_setup.use_setuptools
,
as it is clearly still used by buildout's bootstrap. ez_setup
remains deprecated for use by individual packages.ez_setup.use_setuptools
.cant_write_to_target
.ez_setup.use_setuptools
.install_scripts
. Tests would be nice.install_scripts
command on Windows systems corrupting
the header.setuptools.command.easy_install.sys_executable
for pbr
compatibility. For the future, tools should construct a CommandSpec
explicitly.build.executable
, such that an executable of "/usr/bin/env my-python" may
be specified. This means that systems with a specified executable whose name
has spaces in the path must be updated to escape or quote that value.easy_install.ScriptWriter.get_writer
, replaced by .best()
with slightly different semantics (no force_windows flag).Expose EntryPoint.resolve
in place of EntryPoint._load, implementing the
simple, non-requiring load. Deprecated all uses of EntryPoint._load
except for calling with no parameters, which is just a shortcut for
ep.require(); ep.resolve();
.
Apps currently invoking ep.load(require=False)
should instead do the
following if wanting to avoid the deprecating warning:
getattr(ep, "resolve", lambda: ep.load(require=False))()
pkg_resources.WorkingSet.find
. This release adds support
for indicating the dependent packages while maintaining support for
a VersionConflict when no dependent package context is known. New unit tests
now capture the expected interface.Entrypoint._load()
.sdist._default_revctrl
so that systems relying on that interface do not fail (namely, Ubuntu 12.04
and similar Debian releases).setup_requires
metadata to avoid issue
where Setuptools was unable to upgrade over earlier versions.setup_requires
metadata.pkg_resources
is now a package instead of a module.packaging
to 14.5, giving preference to "rc" as designator for
release candidates over "c".pkg_resources.PEP440Warning
, instead of RuntimeWarning.packaging
to 14.4, fixing an error where there is a
different result for if 2.0.5 is contained within >2.0dev and >2.0.dev even
though normalization rules should have made them equal.__hash__
on parse_version results.__getitem__
and sort operations on
parse_version result.===
escape hatch. See the changes to test_resources
for specific examples of version numbers and specifiers that are no longer
supported. Setuptools now "vendors" the packaging library.Issue #80, Issue #209: Eggs that are downloaded for setup_requires
,
test_requires
, etc. are now placed in a ./.eggs
directory instead of
directly in the current directory. This choice of location means the files
can be readily managed (removed, ignored). Additionally,
later phases or invocations of setuptools will not detect the package as
already installed and ignore it for permanent install (See #209).
This change is indicated as backward-incompatible as installations that
depend on the installation in the current directory will need to account for
the new location. Systems that ignore *.egg
will probably need to be
adapted to ignore .eggs
. The files will need to be manually moved or
will be retrieved again. Most use cases will require no attention.
single
version, externally managed
installs.Issue #100: When building a distribution, Setuptools will no longer match default files using platform-dependent case sensitivity, but rather will only match the files if their case matches exactly. As a result, on Windows and other case-insensitive file systems, files with names such as 'readme.txt' or 'README.TXT' will be omitted from the distribution and a warning will be issued indicating that 'README.txt' was not found. Other filenames affected are:
- README.rst
- README
- setup.cfg
- setup.py (or the script name)
- test/test*.py
Any users producing distributions with filenames that match those above case-insensitively, but not case-sensitively, should rename those files in their repository for better portability.
BB Pull Request #72: When using single_version_externally_managed
, the
exclusion list now includes Python 3.2 __pycache__
entries.
BB Pull Request #76 and BB Pull Request #78: lines in top_level.txt are now ordered deterministically.
Issue #118: The egg-info directory is now no longer included in the list of outputs.
Issue #258: Setuptools now patches distutils msvc9compiler to recognize the specially-packaged compiler package for easy extension module support on Python 2.6, 2.7, and 3.2.
pkg_resources
now uses explicit detection of Python 2 vs.
Python 3, supporting environments where builtins have been patched to make
Python 3 look more like Python 2.PKG_RESOURCES_CACHE_ZIP_MANIFESTS
environment variable is no longer
relevant. The observed "memory increase" referenced in the 5.4 release
notes and detailed in Issue #154 was likely not an increase over the status
quo, but rather only an increase over not storing the zip info at all.pkg_resources
will now cache the zip manifests rather than
re-processing the same file from disk multiple times, but only if the
environment variable PKG_RESOURCES_CACHE_ZIP_MANIFESTS
is set. Clients
that package many modules in the same zip file will see some improvement
in startup time by enabling this feature. This feature is not enabled by
default because it causes a substantial increase in memory usage.setup.py develop
now copies scripts in binary mode rather
than text mode, matching the behavior of the install
command.install._install
for compatibility with earlier
NumPy versions.sys.getpreferredencoding
to match the behavior on Python 2.6-3.4.include
parameter to setuptools.find_packages()
..pyx
files.zipfile.ZipFile
does not yet have support for context managers.sys.path
no longer
causes it to be imported when pkg_resources
is imported. Note that this
change means that all of a namespace package's __init__.py
files must
include a declare_namespace()
call in order to ensure that they will be
handled properly at runtime. In 2.x it was possible to get away without
including the declaration, but only at the cost of forcing namespace
packages to be imported early, which 3.0 no longer does.__init__.py
files to namespace packages. Any packages that rely on this
behavior will need to create __init__.py
files and include the
declare_namespace()
._bytecode_filenames
which is
available in Python 2.6 and later, but also has better compatibility with
Python 3 environments.*.whl
files when searching for files
in a zip-imported file.sdist:re_finder
.setuptools.command.easy_install.HAS_USER_SITE
. Clients
expecting this boolean variable should use site.ENABLE_USER_SITE
instead.pkg_resources.ImpWrapper
. Clients that expected this class
should use pkgutil.ImpImporter
instead.Issue #114: Use sys.getfilesystemencoding
for decoding config in
bdist_wininst
distributions.
Issue #105 and Issue #113: Establish a more robust technique for determining the terminal encoding:
1. Try ``getpreferredencoding`` 2. If that returns US_ASCII or None, try the encoding from ``getdefaultlocale``. If that encoding was a "fallback" because Python could not figure it out from the environment or OS, encoding remains unresolved. 3. If the encoding is resolved, then make sure Python actually implements the encoding. 4. On the event of an error or unknown codec, revert to fallbacks (UTF-8 on Darwin, ASCII on everything else). 5. On the encoding is 'mac-roman' on Darwin, use UTF-8 as 'mac-roman' was a bug on older Python releases. On a side note, it would seem that the encoding only matters for when SVN does not yet support ``--xml`` and when getting repository and svn version numbers. The ``--xml`` technique should yield UTF-8 according to some messages on the SVN mailing lists. So if the version numbers are always 7-bit ASCII clean, it may be best to only support the file parsing methods for legacy SVN releases and support for SVN without the subprocess command would simple go away as support for the older SVNs does.
easy_install
will now use credentials from .pypirc if
present for connecting to the package index.package_index._encode_auth
when the username/password pair length indicates wrapping.ssl_support
module (socket.error
).easy_install
command will not be available.ez_setup.py
now ensures partial downloads are cleaned up following
a failed download.sandbox.execfile
now opens the target file in binary
mode, thus honoring a BOM in the file when compiled.--insecure
option to ez_setup.py to accommodate
environments where a trusted SSL connection cannot be validated.--allow-hosts
.ez_setup.py
.SETUPTOOLS_LAUNCHER
environment variable is set to
"natural". In the future, this behavior may become default, but only after
it has matured and seen substantial adoption. The SETUPTOOLS_LAUNCHER
also accepts "executable" to force the default behavior of creating launcher
executables.urlopen
on
platforms that do not have these tools.Features
functionality.VerifyingHTTPSConn
, handle a tunnelled (proxied)
connection.This release includes a couple of backward-incompatible changes, but most if not all users will find 1.0 a drop-in replacement for 0.9.
pkg_resources.invalid_marker
. Any clients depending on the specific
string representation of exceptions returned by that function may need to
be updated to account for this change.pkg_resources.invalid_marker
are
normalized for cross-implementation consistency.--ignore-conflicts-at-my-risk
and --delete-conflicting
options to easy_install. These options have been deprecated since 0.6a11._vcs_split_rev_from_url
..name
attribute..name
attribute.AttributeError
introduced in last fix.AttributeError
.package_index
now validates hashes other than MD5 in download links.test_easy_install
.SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT
in addition to the now
deprecated DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT
.parser
module is not available.ez_setup.py
now uses HTTPS to download setuptools from PyPI.Added several features that were slated for setuptools 0.6c12:
setup.py
for optional SSL and certificate validation support
on older platforms. Based on Distutils-SIG discussions, the syntax is
somewhat tentative. There should probably be a PEP with a firmer spec before
the feature should be considered suitable for use.get_cache_path
to follow the directory creation
to avoid errors when the cache path does not yet exist. Fixes the error
reported in Distribute #375.ResourceManager.get_cache_path
introduced in
0.6.46 (redo).ResourceManager.get_cache_path
introduced in
0.6.46.distribute_setup.py
now traps VersionConflict as well,
restoring ability to upgrade from an older setuptools version.distribute_setup.py
has been updated to allow Setuptools 0.7 to
satisfy use_setuptools._zip_directory_cache
.easy_install.get_win_launcher
which may be used by
third-party libraries such as buildout to get a suitable script launcher.__pycache__
directory as a file, causing an error, apparently only
under Windows. Easy_install now skips all directories when processing
metadata scripts.Note this release is backward-incompatible with distribute 0.6.23-0.6.34 in how it parses version numbers.
setup.py
no longer masks failure exit code when tests fail.setup_requires
superseding installed requirements
until regression can be addressed.Distribute #303: Make sure the manifest only ever contains UTF-8 in Python 3.
Distribute #329: Properly close files created by tests for compatibility with Jython.
Work around Jython #1980 and Jython #1981.
Distribute #334: Provide workaround for packages that reference sys.__stdout__
such as numpy does. This change should address pypa/virtualenv#359 as long
as the system encoding is UTF-8 or the IO encoding is specified in the
environment, i.e.:
PYTHONIOENCODING=utf8 pip install numpy
Fix for encoding issue when installing from Windows executable on Python 3.
Distribute #323: Allow setup_requires
requirements to supersede installed
requirements. Added some new keyword arguments to existing pkg_resources
methods. Also had to updated how __path__ is handled for namespace packages
to ensure that when a new egg distribution containing a namespace package is
placed on sys.path, the entries in __path__ are found in the same order they
would have been in had that egg been on the path when pkg_resources was
first imported.
upload_docs
command now runs build_sphinx
to produce uploadable documentation.upload_docs
provided mangled auth credentials under Python 3.*.pyc
/ *.pyo
files on Python 3.3.package_data
and
include_package_data
. Files indicated by package_data
are now included
in the manifest.distribute_setup.py
now allows a --download-base
argument for retrieving
distribute from a specified location.*.pyc
/ *.pyo
files on
Python 3.3.install_requires
from a setup.py call
(install, develop, etc).os.devnull
in Sandboxdistribute_setup_3k.py
during the release.
This closes Distribute #52.
- Fixed a missing files problem when using Windows source distributions on non-Windows platforms, due to distutils not handling manifest file line endings correctly.
- Updated Pyrex support to work with Pyrex 0.9.6 and higher.
- Minor changes for Jython compatibility, including skipping tests that can't work on Jython.
- Fixed not installing eggs in
install_requires
if they were also used forsetup_requires
ortests_require
.- Fixed not fetching eggs in
install_requires
when running tests.- Allow
ez_setup.use_setuptools()
to upgrade existing setuptools installations when called from a standalonesetup.py
.- Added a warning if a namespace package is declared, but its parent package is not also declared as a namespace.
- Support Subversion 1.5
- Removed use of deprecated
md5
module ifhashlib
is available- Fixed
bdist_wininst upload
trying to upload the.exe
twice- Fixed
bdist_egg
putting anative_libs.txt
in the source package's.egg-info
, when it should only be in the built egg'sEGG-INFO
.- Ensure that _full_name is set on all shared libs before extensions are checked for shared lib usage. (Fixes a bug in the experimental shared library build support.)
- Fix to allow unpacked eggs containing native libraries to fail more gracefully under Google App Engine (with an
ImportError
loading the C-based module, instead of getting aNameError
).- Fixed
win32.exe
support for .pth files, so unnecessary directory nesting is flattened out in the resulting egg. (There was a case-sensitivity problem that affected some distributions, notablypywin32
.)- Prevent
--help-commands
and other junk from showing under Python 2.5 when runningeasy_install --help
.- Fixed GUI scripts sometimes not executing on Windows
- Fixed not picking up dependency links from recursive dependencies.
- Only make
.py
,.dll
and.so
files executable when unpacking eggs- Changes for Jython compatibility
- Improved error message when a requirement is also a directory name, but the specified directory is not a source package.
- Fixed
--allow-hosts
option blockingfile:
URLs- Fixed HTTP SVN detection failing when the page title included a project name (e.g. on SourceForge-hosted SVN)
- Fix Jython script installation to handle
#!
lines better whensys.executable
is a script.- Removed use of deprecated
md5
module ifhashlib
is available- Keep site directories (e.g.
site-packages
) from being included in.pth
files.
- Fixed
distutils.filelist.findall()
crashing on broken symlinks, andegg_info
command failing on new, uncommitted SVN directories.- Fix import problems with nested namespace packages installed via
--root
or--single-version-externally-managed
, due to the parent package not having the child package as an attribute.ftp:
download URLs now work correctly.- The default
--index-url
is nowhttps://pypi.python.org/simple
, to use the Python Package Index's new simpler (and faster!) REST API.
- Added
--egg-path
option todevelop
command, allowing you to force.egg-link
files to use relative paths (allowing them to be shared across platforms on a networked drive).- Fix not building binary RPMs correctly.
- Fix "eggsecutables" (such as setuptools' own egg) only being runnable with bash-compatible shells.
- Fix
#!
parsing problems in Windows.exe
script wrappers, when there was whitespace inside a quoted argument or at the end of the#!
line (a regression introduced in 0.6c4).- Fix
test
command possibly failing if an older version of the project being tested was installed onsys.path
ahead of the test source directory.- Fix
find_packages()
treatingez_setup
and directories with.
in their names as packages.- EasyInstall no longer aborts the installation process if a URL it wants to retrieve can't be downloaded, unless the URL is an actual package download. Instead, it issues a warning and tries to keep going.
- Fixed distutils-style scripts originally built on Windows having their line endings doubled when installed on any platform.
- Added
--local-snapshots-ok
flag, to allow building eggs from projects installed usingsetup.py develop
.- Fixed not HTML-decoding URLs scraped from web pages
- Fix uploaded
bdist_rpm
packages being described asbdist_egg
packages under Python versions less than 2.5.- Fix uploaded
bdist_wininst
packages being described as suitable for "any" version by Python 2.5, even if a--target-version
was specified.- Fixed
.dll
files on Cygwin not having executable permissions when an egg is installed unzipped.
- Overhauled Windows script wrapping to support
bdist_wininst
better. Scripts installed withbdist_wininst
will always use#!python.exe
or#!pythonw.exe
as the executable name (even when built on non-Windows platforms!), and the wrappers will look for the executable in the script's parent directory (which should find the right version of Python).- Fix
upload
command not uploading files built bybdist_rpm
orbdist_wininst
under Python 2.3 and 2.4.- Add support for "eggsecutable" headers: a
#!/bin/sh
script that is prepended to an.egg
file to allow it to be run as a script on Unix-ish platforms. (This is mainly so that setuptools itself can have a single-file installer on Unix, without doing multiple downloads, dealing with firewalls, etc.)- Fix problem with empty revision numbers in Subversion 1.4
entries
files- Use cross-platform relative paths in
easy-install.pth
when doingdevelop
and the source directory is a subdirectory of the installation target directory.- Fix a problem installing eggs with a system packaging tool if the project contained an implicit namespace package; for example if the
setup()
listed a namespace packagefoo.bar
without explicitly listingfoo
as a namespace package.- Added support for HTTP "Basic" authentication using
http://user:pass@host
URLs. If a password-protected page contains links to the same host (and protocol), those links will inherit the credentials used to access the original page.- Removed all special support for Sourceforge mirrors, as Sourceforge's mirror system now works well for non-browser downloads.
- Fixed not recognizing
win32.exe
installers that included a custom bitmap.- Fixed not allowing
os.open()
of paths outside the sandbox, even if they are opened read-only (e.g. reading/dev/urandom
for random numbers, as is done byos.urandom()
on some platforms).- Fixed a problem with
.pth
testing on Windows whensys.executable
has a space in it (e.g., the user installed Python to aProgram Files
directory).
- Fixed breakages caused by Subversion 1.4's new "working copy" format
- You can once again use "python -m easy_install" with Python 2.4 and above.
- Python 2.5 compatibility fixes added.
- The
ez_setup
module displays the conflicting version of setuptools (and its installation location) when a script requests a version that's not available.- Running
setup.py develop
on a setuptools-using project will now install setuptools if needed, instead of only downloading the egg.- Windows script wrappers now support quoted arguments and arguments containing spaces. (Patch contributed by Jim Fulton.)
- The
ez_setup.py
script now actually works when you put a setuptools.egg
alongside it for bootstrapping an offline machine.- A writable installation directory on
sys.path
is no longer required to download and extract a source distribution using--editable
.- Generated scripts now use
-x
on the#!
line whensys.executable
contains non-ASCII characters, to prevent deprecation warnings about an unspecified encoding when the script is run.
- Fixed
AttributeError
when trying to download asetup_requires
dependency when a distribution lacks adependency_links
setting.- Made
zip-safe
andnot-zip-safe
flag files contain a single byte, so as to play better with packaging tools that complain about zero-length files.- Made
setup.py develop
respect the--no-deps
option, which it previously was ignoring.- Support
extra_path
option tosetup()
wheninstall
is run in backward-compatibility mode.- Source distributions now always include a
setup.cfg
file that explicitly setsegg_info
options such that they produce an identical version number to the source distribution's version number. (Previously, the default version number could be different due to the use of--tag-date
, or if the version was overridden on the command line that built the source distribution.)- EasyInstall now includes setuptools version information in the
User-Agent
string sent to websites it visits.
- Fix
register
not obeying name/version set byegg_info
command, ifegg_info
wasn't explicitly run first on the same command line.- Added
--no-date
and--no-svn-revision
options toegg_info
command, to allow suppressing tags configured insetup.cfg
.- Fixed redundant warnings about missing
README
file(s); it should now appear only if you are actually a source distribution.- Fix creating Python wrappers for non-Python scripts
- Fix
ftp://
directory listing URLs from causing a crash when used in the "Home page" or "Download URL" slots on PyPI.- Fix
sys.path_importer_cache
not being updated when an existing zipfile or directory is deleted/overwritten.- Fix not recognizing HTML 404 pages from package indexes.
- Allow
file://
URLs to be used as a package index. URLs that refer to directories will use an internally-generated directory listing if there is noindex.html
file in the directory.- Allow external links in a package index to be specified using
rel="homepage"
orrel="download"
, without needing the old PyPI-specific visible markup.- Suppressed warning message about possibly-misspelled project name, if an egg or link for that project name has already been seen.
- Fix
bdist_egg
not including files in subdirectories of.egg-info
.- Allow
.py
files found by theinclude_package_data
option to be automatically included. Remove duplicate data file matches if bothinclude_package_data
andpackage_data
are used to refer to the same files.- Fix local
--find-links
eggs not being copied except with--always-copy
.- Fix sometimes not detecting local packages installed outside of "site" directories.
- Fix mysterious errors during initial
setuptools
install, caused byez_setup
trying to runeasy_install
twice, due to a code fallthru after deleting the egg from which it's running.
- Don't install or update a
site.py
patch when installing to aPYTHONPATH
directory with--multi-version
, unless aneasy-install.pth
file is already in use there.- Construct
.pth
file paths in such a way that installing an egg whose name begins withimport
doesn't cause a syntax error.- Fixed a bogus warning message that wasn't updated since the 0.5 versions.
- Strip
module
from the end of compiled extension modules when computing the name of a.py
loader/wrapper. (Python's import machinery ignores this suffix when searching for an extension module.)- Better ambiguity management: accept
#egg
name/version even if processing what appears to be a correctly-named distutils file, and ignore.egg
files with no-
, since valid Python.egg
files always have a version number (but Scheme eggs often don't).- Support
file://
links to directories in--find-links
, so that easy_install can build packages from local source checkouts.- Added automatic retry for Sourceforge mirrors. The new download process is to first just try dl.sourceforge.net, then randomly select mirror IPs and remove ones that fail, until something works. The removed IPs stay removed for the remainder of the run.
- Ignore bdist_dumb distributions when looking at download URLs.
Added
test_loader
keyword to support custom test loadersAdded
setuptools.file_finders
entry point group to allow implementing revision control plugins.Added
--identity
option toupload
command.Added
dependency_links
to allow specifying URLs for--find-links
.Enhanced test loader to scan packages as well as modules, and call
additional_tests()
if present to get non-unittest tests.Support namespace packages in conjunction with system packagers, by omitting the installation of any
__init__.py
files for namespace packages, and adding a special.pth
file to create a working package insys.modules
.Made
--single-version-externally-managed
automatic when--root
is used, so that most system packagers won't require special support for setuptools.Fixed
setup_requires
,tests_require
, etc. not usingsetup.cfg
or other configuration files for their option defaults when installing, and also made the install use--multi-version
mode so that the project directory doesn't need to support .pth files.
MANIFEST.in
is now forcibly closed when any errors occur while reading it. Previously, the file could be left open and the actual error would be masked by problems trying to remove the open file on Windows systems.Process
dependency_links.txt
if found in a distribution, by adding the URLs to the list for scanning.Use relative paths in
.pth
files when eggs are being installed to the same directory as the.pth
file. This maximizes portability of the target directory when building applications that contain eggs.Added
easy_install-N.N
script(s) for convenience when using multiple Python versions.Added automatic handling of installation conflicts. Eggs are now shifted to the front of sys.path, in an order consistent with where they came from, making EasyInstall seamlessly co-operate with system package managers.
The
--delete-conflicting
and--ignore-conflicts-at-my-risk
options are now no longer necessary, and will generate warnings at the end of a run if you use them.Don't recursively traverse subdirectories given to
--find-links
.
- Fixed the
develop
command ignoring--find-links
.- Added exhaustive testing of the install directory, including a spawn test for
.pth
file support, and directory writability/existence checks. This should virtually eliminate the need to set or configure--site-dirs
.- Added
--prefix
option for more do-what-I-mean-ishness in the absence of RTFM-ing. :)- Enhanced
PYTHONPATH
support so that you don't have to put any eggs on it manually to make it work.--multi-version
is no longer a silent default; you must explicitly use it if installing to a non-PYTHONPATH, non-"site" directory.- Expand
$variables
used in the--site-dirs
,--build-directory
,--install-dir
, and--script-dir
options, whether on the command line or in configuration files.- Improved SourceForge mirror processing to work faster and be less affected by transient HTML changes made by SourceForge.
- PyPI searches now use the exact spelling of requirements specified on the command line or in a project's
install_requires
. Previously, a normalized form of the name was used, which could lead to unnecessary full-index searches when a project's name had an underscore (_
) in it.- EasyInstall can now download bare
.py
files and wrap them in an egg, as long as you include an#egg=name-version
suffix on the URL, or if the.py
file is listed as the "Download URL" on the project's PyPI page. This allows third parties to "package" trivial Python modules just by linking to them (e.g. from within their own PyPI page or download links page).- The
--always-copy
option now skips "system" and "development" eggs since they can't be reliably copied. Note that this may cause EasyInstall to choose an older version of a package than what you expected, or it may cause downloading and installation of a fresh version of what's already installed.- The
--find-links
option previously scanned all supplied URLs and directories as early as possible, but now only directories and direct archive links are scanned immediately. URLs are not retrieved unless a package search was already going to go online due to a package not being available locally, or due to the use of the--update
or-U
option.- Fixed the annoying
--help-commands
wart.
- The
sdist
command no longer uses the traditionalMANIFEST
file to create source distributions.MANIFEST.in
is still read and processed, as are the standard defaults and pruning. But the manifest is built inside the project's.egg-info
directory asSOURCES.txt
, and it is rebuilt every time theegg_info
command is run.- Added the
include_package_data
keyword tosetup()
, allowing you to automatically include any package data listed in revision control orMANIFEST.in
- Added the
exclude_package_data
keyword tosetup()
, allowing you to trim back files included via thepackage_data
andinclude_package_data
options.- Fixed
--tag-svn-revision
not working when run from a source distribution.- Added warning for namespace packages with missing
declare_namespace()
- Added
tests_require
keyword tosetup()
, so that e.g. packages requiringnose
to run unit tests can make this dependency optional unless thetest
command is run.- Made all commands that use
easy_install
respect its configuration options, as this was causing some problems withsetup.py install
.- Added an
unpack_directory()
driver tosetuptools.archive_util
, so that you can process a directory tree through a processing filter as if it were a zipfile or tarfile.- Added an internal
install_egg_info
command to use as part of old-styleinstall
operations, that installs an.egg-info
directory with the package.- Added a
--single-version-externally-managed
option to theinstall
command so that you can more easily wrap a "flat" egg in a system package.- Enhanced
bdist_rpm
so that it installs single-version eggs that don't rely on a.pth
file. The--no-egg
option has been removed, since all RPMs are now built in a more backwards-compatible format.- Support full roundtrip translation of eggs to and from
bdist_wininst
format. Runningbdist_wininst
on a setuptools-based package wraps the egg in an .exe that will safely install it as an egg (i.e., with metadata and entry-point wrapper scripts), andeasy_install
can turn the .exe back into an.egg
file or directory and install it as such.- Fixed
.pth
file processing picking up nested eggs (i.e. ones inside "baskets") when they weren't explicitly listed in the.pth
file.- If more than one URL appears to describe the exact same distribution, prefer the shortest one. This helps to avoid "table of contents" CGI URLs like the ones on effbot.org.
- Quote arguments to python.exe (including python's path) to avoid problems when Python (or a script) is installed in a directory whose name contains spaces on Windows.
- Support full roundtrip translation of eggs to and from
bdist_wininst
format. Runningbdist_wininst
on a setuptools-based package wraps the egg in an .exe that will safely install it as an egg (i.e., with metadata and entry-point wrapper scripts), andeasy_install
can turn the .exe back into an.egg
file or directory and install it as such.
- Fixed some problems building extensions when Pyrex was installed, especially with Python 2.4 and/or packages using SWIG.
- Made
develop
command accept all the same options aseasy_install
, and use theeasy_install
command's configuration settings as defaults.- Made
egg_info --tag-svn-revision
fall back to extracting the revision number fromPKG-INFO
in case it is being run on a source distribution of a snapshot taken from a Subversion-based project.- Automatically detect
.dll
,.so
and.dylib
files that are being installed as data, adding them tonative_libs.txt
automatically.- Fixed some problems with fresh checkouts of projects that don't include
.egg-info/PKG-INFO
under revision control and put the project's source code directly in the project directory. If such a package had any requirements that get processed before theegg_info
command can be run, the setup scripts would fail with a "Missing 'Version:' header and/or PKG-INFO file" error, because the egg runtime interpreted the unbuilt metadata in a directory onsys.path
(i.e. the current directory) as being a corrupted egg. Setuptools now monkeypatches the distribution metadata cache to pretend that the egg has valid version information, until it has a chance to make it actually be so (via theegg_info
command).- Update for changed SourceForge mirror format
- Fixed not installing dependencies for some packages fetched via Subversion
- Fixed dependency installation with
--always-copy
not using the same dependency resolution procedure as other operations.- Fixed not fully removing temporary directories on Windows, if a Subversion checkout left read-only files behind
- Fixed some problems building extensions when Pyrex was installed, especially with Python 2.4 and/or packages using SWIG.
- Fixed not being able to install Windows script wrappers using Python 2.3
- Added support for "traditional" PYTHONPATH-based non-root installation, and also the convenient
virtual-python.py
script, based on a contribution by Ian Bicking. The setuptools egg now contains a hackedsite
module that makes the PYTHONPATH-based approach work with .pth files, so that you can get the full EasyInstall feature set on such installations.- Added
--no-deps
and--allow-hosts
options.- Improved Windows
.exe
script wrappers so that the script can have the same name as a module without confusing Python.- Changed dependency processing so that it's breadth-first, allowing a depender's preferences to override those of a dependee, to prevent conflicts when a lower version is acceptable to the dependee, but not the depender. Also, ensure that currently installed/selected packages aren't given precedence over ones desired by a package being installed, which could cause conflict errors.
- Fixed missing gui/cli .exe files in distribution. Fixed bugs in tests.
- Added
gui_scripts
entry point group to allow installing GUI scripts on Windows and other platforms. (The special handling is only for Windows; other platforms are treated the same as forconsole_scripts
.)- Improved error message when trying to use old ways of running
easy_install
. Removed the ability to run viapython -m
or by runningeasy_install.py
;easy_install
is the command to run on all supported platforms.- Improved wrapper script generation and runtime initialization so that a VersionConflict doesn't occur if you later install a competing version of a needed package as the default version of that package.
- Fixed a problem parsing version numbers in
#egg=
links.
- Added
console_scripts
entry point group to allow installing scripts without the need to create separate script files. On Windows, console scripts get an.exe
wrapper so you can just type their name. On other platforms, the scripts are written without a file extension.- EasyInstall can now install "console_scripts" defined by packages that use
setuptools
and define appropriate entry points. On Windows, console scripts get an.exe
wrapper so you can just type their name. On other platforms, the scripts are installed without a file extension.- Using
python -m easy_install
or runningeasy_install.py
is now DEPRECATED, since aneasy_install
wrapper is now available on all platforms.
- Added support for building "old-style" RPMs that don't install an egg for the target package, using a
--no-egg
option.- The
build_ext
command now works better when using the--inplace
option and multiple Python versions. It now makes sure that all extensions match the current Python version, even if newer copies were built for a different Python version.- The
upload
command no longer attaches an extra.zip
when uploading eggs, as PyPI now supports egg uploads without trickery.- The
ez_setup
script/module now displays a warning before downloading the setuptools egg, and attempts to check the downloaded egg against an internal MD5 checksum table.- Fixed the
--tag-svn-revision
option ofegg_info
not finding the latest revision number; it was using the revision number of the directory containingsetup.py
, not the highest revision number in the project.- Added
eager_resources
setup argument- The
sdist
command now recognizes Subversion "deleted file" entries and does not include them in source distributions.setuptools
now embeds itself more thoroughly into the distutils, so that other distutils extensions (e.g. py2exe, py2app) will subclass setuptools' versions of things, rather than the native distutils ones.- Added
entry_points
andsetup_requires
arguments tosetup()
;setup_requires
allows you to automatically find and download packages that are needed in order to build your project (as opposed to running it).setuptools
now finds its commands,setup()
argument validators, and metadata writers using entry points, so that they can be extended by third-party packages. See Creating distutils Extensions for more details.- The vestigial
depends
command has been removed. It was never finished or documented, and never would have worked without EasyInstall - which it pre-dated and was never compatible with.- EasyInstall now does MD5 validation of downloads from PyPI, or from any link that has an "#md5=..." trailer with a 32-digit lowercase hex md5 digest.
- EasyInstall now handles symlinks in target directories by removing the link, rather than attempting to overwrite the link's destination. This makes it easier to set up an alternate Python "home" directory (as described in the Non-Root Installation section of the docs).
- Added support for handling MacOS platform information in
.egg
filenames, based on a contribution by Kevin Dangoor. You may wish to delete and reinstall any eggs whose filename includes "darwin" and "Power_Macintosh", because the format for this platform information has changed so that minor OS X upgrades (such as 10.4.1 to 10.4.2) do not cause eggs built with a previous OS version to become obsolete.- easy_install's dependency processing algorithms have changed. When using
--always-copy
, it now ensures that dependencies are copied too. When not using--always-copy
, it tries to use a single resolution loop, rather than recursing.- Fixed installing extra
.pyc
or.pyo
files for scripts with.py
extensions.- Added
--site-dirs
option to allow adding custom "site" directories. Madeeasy-install.pth
work in platform-specific alternate site directories (e.g.~/Library/Python/2.x/site-packages
on Mac OS X).- If you manually delete the current version of a package, the next run of EasyInstall against the target directory will now remove the stray entry from the
easy-install.pth
file.- EasyInstall now recognizes URLs with a
#egg=project_name
fragment ID as pointing to the named project's source checkout. Such URLs have a lower match precedence than any other kind of distribution, so they'll only be used if they have a higher version number than any other available distribution, or if you use the--editable
option. The#egg
fragment can contain a version if it's formatted as#egg=proj-ver
, whereproj
is the project name, andver
is the version number. You must use the format for these values that thebdist_egg
command uses; i.e., all non-alphanumeric runs must be condensed to single underscore characters.- Added the
--editable
option; see Editing and Viewing Source Packages in the docs. Also, slightly changed the behavior of the--build-directory
option.- Fixed the setup script sandbox facility not recognizing certain paths as valid on case-insensitive platforms.
- The zip-safety scanner now checks for modules that might be used with
python -m
, and marks them as unsafe for zipping, since Python 2.4 can't handle-m
on zipped modules.- Fix
python -m easy_install
not working due to setuptools being installed as a zipfile. Update safety scanner to check for modules that might be used aspython -m
scripts.- Misc. fixes for win32.exe support, including changes to support Python 2.4's changed
bdist_wininst
format.
- Fix breakage of the "develop" command that was caused by the addition of
--always-unzip
to theeasy_install
command.
- Put the
easy_install
module back in as a module, as it's needed forpython -m
to run it!- Allow
--find-links/-f
to accept local directories or filenames as well as URLs.
- Include
svn:externals
directories in source distributions as well as normal subversion-controlled files and directories.- Added
exclude=patternlist
option tosetuptools.find_packages()
- Changed --tag-svn-revision to include an "r" in front of the revision number for better readability.
- Added ability to build eggs without including source files (except for any scripts, of course), using the
--exclude-source-files
option tobdist_egg
.setup.py install
now automatically detects when an "unmanaged" package or module is going to be onsys.path
ahead of a package being installed, thereby preventing the newer version from being imported. If this occurs, a warning message is output tosys.stderr
, but installation proceeds anyway. The warning message informs the user what files or directories need deleting, and advises them they can also use EasyInstall (with the--delete-conflicting
option) to do it automatically.- The
egg_info
command now adds atop_level.txt
file to the metadata directory that lists all top-level modules and packages in the distribution. This is used by theeasy_install
command to find possibly-conflicting "unmanaged" packages when installing the distribution.- Added
zip_safe
andnamespace_packages
arguments tosetup()
. Added package analysis to determine zip-safety if thezip_safe
flag is not given, and advise the author regarding what code might need changing.- Fixed the swapped
-d
and-b
options ofbdist_egg
.- EasyInstall now automatically detects when an "unmanaged" package or module is going to be on
sys.path
ahead of a package you're installing, thereby preventing the newer version from being imported. By default, it will abort installation to alert you of the problem, but there are also new options (--delete-conflicting
and--ignore-conflicts-at-my-risk
) available to change the default behavior. (Note: this new feature doesn't take effect for egg files that were built with oldersetuptools
versions, because they lack the new metadata file required to implement it.)- The
easy_install
distutils command now usesDistutilsError
as its base error type for errors that should just issue a message to stderr and exit the program without a traceback.- EasyInstall can now be given a path to a directory containing a setup script, and it will attempt to build and install the package there.
- EasyInstall now performs a safety analysis on module contents to determine whether a package is likely to run in zipped form, and displays information about what modules may be doing introspection that would break when running as a zipfile.
- Added the
--always-unzip/-Z
option, to force unzipping of packages that would ordinarily be considered safe to unzip, and changed the meaning of--zip-ok/-z
to "always leave everything zipped".
- The "egg_info" command now always sets the distribution metadata to "safe" forms of the distribution name and version, so that distribution files will be generated with parseable names (i.e., ones that don't include '-' in the name or version). Also, this means that if you use the various
--tag
options of "egg_info", any distributions generated will use the tags in the version, not just egg distributions.- Added support for defining command aliases in distutils configuration files, under the "[aliases]" section. To prevent recursion and to allow aliases to call the command of the same name, a given alias can be expanded only once per command-line invocation. You can define new aliases with the "alias" command, either for the local, global, or per-user configuration.
- Added "rotate" command to delete old distribution files, given a set of patterns to match and the number of files to keep. (Keeps the most recently-modified distribution files matching each pattern.)
- Added "saveopts" command that saves all command-line options for the current invocation to the local, global, or per-user configuration file. Useful for setting defaults without having to hand-edit a configuration file.
- Added a "setopt" command that sets a single option in a specified distutils configuration file.
- There is now a separate documentation page for setuptools; revision history that's not specific to EasyInstall has been moved to that page.
- Added "upload" support for egg and source distributions, including a bug fix for "upload" and a temporary workaround for lack of .egg support in PyPI.
- Beefed up the "sdist" command so that if you don't have a MANIFEST.in, it will include all files under revision control (CVS or Subversion) in the current directory, and it will regenerate the list every time you create a source distribution, not just when you tell it to. This should make the default "do what you mean" more often than the distutils' default behavior did, while still retaining the old behavior in the presence of MANIFEST.in.
- Fixed the "develop" command always updating .pth files, even if you specified
-n
or--dry-run
.- Slightly changed the format of the generated version when you use
--tag-build
on the "egg_info" command, so that you can make tagged revisions compare lower than the version specified in setup.py (e.g. by using--tag-build=dev
).
- Added
develop
command tosetuptools
-based packages. This command installs an.egg-link
pointing to the package's source directory, and script wrappers thatexecfile()
the source versions of the package's scripts. This lets you put your development checkout(s) on sys.path without having to actually install them. (To uninstall the link, use usesetup.py develop --uninstall
.)- Added
egg_info
command tosetuptools
-based packages. This command just creates or updates the "projectname.egg-info" directory, without building an egg. (It's used by thebdist_egg
,test
, anddevelop
commands.)- Enhanced the
test
command so that it doesn't install the package, but instead builds any C extensions in-place, updates the.egg-info
metadata, adds the source directory tosys.path
, and runs the tests directly on the source. This avoids an "unmanaged" installation of the package tosite-packages
or elsewhere.- Made
easy_install
a standardsetuptools
command, moving it from theeasy_install
module tosetuptools.command.easy_install
. Note that if you were importing or extending it, you must now change your imports accordingly.easy_install.py
is still installed as a script, but not as a module.
- Setup scripts using setuptools can now list their dependencies directly in the setup.py file, without having to manually create a
depends.txt
file. Theinstall_requires
andextras_require
arguments tosetup()
are used to create a dependencies file automatically. If you are manually creatingdepends.txt
right now, please switch to using these setup arguments as soon as practical, becausedepends.txt
support will be removed in the 0.6 release cycle. For documentation on the new arguments, see thesetuptools.dist.Distribution
class.- Setup scripts using setuptools now always install using
easy_install
internally, for ease of uninstallation and upgrading.- Added
--always-copy/-a
option to always copy needed packages to the installation directory, even if they're already present elsewhere on sys.path. (In previous versions, this was the default behavior, but now you must request it.)- Added
--upgrade/-U
option to force checking PyPI for latest available version(s) of all packages requested by name and version, even if a matching version is available locally.- Added automatic installation of dependencies declared by a distribution being installed. These dependencies must be listed in the distribution's
EGG-INFO
directory, so the distribution has to have declared its dependencies by using setuptools. If a package has requirements it didn't declare, you'll still have to deal with them yourself. (E.g., by asking EasyInstall to find and install them.)- Added the
--record
option toeasy_install
for the benefit of tools that runsetup.py install --record=filename
on behalf of another packaging system.)
- Fixed not setting script permissions to allow execution.
- Improved sandboxing so that setup scripts that want a temporary directory (e.g. pychecker) can still run in the sandbox.
- Fix stupid stupid refactoring-at-the-last-minute typos. :(
Added support for "self-installation" bootstrapping. Packages can now include
ez_setup.py
in their source distribution, and add the following to theirsetup.py
, in order to automatically bootstrap installation of setuptools as part of their setup process:from ez_setup import use_setuptools use_setuptools() from setuptools import setup # etc...Added support for converting
.win32.exe
installers to eggs on the fly. EasyInstall will now recognize such files by name and install them.Fixed a problem with picking the "best" version to install (versions were being sorted as strings, rather than as parsed values)
- Added support for the distutils "verbose/quiet" and "dry-run" options, as well as the "optimize" flag.
- Support downloading packages that were uploaded to PyPI (by scanning all links on package pages, not just the homepage/download links).
- Add progress messages to the search/download process so that you can tell what URLs it's reading to find download links. (Hopefully, this will help people report out-of-date and broken links to package authors, and to tell when they've asked for a package that doesn't exist.)
- Added
ez_setup.py
installer/bootstrap script to make initial setuptools installation easier, and to allow distributions using setuptools to avoid having to include setuptools in their source distribution.- All downloads are now managed by the
PackageIndex
class (which is now subclassable and replaceable), so that embedders can more easily override download logic, give download progress reports, etc. The class has also been moved to the newsetuptools.package_index
module.- The
Installer
class no longer handles downloading, manages a temporary directory, or tracks thezip_ok
option. Downloading is now handled byPackageIndex
, andInstaller
has become aneasy_install
command class based onsetuptools.Command
.- There is a new
setuptools.sandbox.run_setup()
API to invoke a setup script in a directory sandbox, and a newsetuptools.archive_util
module with anunpack_archive()
API. These were split out of EasyInstall to allow reuse by other tools and applications.setuptools.Command
now supports reinitializing commands using keyword arguments to set/reset options. Also,Command
subclasses can now set theircommand_consumes_arguments
attribute toTrue
in order to receive anargs
option containing the rest of the command line.- Added support for installing scripts
- Added support for setting options via distutils configuration files, and using distutils' default options as a basis for EasyInstall's defaults.
- Renamed
--scan-url/-s
to--find-links/-f
to free up-s
for the script installation directory option.- Use
urllib2
instead ofurllib
, to allow use ofhttps:
URLs if Python includes SSL support.
- Added
--scan-url
and--index-url
options, to scan download pages and search PyPI for needed packages.
- Restrict
--build-directory=DIR/-b DIR
option to only be used with single URL installs, to avoid running the wrong setup.py.
- Added
--build-directory=DIR/-b DIR
option.- Added "installation report" that explains how to use 'require()' when doing a multiversion install or alternate installation directory.
- Added SourceForge mirror auto-select (Contributed by Ian Bicking)
- Added "sandboxing" that stops a setup script from running if it attempts to write to the filesystem outside of the build area
- Added more workarounds for packages with quirky
install_data
hacks
- Added new options to
bdist_egg
to allow tagging the egg's version number with a subversion revision number, the current date, or an explicit tag value. Runsetup.py bdist_egg --help
to get more information.- Added subversion download support for
svn:
andsvn+
URLs, as well as automatic recognition of HTTP subversion URLs (Contributed by Ian Bicking)- Misc. bug fixes
- Initial release.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。