• Home
  • Raw
  • Download

Lines Matching +full:build +full:- +full:packages

6 that lets you automatically download, build, install, and manage Python
7 packages.
11 <http://mail.python.org/pipermail/distutils-sig/>`_. (Note: please DO NOT send
13 mailing list is a searchable archive of previously-asked and answered
15 bug -- and then do so via list discussion first.)
18 own packages work better with EasyInstall, or provide EasyInstall-like features
32 -------------------------
42 are installing to Python's primary ``site-packages`` directory. If this is
48 internet. If you are behind an NTLM-based firewall that prevents Python
54 can restrict it from doing so with the ``--allow-hosts`` option; see the
55 sections on `restricting downloads with --allow-hosts`_ and `command-line
64 cause is that you installed to a location other than ``site-packages``,
67 make sure that your custom location will work correctly. Then re-install.
70 packages, but then you can't import them, the most likely issue is that you
71 installed EasyInstall correctly but are using it to install packages to a
72 non-standard location that hasn't been properly prepared. Again, see the
86 ------------------------------------
101 easy_install -f http://pythonpaste.org/package_index.html SQLObject
106 easy_install http://example.com/path/to/MyPackage-1.2.3.tgz
108 **Example 4**. Install an already-downloaded .egg file::
110 easy_install /my_downloads/OtherPackage-3.2.1-py2.3.egg
112 **Example 5**. Upgrade an already-installed package to the latest version
115 easy_install --upgrade PyProtocols
124 ``~/projects/sqlobject`` (the name will always be in all-lowercase), where it
127 and Viewing Source Packages`_ below for more info.)::
129 easy_install --editable --build-directory ~/projects SQLObject
133 easy_install --user SQLAlchemy
141 .tar.bz2, or .zip. And of course it handles already-built .egg
144 By default, packages are installed to the running Python installation's
145 ``site-packages`` directory, unless you provide the ``-d`` or ``--install-dir``
154 installed package. You can override this using the ``-s`` or ``--script-dir``
157 Installed packages are added to an ``easy-install.pth`` file in the install
158 directory, so that Python will always use the most-recently-installed version
160 runtime, you should use the ``-m`` or ``--multi-version`` option.
164 -------------------
177 easy_install --upgrade SomePackage
181 easy_install -f http://example.com/downloads ExamplePackage
183 easy_install http://example.com/downloads/ExamplePackage-2.0-py2.4.egg
185 easy_install my_downloads/ExamplePackage-2.0.tgz
187 If you're using ``-m`` or ``--multi-version`` , using the ``require()``
190 the only step needed to upgrade such packages.
193 directory (and not using ``-m``), installing a package automatically replaces
194 any previous version in the ``easy-install.pth`` file, so that Python will
195 import the most-recently installed version by default. So, again, installing
198 If you haven't suppressed script installation (using ``--exclude-scripts`` or
199 ``-x``), then the upgraded version's scripts will be installed, and they will
201 package, so that you can use them even if they are installed in multi-version
204 ``easy_install`` never actually deletes packages (unless you're installing a
207 Packages`_, below.
211 ---------------------------
213 If you've upgraded a package, but need to revert to a previously-installed
233 active version's scripts, unless the ``--exclude-scripts`` or ``-x`` option is
237 Uninstalling Packages
238 ---------------------
241 the package(s) you don't need by deleting the PackageName-versioninfo.egg file
247 easy_install -m PackageName
255 ----------------
259 you tell it not to with ``-x`` or ``--exclude-scripts``. If any scripts in
269 of a script available, however, you can simply use the ``--multi-version`` or
270 ``-m`` option, and rename the scripts that EasyInstall creates. This works
279 easy_install -m docutils==0.3.9
283 easy_install -m docutils==0.3.10
287 different version of the package. (Notice that we used ``-m`` for both
289 recently-installed version of the package.)
293 -------------------------
313 `Command-Line Options`_ and `Configuration Files`_. During installation,
314 pass command line options (such as ``--script-dir``) to
351 -----------------
357 ``easy_install`` and ``easy_install-N.N``, where ``N.N`` is the Python version
359 2.7, you can use the ``easy_install-3.2`` or ``easy_install-2.7`` scripts to
360 install packages for the respective Python version.
363 invoked using ``python -m easy_install`` for any Python with Setuptools
366 Restricting Downloads with ``--allow-hosts``
369 You can use the ``--allow-hosts`` (``-H``) option to restrict what domains
370 EasyInstall will look for links and downloads on. ``--allow-hosts=None``
373 on `Command-Line Options`_ for more details on the ``--allow-hosts`` option.
378 .. code-block:: ini
388 Installing on Un-networked Machines
391 Just copy the eggs or source packages you need to a directory on the target
392 machine, then use the ``-f`` or ``--find-links`` option to specify that
395 easy_install -H None -f somedir SomePackage
397 will attempt to install SomePackage using only eggs and source packages found
402 (or if the packages aren't platform-specific), you can create the directory of
405 easy_install -zmaxd somedir SomePackage
407 This will tell EasyInstall to put zipped eggs or source packages for
410 target machine. (``-z`` means zipped eggs, ``-m`` means multi-version, which
411 prevents .pth files from being used, ``-a`` means to copy all the eggs needed,
412 even if they're installed elsewhere on the machine, and ``-d`` indicates the
415 You can also build the eggs from local development packages that were installed
416 with the ``setup.py develop`` command, by including the ``-l`` option, e.g.::
418 easy_install -zmaxld somedir SomePackage
420 This will use locally-available source distributions to build the eggs.
427 EasyInstall to build eggs for a project. You'll want to use the ``--zip-ok``,
428 ``--exclude-scripts``, and possibly ``--no-deps`` options (``-z``, ``-x`` and
429 ``-N``, respectively). Use ``-d`` or ``--install-dir`` to specify the location
435 wrap it in an egg by tacking an ``#egg=name-version`` suffix on the file's URL.
438 easy_install -f "http://some.example.com/downloads/foo.py#egg=foo-1.0" foo
442 easy_install -zmaxd. \
443 -f "http://some.example.com/downloads/foo.py#egg=foo-1.0" foo
452 find download links on most any web page whose URL is given to the ``-f``
453 (``--find-links``) option. In the simplest case, you can simply have a web
454 page with links to eggs or Python source packages, even an automatically
461 .. code-block:: ini
472 or PyPI mirror. See the ``--index-url`` option under `Command-Line Options`_,
476 Password-Protected Sites
477 ------------------------
479 If a site you want to download from is password-protected using HTTP "Basic"
489 -------------------------
493 repository of packages may already have defined access credentials for
494 uploading packages according to the distutils documentation. ``easy_install``
498 Controlling Build Options
502 them to configure build options for packages that it installs from source. For
506 .. code-block:: ini
508 [build]
515 default compiler for *all* packages you build. See `Configuration Files`_
520 Editing and Viewing Source Packages
525 you want to be able to examine these files, you can use the ``--editable``
528 as a subdirectory of the ``--build-directory`` you specify. If you then wish
532 Note that using ``--editable`` stops EasyInstall from actually building or
540 In order to use ``--editable`` (``-e`` for short), you *must* also supply a
541 ``--build-directory`` (``-b`` for short). The project will be placed in a
542 subdirectory of the build directory. The subdirectory will have the same
543 name as the project itself, but in all-lowercase. If a file or directory of
546 Also, when using ``--editable``, you cannot use URLs or filenames as arguments.
550 ``--find-links`` item (``-f`` for short), and then also specify
553 easy_install -eb ~/projects \
554 -fhttp://prdownloads.sourceforge.net/ctypes/ctypes-0.9.6.tar.gz?download \
564 old or system-installed packages, and without ignoring the issue. Instead,
566 code added to the ``easy-install.pth`` file. So, if you are using version
572 However, packages that were not installed by EasyInstall are "unmanaged",
579 install``, because the ``distutils`` just install new packages on top of old
580 ones, possibly combining two unrelated packages or leaving behind modules that
588 delete these conflicting files and directories and re-run EasyInstall.
590 Of course, once you've replaced all of your existing "unmanaged" packages with
598 EasyInstall tries to install packages in zipped form, if it can. Zipping
599 packages can improve Python's overall import performance if you're not using
600 the ``--multi-version`` option, because Python processes zipfile entries on
603 As of version 0.5a9, EasyInstall analyzes packages to determine whether they
606 ``--zip-ok`` option.)
616 * Top-level modules that might be scripts used with ``python -m`` (Python 2.4)
620 a directory instead. You can override this analysis with the ``-zip-ok`` flag,
622 you can use the ``--always-unzip`` flag, in which case EasyInstall will always
635 own analysis. However, your command-line option, if any, will still override
643 -------------------
650 then a ``~/.pydistutils.cfg`` or ``$HOME\\pydistutils.cfg`` (on Unix-like OSes
654 .. code-block:: ini
658 # set the default location to install packages
662 # value; this is especially useful for the "--find-links"
675 locations, build options, etc., EasyInstall will respect your existing settings
679 location of distutils configuration files <https://docs.python.org/install/index.html#inst-config-f…
685 Command-Line Options
686 --------------------
688 ``--zip-ok, -z``
689 Install all packages as zip files, even if they are marked as unsafe for
691 of a non-setuptools package is too conservative, but keep in mind that
695 ``--always-unzip, -Z``
696 Don't install any packages as zip files, even if the packages are marked
704 (Note: the ``-z/-Z`` options only affect the installation of newly-built
705 or downloaded packages that are not already installed in the target
708 version first, and re-run EasyInstall.)
710 ``--multi-version, -m``
711 "Multi-version" mode. Specifying this option prevents ``easy_install`` from
712 adding an ``easy-install.pth`` entry for the package being installed, and
714 upon successful installation. In multi-version mode, no specific version of
722 which will put the latest installed version of the specified packages on
728 installing to a non-PYTHONPATH, non-"site" directory. You must always
731 ``--upgrade, -U`` (New in 0.5a4)
735 ``--upgrade`` or ``-U`` flag, EasyInstall will always check the package
736 index and ``--find-links`` URLs before selecting a version to install. In
741 ``--install-dir=DIR, -d DIR``
749 location is used. Normally, this would be the ``site-packages`` directory,
753 ``--prefix`` option.
755 ``--script-dir=DIR, -s DIR``
758 an ``--install-dir`` (via command line or config file), then this option
764 ``--exclude-scripts, -x``
769 ``--user`` (New in 0.6.11)
770 Use the user-site-packages as specified in :pep:`370`
771 instead of the global site-packages.
773 ``--always-copy, -a`` (New in 0.5a4)
789 ``--find-links=URLS_OR_FILENAMES, -f URLS_OR_FILENAMES``
796 because it doesn't exist locally, or because ``--upgrade`` or ``-U`` was
800 Eggs and archives found by way of ``--find-links`` are only downloaded if
802 to unneeded packages are ignored.
804 If all requested packages can be found using links on the specified
806 also specified the ``--upgrade`` or ``-U`` option.
822 package not being available locally, or due to the use of the ``--update``
823 or ``-U`` option.
825 ``--no-find-links`` Blocks the addition of any link.
828 dependency). When used, ``--find-links`` is ignored.
832 ``--index-url=URL, -i URL`` (New in 0.4a1; default changed in 0.6c7)
835 that is not locally available or linked from a ``--find-links`` download
840 ``--editable, -e`` (New in 0.6a1)
842 unpacking them to subdirectories of the specified ``--build-directory``.
843 EasyInstall will not actually build or install the requested projects or
845 `Editing and Viewing Source Packages`_ above for more details.
847 ``--build-directory=DIR, -b DIR`` (UPDATED in 0.6a1)
848 Set the directory used to build source packages. If a package is built
851 same name as the extracted distribution's project, but in all-lowercase.
853 a warning will be printed to the console, and the build will take place in
856 This option is most useful in combination with the ``--editable`` option,
857 which forces EasyInstall to *only* find and extract (but not build and
858 install) source distributions. See `Editing and Viewing Source Packages`_,
861 ``--verbose, -v, --quiet, -q`` (New in 0.4a4)
864 relatively time-consuming operations like running a setup script, unpacking
865 an archive, or retrieving a URL. Using ``-q`` or ``--quiet`` drops the
867 warnings, and errors. Using ``-v`` or ``--verbose`` increases the detail
868 level to include individual file-level operations, link analysis messages,
870 the ``-v`` option more than once, the second and subsequent uses are passed
874 ``--dry-run, -n`` (New in 0.4a4)
876 to any setup scripts run, so packages should not actually build either.
878 distributions to a temporary/build directory.
880 ``--optimize=LEVEL``, ``-O LEVEL`` (New in 0.4a4)
882 ``--zip-ok`` option, this option controls the optimization level for
889 ``--record=FILENAME`` (New in 0.5a4)
895 ``--site-dirs=DIRLIST, -S DIRLIST`` (New in 0.6a1)
898 as the main Python ``site-packages`` directory. As of 0.6a10, EasyInstall
905 ``--no-deps, -N`` (New in 0.6a6)
907 tools that wrap eggs in a platform-specific packaging system. (We don't
910 ``--allow-hosts=PATTERNS, -H PATTERNS`` (New in 0.6a6)
912 patterns. E.g. ``-H *.python.org`` restricts web access so that only
913 packages listed and downloadable from machines in the ``python.org``
921 access altogether (e.g. ``-Hlocalhost``), or to restrict it to an intranet
924 can't find suitable packages. EasyInstall displays all blocked URLs, so
925 that you can adjust your ``--allow-hosts`` setting if it is more strict
930 ``--prefix=DIR`` (New in 0.6a10)
933 directories will be ``prefix\\Lib\\site-packages`` and ``prefix\\Scripts``,
935 ``prefix/lib/python2.X/site-packages`` (with the appropriate version
938 Note that the ``--prefix`` option only sets the *default* installation and
942 ``--local-snapshots-ok, -l`` (New in 0.6c6)
944 projects, not in-development ones, because such projects may not
945 have a currently-valid version number. So, it usually only installs them
948 However, if this option is used, then any in-development projects that were
949 installed using the ``setup.py develop`` command, will be used to build
950 eggs, effectively upgrading the "in-development" project to a snapshot
952 ``--always-copy`` option to create a distributable snapshot of every egg
956 version number (such as an SVN revision number tag) for any in-development
962 .. _non-root installation:
965 -----------------------------
967 By default, EasyInstall installs python packages into Python's main ``site-packages`` directory,
970 Very often though, a user or developer wants ``easy_install`` to install and manage python packages
973 1. They don't have access to write to the main Python site-packages directory.
975 2. They want a user-specific stash of packages, that is not visible to other users.
977 3. They want to isolate a set of packages to a specific python application, usually to minimize
983 `Use the "--user" option`_
985 `Use the "--user" option and customize "PYTHONUSERBASE"`_
989 …terations, but all of these are effectively deprecated by the User scheme brought in by `PEP-370`_.
991 .. _PEP-370: http://www.python.org/dev/peps/pep-0370/
994 Use the "--user" option
1000 specifying the ``--user`` option to ``setup.py install`` or ``easy_install``.
1001 This approach serves the need to have a user-specific stash of packages.
1003 …which is still available, but requires more effort than the User scheme to get packages recognized.
1005 Use the "--user" option and customize "PYTHONUSERBASE"
1008 variable, which updates the value of ``site.USER_BASE``. To isolate packages to a specific
1010 ``PYTHONUSERBASE``, that contains just those packages.
1014 "virtualenv" is a 3rd-party python package that effectively "clones" a python installation, thereby
1015 creating an isolated location to install packages. The evolution of "virtualenv" started before th…
1018 …installation scheme alone does not provide, e.g. the ability to hide the main python site-packages.
1027 -------------------
1030 EasyInstall to be able to look up and download packages:
1050 identify what parts of a page are index-specific and which are part of the
1055 the 32-character hex MD5 digest. EasyInstall will verify that the
1071 (Note: This requirement is a workaround for the absence of case-insensitive
1074 mechanism), then it is not necessary to include this all-packages listing
1096 <!-- <th>Home Page -->
1105 contain the string ``"Index of Packages</title>"`` somewhere in their text.
1115 &amp;digest=([0-9a-f]{32})">md5</a>\)
1122 is flattened out in the resulting egg. (There was a case-sensitivity
1125 * Prevent ``--help-commands`` and other junk from showing under Python 2.5
1126 when running ``easy_install --help``.
1139 * Fixed ``--allow-hosts`` option blocking ``file:`` URLs
1142 name (e.g. on SourceForge-hosted SVN)
1149 * Keep site directories (e.g. ``site-packages``) from being included in
1155 * The default ``--index-url`` is now ``https://pypi.python.org/simple``, to use
1163 * Fixed distutils-style scripts originally built on Windows having their line
1166 * Added ``--local-snapshots-ok`` flag, to allow building eggs from projects
1169 * Fixed not HTML-decoding URLs scraped from web pages
1177 URLs. If a password-protected page contains links to the same host (and
1182 mirror system now works well for non-browser downloads.
1188 are opened read-only (e.g. reading ``/dev/urandom`` for random numbers, as
1196 * You can once again use "python -m easy_install" with Python 2.4 and above.
1208 download and extract a source distribution using ``--editable``.
1210 * Generated scripts now use ``-x`` on the ``#!`` line when ``sys.executable``
1211 contains non-ASCII characters, to prevent deprecation warnings about an
1216 ``User-Agent`` string sent to websites it visits.
1219 * Fix creating Python wrappers for non-Python scripts
1230 directories will use an internally-generated directory listing if there is
1235 PyPI-specific visible markup.
1237 * Suppressed warning message about possibly-misspelled project name, if an egg
1241 * Fix local ``--find-links`` eggs not being copied except with
1242 ``--always-copy``.
1244 * Fix sometimes not detecting local packages installed outside of "site"
1253 ``PYTHONPATH`` directory with ``--multi-version``, unless an
1254 ``easy-install.pth`` file is already in use there.
1263 what appears to be a correctly-named distutils file, and ignore ``.egg``
1264 files with no ``-``, since valid Python ``.egg`` files always have a version
1267 * Support ``file://`` links to directories in ``--find-links``, so that
1268 easy_install can build packages from local source checkouts.
1285 * Added ``easy_install-N.N`` script(s) for convenience when using multiple
1290 making EasyInstall seamlessly co-operate with system package managers.
1292 The ``--delete-conflicting`` and ``--ignore-conflicts-at-my-risk`` options
1296 * Don't recursively traverse subdirectories given to ``--find-links``.
1301 should virtually eliminate the need to set or configure ``--site-dirs``.
1303 * Added ``--prefix`` option for more do-what-I-mean-ishness in the absence of
1304 RTFM-ing. :)
1307 manually to make it work. ``--multi-version`` is no longer a silent
1308 default; you must explicitly use it if installing to a non-PYTHONPATH,
1309 non-"site" directory.
1311 * Expand ``$variables`` used in the ``--site-dirs``, ``--build-directory``,
1312 ``--install-dir``, and ``--script-dir`` options, whether on the command line
1321 full-index searches when a project's name had an underscore (``_``) in it.
1324 as long as you include an ``#egg=name-version`` suffix on the URL, or if
1330 * The ``--always-copy`` option now skips "system" and "development" eggs since
1335 * The ``--find-links`` option previously scanned all supplied URLs and
1339 available locally, or due to the use of the ``--update`` or ``-U`` option.
1341 * Fixed the annoying ``--help-commands`` wart.
1356 format. Running ``bdist_wininst`` on a setuptools-based package wraps the
1358 and entry-point wrapper scripts), and ``easy_install`` can turn the .exe
1364 * Fixed not installing dependencies for some packages fetched via Subversion
1366 * Fixed dependency installation with ``--always-copy`` not using the same
1370 checkout left read-only files behind
1373 with Python 2.4 and/or packages using SWIG.
1379 * Added support for "traditional" PYTHONPATH-based non-root installation, and
1380 also the convenient ``virtual-python.py`` script, based on a contribution
1382 that makes the PYTHONPATH-based approach work with .pth files, so that you
1385 * Added ``--no-deps`` and ``--allow-hosts`` options.
1390 * Changed dependency processing so that it's breadth-first, allowing a
1393 Also, ensure that currently installed/selected packages aren't given
1399 ``easy_install``. Removed the ability to run via ``python -m`` or by
1410 * EasyInstall can now install "console_scripts" defined by packages that use
1415 * Using ``python -m easy_install`` or running ``easy_install.py`` is now
1421 that has an "#md5=..." trailer with a 32-digit lowercase hex md5 digest.
1426 the `Non-Root Installation`_ section).
1436 ``--always-copy``, it now ensures that dependencies are copied too. When
1437 not using ``--always-copy``, it tries to use a single resolution loop,
1443 * Added ``--site-dirs`` option to allow adding custom "site" directories.
1444 Made ``easy-install.pth`` work in platform-specific alternate site
1445 directories (e.g. ``~/Library/Python/2.x/site-packages`` on Mac OS X).
1449 from the ``easy-install.pth`` file.
1455 distribution, or if you use the ``--editable`` option. The ``#egg``
1456 fragment can contain a version if it's formatted as ``#egg=proj-ver``,
1459 i.e., all non-alphanumeric runs must be condensed to single underscore
1462 * Added the ``--editable`` option; see `Editing and Viewing Source Packages`_
1464 ``--build-directory`` option.
1467 valid on case-insensitive platforms.
1470 * Fix ``python -m easy_install`` not working due to setuptools being installed
1472 as ``python -m`` scripts.
1479 ``python -m`` to run it!
1481 * Allow ``--find-links/-f`` to accept local directories or filenames as well
1489 new options (``--delete-conflicting`` and ``--ignore-conflicts-at-my-risk``)
1499 script, and it will attempt to build and install the package there.
1506 * Added the ``--always-unzip/-Z`` option, to force unzipping of packages that
1508 ``--zip-ok/-z`` to "always leave everything zipped".
1524 * Added ``--always-copy/-a`` option to always copy needed packages to the
1529 * Added ``--upgrade/-U`` option to force checking PyPI for latest available
1530 version(s) of all packages requested by name and version, even if a matching
1535 ``EGG-INFO`` directory, so the distribution has to have declared its
1540 * Added the ``--record`` option to ``easy_install`` for the benefit of tools
1541 that run ``setup.py install --record=filename`` on behalf of another
1551 * Fix stupid stupid refactoring-at-the-last-minute typos. :(
1561 * Added support for the distutils "verbose/quiet" and "dry-run" options, as
1564 * Support downloading packages that were uploaded to PyPI (by scanning all
1570 people report out-of-date and broken links to package authors, and to tell
1579 * Renamed ``--scan-url/-s`` to ``--find-links/-f`` to free up ``-s`` for the
1586 * Added ``--scan-url`` and ``--index-url`` options, to scan download pages
1587 and search PyPI for needed packages.
1590 * Restrict ``--build-directory=DIR/-b DIR`` option to only be used with single
1594 * Added ``--build-directory=DIR/-b DIR`` option.
1599 * Added SourceForge mirror auto-select (Contributed by Ian Bicking)
1602 write to the filesystem outside of the build area
1604 * Added more workarounds for packages with quirky ``install_data`` hacks
1619 * Additional utilities to list/remove/verify packages