/usr/share/doc/python-distribute/html/easy_install.html is in python-distribute-doc 0.6.24-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Easy Install — Distribute documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '0.6.24',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="Distribute documentation" href="index.html" />
<link rel="next" title="Package Discovery and Resource Access using pkg_resources" href="pkg_resources.html" />
<link rel="prev" title="Building and Distributing Packages with Distribute" href="setuptools.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="pkg_resources.html" title="Package Discovery and Resource Access using pkg_resources"
accesskey="N">next</a></li>
<li class="right" >
<a href="setuptools.html" title="Building and Distributing Packages with Distribute"
accesskey="P">previous</a> |</li>
<li><a href="index.html">Distribute</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="easy-install">
<h1><a class="toc-backref" href="#id2">Easy Install</a><a class="headerlink" href="#easy-install" title="Permalink to this headline">¶</a></h1>
<p>Easy Install is a python module (<tt class="docutils literal"><span class="pre">easy_install</span></tt>) bundled with <tt class="docutils literal"><span class="pre">setuptools</span></tt>
that lets you automatically download, build, install, and manage Python
packages.</p>
<p>Please share your experiences with us! If you encounter difficulty installing
a package, please contact us via the <a class="reference external" href="http://mail.python.org/pipermail/distutils-sig/">distutils mailing list</a>. (Note: please DO NOT send
private email directly to the author of setuptools; it will be discarded. The
mailing list is a searchable archive of previously-asked and answered
questions; you should begin your research there before reporting something as a
bug – and then do so via list discussion first.)</p>
<p>(Also, if you’d like to learn about how you can use <tt class="docutils literal"><span class="pre">setuptools</span></tt> to make your
own packages work better with EasyInstall, or provide EasyInstall-like features
without requiring your users to use EasyInstall directly, you’ll probably want
to check out the full <a class="reference external" href="http://peak.telecommunity.com/DevCenter/setuptools">setuptools</a> documentation as well.)</p>
<div class="contents topic" id="table-of-contents">
<p class="topic-title first"><strong>Table of Contents</strong></p>
<ul class="simple">
<li><a class="reference internal" href="#easy-install" id="id2">Easy Install</a><ul>
<li><a class="reference internal" href="#using-easy-install" id="id3">Using “Easy Install”</a><ul>
<li><a class="reference internal" href="#installing-easy-install" id="id4">Installing “Easy Install”</a><ul>
<li><a class="reference internal" href="#troubleshooting" id="id5">Troubleshooting</a></li>
<li><a class="reference internal" href="#windows-notes" id="id6">Windows Notes</a></li>
</ul>
</li>
<li><a class="reference internal" href="#downloading-and-installing-a-package" id="id7">Downloading and Installing a Package</a></li>
<li><a class="reference internal" href="#upgrading-a-package" id="id8">Upgrading a Package</a></li>
<li><a class="reference internal" href="#changing-the-active-version" id="id9">Changing the Active Version</a></li>
<li><a class="reference internal" href="#uninstalling-packages" id="id10">Uninstalling Packages</a></li>
<li><a class="reference internal" href="#managing-scripts" id="id11">Managing Scripts</a></li>
<li><a class="reference internal" href="#tips-techniques" id="id12">Tips & Techniques</a><ul>
<li><a class="reference internal" href="#multiple-python-versions" id="id13">Multiple Python Versions</a></li>
<li><a class="reference internal" href="#restricting-downloads-with-allow-hosts" id="id14">Restricting Downloads with <tt class="docutils literal"><span class="pre">--allow-hosts</span></tt></a></li>
<li><a class="reference internal" href="#installing-on-un-networked-machines" id="id15">Installing on Un-networked Machines</a></li>
<li><a class="reference internal" href="#packaging-others-projects-as-eggs" id="id16">Packaging Others’ Projects As Eggs</a></li>
<li><a class="reference internal" href="#creating-your-own-package-index" id="id17">Creating your own Package Index</a></li>
</ul>
</li>
<li><a class="reference internal" href="#password-protected-sites" id="id18">Password-Protected Sites</a><ul>
<li><a class="reference internal" href="#controlling-build-options" id="id19">Controlling Build Options</a></li>
<li><a class="reference internal" href="#editing-and-viewing-source-packages" id="id20">Editing and Viewing Source Packages</a></li>
<li><a class="reference internal" href="#dealing-with-installation-conflicts" id="id21">Dealing with Installation Conflicts</a></li>
<li><a class="reference internal" href="#compressed-installation" id="id22">Compressed Installation</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#reference-manual" id="id23">Reference Manual</a><ul>
<li><a class="reference internal" href="#configuration-files" id="id24">Configuration Files</a></li>
<li><a class="reference internal" href="#command-line-options" id="id25">Command-Line Options</a></li>
<li><a class="reference internal" href="#custom-installation-locations" id="id26">Custom Installation Locations</a><ul>
<li><a class="reference internal" href="#administrator-installation" id="id27">Administrator Installation</a></li>
<li><a class="reference internal" href="#mac-os-x-user-installation" id="id28">Mac OS X “User” Installation</a></li>
<li><a class="reference internal" href="#creating-a-virtual-python" id="id29">Creating a “Virtual” Python</a></li>
<li><a class="reference internal" href="#traditional-pythonpath-based-installation" id="id30">“Traditional” <tt class="docutils literal"><span class="pre">PYTHONPATH</span></tt>-based Installation</a></li>
</ul>
</li>
<li><a class="reference internal" href="#package-index-api" id="id31">Package Index “API”</a><ul>
<li><a class="reference internal" href="#backward-compatibility" id="id32">Backward Compatibility</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#history" id="id33">History</a></li>
<li><a class="reference internal" href="#future-plans" id="id34">Future Plans</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="using-easy-install">
<h2><a class="toc-backref" href="#id3">Using “Easy Install”</a><a class="headerlink" href="#using-easy-install" title="Permalink to this headline">¶</a></h2>
<div class="section" id="installing-easy-install">
<span id="installation-instructions"></span><h3><a class="toc-backref" href="#id4">Installing “Easy Install”</a><a class="headerlink" href="#installing-easy-install" title="Permalink to this headline">¶</a></h3>
<p>Please see the <a class="reference external" href="http://pypi.python.org/pypi/setuptools">setuptools PyPI page</a>
for download links and basic installation instructions for each of the
supported platforms.</p>
<p>You will need at least Python 2.3.5, or if you are on a 64-bit platform, Python
2.4. An <tt class="docutils literal"><span class="pre">easy_install</span></tt> script will be installed in the normal location for
Python scripts on your platform.</p>
<p>Note that the instructions on the setuptools PyPI page assume that you are
are installling to Python’s primary <tt class="docutils literal"><span class="pre">site-packages</span></tt> directory. If this is
not the case, you should consult the section below on <a class="reference internal" href="#custom-installation-locations">Custom Installation
Locations</a> before installing. (And, on Windows, you should not use the
<tt class="docutils literal"><span class="pre">.exe</span></tt> installer when installing to an alternate location.)</p>
<p>Note that <tt class="docutils literal"><span class="pre">easy_install</span></tt> normally works by downloading files from the
internet. If you are behind an NTLM-based firewall that prevents Python
programs from accessing the net directly, you may wish to first install and use
the <a class="reference external" href="http://ntlmaps.sf.net/">APS proxy server</a>, which lets you get past such
firewalls in the same way that your web browser(s) do.</p>
<p>(Alternately, if you do not wish easy_install to actually download anything, you
can restrict it from doing so with the <tt class="docutils literal"><span class="pre">--allow-hosts</span></tt> option; see the
sections on <a class="reference internal" href="#restricting-downloads-with-allow-hosts">restricting downloads with –allow-hosts</a> and <a class="reference internal" href="#command-line-options">command-line
options</a> for more details.)</p>
<div class="section" id="troubleshooting">
<h4><a class="toc-backref" href="#id5">Troubleshooting</a><a class="headerlink" href="#troubleshooting" title="Permalink to this headline">¶</a></h4>
<p>If EasyInstall/setuptools appears to install correctly, and you can run the
<tt class="docutils literal"><span class="pre">easy_install</span></tt> command but it fails with an <tt class="docutils literal"><span class="pre">ImportError</span></tt>, the most likely
cause is that you installed to a location other than <tt class="docutils literal"><span class="pre">site-packages</span></tt>,
without taking any of the steps described in the <a class="reference internal" href="#custom-installation-locations">Custom Installation
Locations</a> section below. Please see that section and follow the steps to
make sure that your custom location will work correctly. Then re-install.</p>
<p>Similarly, if you can run <tt class="docutils literal"><span class="pre">easy_install</span></tt>, and it appears to be installing
packages, but then you can’t import them, the most likely issue is that you
installed EasyInstall correctly but are using it to install packages to a
non-standard location that hasn’t been properly prepared. Again, see the
section on <a class="reference internal" href="#custom-installation-locations">Custom Installation Locations</a> for more details.</p>
</div>
<div class="section" id="windows-notes">
<h4><a class="toc-backref" href="#id6">Windows Notes</a><a class="headerlink" href="#windows-notes" title="Permalink to this headline">¶</a></h4>
<p>On Windows, an <tt class="docutils literal"><span class="pre">easy_install.exe</span></tt> launcher will also be installed, so that
you can just type <tt class="docutils literal"><span class="pre">easy_install</span></tt> as long as it’s on your <tt class="docutils literal"><span class="pre">PATH</span></tt>. If typing
<tt class="docutils literal"><span class="pre">easy_install</span></tt> at the command prompt doesn’t work, check to make sure your
<tt class="docutils literal"><span class="pre">PATH</span></tt> includes the appropriate <tt class="docutils literal"><span class="pre">C:\\Python2X\\Scripts</span></tt> directory. On
most current versions of Windows, you can change the <tt class="docutils literal"><span class="pre">PATH</span></tt> by right-clicking
“My Computer”, choosing “Properties” and selecting the “Advanced” tab, then
clicking the “Environment Variables” button. <tt class="docutils literal"><span class="pre">PATH</span></tt> will be in the “System
Variables” section, and you will need to exit and restart your command shell
(command.com, cmd.exe, bash, or other) for the change to take effect. Be sure
to add a <tt class="docutils literal"><span class="pre">;</span></tt> after the last item on <tt class="docutils literal"><span class="pre">PATH</span></tt> before adding the scripts
directory to it.</p>
<p>Note that instead of changing your <tt class="docutils literal"><span class="pre">PATH</span></tt> to include the Python scripts
directory, you can also retarget the installation location for scripts so they
go on a directory that’s already on the <tt class="docutils literal"><span class="pre">PATH</span></tt>. For more information see the
sections below on <a class="reference internal" href="#command-line-options">Command-Line Options</a> and <a class="reference internal" href="#configuration-files">Configuration Files</a>. You
can pass command line options (such as <tt class="docutils literal"><span class="pre">--script-dir</span></tt>) to
<tt class="docutils literal"><span class="pre">distribute_setup.py</span></tt> to control where <tt class="docutils literal"><span class="pre">easy_install.exe</span></tt> will be installed.</p>
</div>
</div>
<div class="section" id="downloading-and-installing-a-package">
<h3><a class="toc-backref" href="#id7">Downloading and Installing a Package</a><a class="headerlink" href="#downloading-and-installing-a-package" title="Permalink to this headline">¶</a></h3>
<p>For basic use of <tt class="docutils literal"><span class="pre">easy_install</span></tt>, you need only supply the filename or URL of
a source distribution or .egg file (<a class="reference external" href="http://peak.telecommunity.com/DevCenter/PythonEggs">Python Egg</a>).</p>
<p><strong>Example 1</strong>. Install a package by name, searching PyPI for the latest
version, and automatically downloading, building, and installing it:</p>
<div class="highlight-python"><pre>easy_install SQLObject</pre>
</div>
<p><strong>Example 2</strong>. Install or upgrade a package by name and version by finding
links on a given “download page”:</p>
<div class="highlight-python"><pre>easy_install -f http://pythonpaste.org/package_index.html SQLObject</pre>
</div>
<p><strong>Example 3</strong>. Download a source distribution from a specified URL,
automatically building and installing it:</p>
<div class="highlight-python"><pre>easy_install http://example.com/path/to/MyPackage-1.2.3.tgz</pre>
</div>
<p><strong>Example 4</strong>. Install an already-downloaded .egg file:</p>
<div class="highlight-python"><pre>easy_install /my_downloads/OtherPackage-3.2.1-py2.3.egg</pre>
</div>
<p><strong>Example 5</strong>. Upgrade an already-installed package to the latest version
listed on PyPI:</p>
<div class="highlight-python"><pre>easy_install --upgrade PyProtocols</pre>
</div>
<p><strong>Example 6</strong>. Install a source distribution that’s already downloaded and
extracted in the current directory (New in 0.5a9):</p>
<div class="highlight-python"><pre>easy_install .</pre>
</div>
<p><strong>Example 7</strong>. (New in 0.6a1) Find a source distribution or Subversion
checkout URL for a package, and extract it or check it out to
<tt class="docutils literal"><span class="pre">~/projects/sqlobject</span></tt> (the name will always be in all-lowercase), where it
can be examined or edited. (The package will not be installed, but it can
easily be installed with <tt class="docutils literal"><span class="pre">easy_install</span> <span class="pre">~/projects/sqlobject</span></tt>. See <a class="reference internal" href="#editing-and-viewing-source-packages">Editing
and Viewing Source Packages</a> below for more info.):</p>
<div class="highlight-python"><pre>easy_install --editable --build-directory ~/projects SQLObject</pre>
</div>
<p><strong>Example 7</strong>. (New in 0.6.11) Install a distribution within your home dir:</p>
<div class="highlight-python"><pre>easy_install --user SQLAlchemy</pre>
</div>
<p>Easy Install accepts URLs, filenames, PyPI package names (i.e., <tt class="docutils literal"><span class="pre">distutils</span></tt>
“distribution” names), and package+version specifiers. In each case, it will
attempt to locate the latest available version that meets your criteria.</p>
<p>When downloading or processing downloaded files, Easy Install recognizes
distutils source distribution files with extensions of .tgz, .tar, .tar.gz,
.tar.bz2, or .zip. And of course it handles already-built .egg
distributions as well as <tt class="docutils literal"><span class="pre">.win32.exe</span></tt> installers built using distutils.</p>
<p>By default, packages are installed to the running Python installation’s
<tt class="docutils literal"><span class="pre">site-packages</span></tt> directory, unless you provide the <tt class="docutils literal"><span class="pre">-d</span></tt> or <tt class="docutils literal"><span class="pre">--install-dir</span></tt>
option to specify an alternative directory, or specify an alternate location
using distutils configuration files. (See <a class="reference internal" href="#configuration-files">Configuration Files</a>, below.)</p>
<p>By default, any scripts included with the package are installed to the running
Python installation’s standard script installation location. However, if you
specify an installation directory via the command line or a config file, then
the default directory for installing scripts will be the same as the package
installation directory, to ensure that the script will have access to the
installed package. You can override this using the <tt class="docutils literal"><span class="pre">-s</span></tt> or <tt class="docutils literal"><span class="pre">--script-dir</span></tt>
option.</p>
<p>Installed packages are added to an <tt class="docutils literal"><span class="pre">easy-install.pth</span></tt> file in the install
directory, so that Python will always use the most-recently-installed version
of the package. If you would like to be able to select which version to use at
runtime, you should use the <tt class="docutils literal"><span class="pre">-m</span></tt> or <tt class="docutils literal"><span class="pre">--multi-version</span></tt> option.</p>
</div>
<div class="section" id="upgrading-a-package">
<h3><a class="toc-backref" href="#id8">Upgrading a Package</a><a class="headerlink" href="#upgrading-a-package" title="Permalink to this headline">¶</a></h3>
<p>You don’t need to do anything special to upgrade a package: just install the
new version, either by requesting a specific version, e.g.:</p>
<div class="highlight-python"><pre>easy_install "SomePackage==2.0"</pre>
</div>
<p>a version greater than the one you have now:</p>
<div class="highlight-python"><pre>easy_install "SomePackage>2.0"</pre>
</div>
<p>using the upgrade flag, to find the latest available version on PyPI:</p>
<div class="highlight-python"><pre>easy_install --upgrade SomePackage</pre>
</div>
<p>or by using a download page, direct download URL, or package filename:</p>
<div class="highlight-python"><pre>easy_install -f http://example.com/downloads ExamplePackage
easy_install http://example.com/downloads/ExamplePackage-2.0-py2.4.egg
easy_install my_downloads/ExamplePackage-2.0.tgz</pre>
</div>
<p>If you’re using <tt class="docutils literal"><span class="pre">-m</span></tt> or <tt class="docutils literal"><span class="pre">--multi-version</span></tt> , using the <tt class="docutils literal"><span class="pre">require()</span></tt>
function at runtime automatically selects the newest installed version of a
package that meets your version criteria. So, installing a newer version is
the only step needed to upgrade such packages.</p>
<p>If you’re installing to a directory on PYTHONPATH, or a configured “site”
directory (and not using <tt class="docutils literal"><span class="pre">-m</span></tt>), installing a package automatically replaces
any previous version in the <tt class="docutils literal"><span class="pre">easy-install.pth</span></tt> file, so that Python will
import the most-recently installed version by default. So, again, installing
the newer version is the only upgrade step needed.</p>
<p>If you haven’t suppressed script installation (using <tt class="docutils literal"><span class="pre">--exclude-scripts</span></tt> or
<tt class="docutils literal"><span class="pre">-x</span></tt>), then the upgraded version’s scripts will be installed, and they will
be automatically patched to <tt class="docutils literal"><span class="pre">require()</span></tt> the corresponding version of the
package, so that you can use them even if they are installed in multi-version
mode.</p>
<p><tt class="docutils literal"><span class="pre">easy_install</span></tt> never actually deletes packages (unless you’re installing a
package with the same name and version number as an existing package), so if
you want to get rid of older versions of a package, please see <a class="reference internal" href="#uninstalling-packages">Uninstalling
Packages</a>, below.</p>
</div>
<div class="section" id="changing-the-active-version">
<h3><a class="toc-backref" href="#id9">Changing the Active Version</a><a class="headerlink" href="#changing-the-active-version" title="Permalink to this headline">¶</a></h3>
<p>If you’ve upgraded a package, but need to revert to a previously-installed
version, you can do so like this:</p>
<div class="highlight-python"><pre>easy_install PackageName==1.2.3</pre>
</div>
<p>Where <tt class="docutils literal"><span class="pre">1.2.3</span></tt> is replaced by the exact version number you wish to switch to.
If a package matching the requested name and version is not already installed
in a directory on <tt class="docutils literal"><span class="pre">sys.path</span></tt>, it will be located via PyPI and installed.</p>
<p>If you’d like to switch to the latest installed version of <tt class="docutils literal"><span class="pre">PackageName</span></tt>, you
can do so like this:</p>
<div class="highlight-python"><pre>easy_install PackageName</pre>
</div>
<p>This will activate the latest installed version. (Note: if you have set any
<tt class="docutils literal"><span class="pre">find_links</span></tt> via distutils configuration files, those download pages will be
checked for the latest available version of the package, and it will be
downloaded and installed if it is newer than your current version.)</p>
<p>Note that changing the active version of a package will install the newly
active version’s scripts, unless the <tt class="docutils literal"><span class="pre">--exclude-scripts</span></tt> or <tt class="docutils literal"><span class="pre">-x</span></tt> option is
specified.</p>
</div>
<div class="section" id="uninstalling-packages">
<h3><a class="toc-backref" href="#id10">Uninstalling Packages</a><a class="headerlink" href="#uninstalling-packages" title="Permalink to this headline">¶</a></h3>
<p>If you have replaced a package with another version, then you can just delete
the package(s) you don’t need by deleting the PackageName-versioninfo.egg file
or directory (found in the installation directory).</p>
<p>If you want to delete the currently installed version of a package (or all
versions of a package), you should first run:</p>
<div class="highlight-python"><pre>easy_install -m PackageName</pre>
</div>
<p>This will ensure that Python doesn’t continue to search for a package you’re
planning to remove. After you’ve done this, you can safely delete the .egg
files or directories, along with any scripts you wish to remove.</p>
</div>
<div class="section" id="managing-scripts">
<h3><a class="toc-backref" href="#id11">Managing Scripts</a><a class="headerlink" href="#managing-scripts" title="Permalink to this headline">¶</a></h3>
<p>Whenever you install, upgrade, or change versions of a package, EasyInstall
automatically installs the scripts for the selected package version, unless
you tell it not to with <tt class="docutils literal"><span class="pre">-x</span></tt> or <tt class="docutils literal"><span class="pre">--exclude-scripts</span></tt>. If any scripts in
the script directory have the same name, they are overwritten.</p>
<p>Thus, you do not normally need to manually delete scripts for older versions of
a package, unless the newer version of the package does not include a script
of the same name. However, if you are completely uninstalling a package, you
may wish to manually delete its scripts.</p>
<p>EasyInstall’s default behavior means that you can normally only run scripts
from one version of a package at a time. If you want to keep multiple versions
of a script available, however, you can simply use the <tt class="docutils literal"><span class="pre">--multi-version</span></tt> or
<tt class="docutils literal"><span class="pre">-m</span></tt> option, and rename the scripts that EasyInstall creates. This works
because EasyInstall installs scripts as short code stubs that <tt class="docutils literal"><span class="pre">require()</span></tt> the
matching version of the package the script came from, so renaming the script
has no effect on what it executes.</p>
<p>For example, suppose you want to use two versions of the <tt class="docutils literal"><span class="pre">rst2html</span></tt> tool
provided by the <a class="reference external" href="http://docutils.sf.net/">docutils</a> package. You might
first install one version:</p>
<div class="highlight-python"><pre>easy_install -m docutils==0.3.9</pre>
</div>
<p>then rename the <tt class="docutils literal"><span class="pre">rst2html.py</span></tt> to <tt class="docutils literal"><span class="pre">r2h_039</span></tt>, and install another version:</p>
<div class="highlight-python"><pre>easy_install -m docutils==0.3.10</pre>
</div>
<p>This will create another <tt class="docutils literal"><span class="pre">rst2html.py</span></tt> script, this one using docutils
version 0.3.10 instead of 0.3.9. You now have two scripts, each using a
different version of the package. (Notice that we used <tt class="docutils literal"><span class="pre">-m</span></tt> for both
installations, so that Python won’t lock us out of using anything but the most
recently-installed version of the package.)</p>
</div>
<div class="section" id="tips-techniques">
<h3><a class="toc-backref" href="#id12">Tips & Techniques</a><a class="headerlink" href="#tips-techniques" title="Permalink to this headline">¶</a></h3>
<div class="section" id="multiple-python-versions">
<h4><a class="toc-backref" href="#id13">Multiple Python Versions</a><a class="headerlink" href="#multiple-python-versions" title="Permalink to this headline">¶</a></h4>
<p>As of version 0.6a11, EasyInstall installs itself under two names:
<tt class="docutils literal"><span class="pre">easy_install</span></tt> and <tt class="docutils literal"><span class="pre">easy_install-N.N</span></tt>, where <tt class="docutils literal"><span class="pre">N.N</span></tt> is the Python version
used to install it. Thus, if you install EasyInstall for both Python 2.3 and
2.4, you can use the <tt class="docutils literal"><span class="pre">easy_install-2.3</span></tt> or <tt class="docutils literal"><span class="pre">easy_install-2.4</span></tt> scripts to
install packages for Python 2.3 or 2.4, respectively.</p>
<p>Also, if you’re working with Python version 2.4 or higher, you can run Python
with <tt class="docutils literal"><span class="pre">-m</span> <span class="pre">easy_install</span></tt> to run that particular Python version’s
<tt class="docutils literal"><span class="pre">easy_install</span></tt> command.</p>
</div>
<div class="section" id="restricting-downloads-with-allow-hosts">
<h4><a class="toc-backref" href="#id14">Restricting Downloads with <tt class="docutils literal"><span class="pre">--allow-hosts</span></tt></a><a class="headerlink" href="#restricting-downloads-with-allow-hosts" title="Permalink to this headline">¶</a></h4>
<p>You can use the <tt class="docutils literal"><span class="pre">--allow-hosts</span></tt> (<tt class="docutils literal"><span class="pre">-H</span></tt>) option to restrict what domains
EasyInstall will look for links and downloads on. <tt class="docutils literal"><span class="pre">--allow-hosts=None</span></tt>
prevents downloading altogether. You can also use wildcards, for example
to restrict downloading to hosts in your own intranet. See the section below
on <a class="reference internal" href="#command-line-options">Command-Line Options</a> for more details on the <tt class="docutils literal"><span class="pre">--allow-hosts</span></tt> option.</p>
<p>By default, there are no host restrictions in effect, but you can change this
default by editing the appropriate <a class="reference internal" href="#configuration-files">configuration files</a> and adding:</p>
<div class="highlight-ini"><div class="highlight"><pre><span class="k">[easy_install]</span>
<span class="na">allow_hosts</span> <span class="o">=</span> <span class="s">*.myintranet.example.com,*.python.org</span>
</pre></div>
</div>
<p>The above example would then allow downloads only from hosts in the
<tt class="docutils literal"><span class="pre">python.org</span></tt> and <tt class="docutils literal"><span class="pre">myintranet.example.com</span></tt> domains, unless overridden on the
command line.</p>
</div>
<div class="section" id="installing-on-un-networked-machines">
<h4><a class="toc-backref" href="#id15">Installing on Un-networked Machines</a><a class="headerlink" href="#installing-on-un-networked-machines" title="Permalink to this headline">¶</a></h4>
<p>Just copy the eggs or source packages you need to a directory on the target
machine, then use the <tt class="docutils literal"><span class="pre">-f</span></tt> or <tt class="docutils literal"><span class="pre">--find-links</span></tt> option to specify that
directory’s location. For example:</p>
<div class="highlight-python"><pre>easy_install -H None -f somedir SomePackage</pre>
</div>
<p>will attempt to install SomePackage using only eggs and source packages found
in <tt class="docutils literal"><span class="pre">somedir</span></tt> and disallowing all remote access. You should of course make
sure you have all of SomePackage’s dependencies available in somedir.</p>
<p>If you have another machine of the same operating system and library versions
(or if the packages aren’t platform-specific), you can create the directory of
eggs using a command like this:</p>
<div class="highlight-python"><pre>easy_install -zmaxd somedir SomePackage</pre>
</div>
<p>This will tell EasyInstall to put zipped eggs or source packages for
SomePackage and all its dependencies into <tt class="docutils literal"><span class="pre">somedir</span></tt>, without creating any
scripts or .pth files. You can then copy the contents of <tt class="docutils literal"><span class="pre">somedir</span></tt> to the
target machine. (<tt class="docutils literal"><span class="pre">-z</span></tt> means zipped eggs, <tt class="docutils literal"><span class="pre">-m</span></tt> means multi-version, which
prevents .pth files from being used, <tt class="docutils literal"><span class="pre">-a</span></tt> means to copy all the eggs needed,
even if they’re installed elsewhere on the machine, and <tt class="docutils literal"><span class="pre">-d</span></tt> indicates the
directory to place the eggs in.)</p>
<p>You can also build the eggs from local development packages that were installed
with the <tt class="docutils literal"><span class="pre">setup.py</span> <span class="pre">develop</span></tt> command, by including the <tt class="docutils literal"><span class="pre">-l</span></tt> option, e.g.:</p>
<div class="highlight-python"><pre>easy_install -zmaxld somedir SomePackage</pre>
</div>
<p>This will use locally-available source distributions to build the eggs.</p>
</div>
<div class="section" id="packaging-others-projects-as-eggs">
<h4><a class="toc-backref" href="#id16">Packaging Others’ Projects As Eggs</a><a class="headerlink" href="#packaging-others-projects-as-eggs" title="Permalink to this headline">¶</a></h4>
<p>Need to distribute a package that isn’t published in egg form? You can use
EasyInstall to build eggs for a project. You’ll want to use the <tt class="docutils literal"><span class="pre">--zip-ok</span></tt>,
<tt class="docutils literal"><span class="pre">--exclude-scripts</span></tt>, and possibly <tt class="docutils literal"><span class="pre">--no-deps</span></tt> options (<tt class="docutils literal"><span class="pre">-z</span></tt>, <tt class="docutils literal"><span class="pre">-x</span></tt> and
<tt class="docutils literal"><span class="pre">-N</span></tt>, respectively). Use <tt class="docutils literal"><span class="pre">-d</span></tt> or <tt class="docutils literal"><span class="pre">--install-dir</span></tt> to specify the location
where you’d like the eggs placed. By placing them in a directory that is
published to the web, you can then make the eggs available for download, either
in an intranet or to the internet at large.</p>
<p>If someone distributes a package in the form of a single <tt class="docutils literal"><span class="pre">.py</span></tt> file, you can
wrap it in an egg by tacking an <tt class="docutils literal"><span class="pre">#egg=name-version</span></tt> suffix on the file’s URL.
So, something like this:</p>
<div class="highlight-python"><pre>easy_install -f "http://some.example.com/downloads/foo.py#egg=foo-1.0" foo</pre>
</div>
<p>will install the package as an egg, and this:</p>
<div class="highlight-python"><pre>easy_install -zmaxd. \
-f "http://some.example.com/downloads/foo.py#egg=foo-1.0" foo</pre>
</div>
<p>will create a <tt class="docutils literal"><span class="pre">.egg</span></tt> file in the current directory.</p>
</div>
<div class="section" id="creating-your-own-package-index">
<h4><a class="toc-backref" href="#id17">Creating your own Package Index</a><a class="headerlink" href="#creating-your-own-package-index" title="Permalink to this headline">¶</a></h4>
<p>In addition to local directories and the Python Package Index, EasyInstall can
find download links on most any web page whose URL is given to the <tt class="docutils literal"><span class="pre">-f</span></tt>
(<tt class="docutils literal"><span class="pre">--find-links</span></tt>) option. In the simplest case, you can simply have a web
page with links to eggs or Python source packages, even an automatically
generated directory listing (such as the Apache web server provides).</p>
<p>If you are setting up an intranet site for package downloads, you may want to
configure the target machines to use your download site by default, adding
something like this to their <a class="reference internal" href="#configuration-files">configuration files</a>:</p>
<div class="highlight-ini"><div class="highlight"><pre><span class="k">[easy_install]</span>
<span class="na">find_links</span> <span class="o">=</span> <span class="s">http://mypackages.example.com/somedir/</span>
<span class="s"> http://turbogears.org/download/</span>
<span class="s"> http://peak.telecommunity.com/dist/</span>
</pre></div>
</div>
<p>As you can see, you can list multiple URLs separated by whitespace, continuing
on multiple lines if necessary (as long as the subsequent lines are indented.</p>
<p>If you are more ambitious, you can also create an entirely custom package index
or PyPI mirror. See the <tt class="docutils literal"><span class="pre">--index-url</span></tt> option under <a class="reference internal" href="#command-line-options">Command-Line Options</a>,
below, and also the section on <a class="reference internal" href="#package-index-api">Package Index “API”</a>.</p>
</div>
</div>
<div class="section" id="password-protected-sites">
<h3><a class="toc-backref" href="#id18">Password-Protected Sites</a><a class="headerlink" href="#password-protected-sites" title="Permalink to this headline">¶</a></h3>
<p>If a site you want to download from is password-protected using HTTP “Basic”
authentication, you can specify your credentials in the URL, like so:</p>
<div class="highlight-python"><pre>http://some_userid:some_password@some.example.com/some_path/</pre>
</div>
<p>You can do this with both index page URLs and direct download URLs. As long
as any HTML pages read by easy_install use <em>relative</em> links to point to the
downloads, the same user ID and password will be used to do the downloading.</p>
<div class="section" id="controlling-build-options">
<h4><a class="toc-backref" href="#id19">Controlling Build Options</a><a class="headerlink" href="#controlling-build-options" title="Permalink to this headline">¶</a></h4>
<p>EasyInstall respects standard distutils <a class="reference internal" href="#configuration-files">Configuration Files</a>, so you can use
them to configure build options for packages that it installs from source. For
example, if you are on Windows using the MinGW compiler, you can configure the
default compiler by putting something like this:</p>
<div class="highlight-ini"><div class="highlight"><pre><span class="k">[build]</span>
<span class="na">compiler</span> <span class="o">=</span> <span class="s">mingw32</span>
</pre></div>
</div>
<p>into the appropriate distutils configuration file. In fact, since this is just
normal distutils configuration, it will affect any builds using that config
file, not just ones done by EasyInstall. For example, if you add those lines
to <tt class="docutils literal"><span class="pre">distutils.cfg</span></tt> in the <tt class="docutils literal"><span class="pre">distutils</span></tt> package directory, it will be the
default compiler for <em>all</em> packages you build. See <a class="reference internal" href="#configuration-files">Configuration Files</a>
below for a list of the standard configuration file locations, and links to
more documentation on using distutils configuration files.</p>
</div>
<div class="section" id="editing-and-viewing-source-packages">
<h4><a class="toc-backref" href="#id20">Editing and Viewing Source Packages</a><a class="headerlink" href="#editing-and-viewing-source-packages" title="Permalink to this headline">¶</a></h4>
<p>Sometimes a package’s source distribution contains additional documentation,
examples, configuration files, etc., that are not part of its actual code. If
you want to be able to examine these files, you can use the <tt class="docutils literal"><span class="pre">--editable</span></tt>
option to EasyInstall, and EasyInstall will look for a source distribution
or Subversion URL for the package, then download and extract it or check it out
as a subdirectory of the <tt class="docutils literal"><span class="pre">--build-directory</span></tt> you specify. If you then wish
to install the package after editing or configuring it, you can do so by
rerunning EasyInstall with that directory as the target.</p>
<p>Note that using <tt class="docutils literal"><span class="pre">--editable</span></tt> stops EasyInstall from actually building or
installing the package; it just finds, obtains, and possibly unpacks it for
you. This allows you to make changes to the package if necessary, and to
either install it in development mode using <tt class="docutils literal"><span class="pre">setup.py</span> <span class="pre">develop</span></tt> (if the
package uses setuptools, that is), or by running <tt class="docutils literal"><span class="pre">easy_install</span> <span class="pre">projectdir</span></tt>
(where <tt class="docutils literal"><span class="pre">projectdir</span></tt> is the subdirectory EasyInstall created for the
downloaded package.</p>
<p>In order to use <tt class="docutils literal"><span class="pre">--editable</span></tt> (<tt class="docutils literal"><span class="pre">-e</span></tt> for short), you <em>must</em> also supply a
<tt class="docutils literal"><span class="pre">--build-directory</span></tt> (<tt class="docutils literal"><span class="pre">-b</span></tt> for short). The project will be placed in a
subdirectory of the build directory. The subdirectory will have the same
name as the project itself, but in all-lowercase. If a file or directory of
that name already exists, EasyInstall will print an error message and exit.</p>
<p>Also, when using <tt class="docutils literal"><span class="pre">--editable</span></tt>, you cannot use URLs or filenames as arguments.
You <em>must</em> specify project names (and optional version requirements) so that
EasyInstall knows what directory name(s) to create. If you need to force
EasyInstall to use a particular URL or filename, you should specify it as a
<tt class="docutils literal"><span class="pre">--find-links</span></tt> item (<tt class="docutils literal"><span class="pre">-f</span></tt> for short), and then also specify
the project name, e.g.:</p>
<div class="highlight-python"><pre>easy_install -eb ~/projects \
-fhttp://prdownloads.sourceforge.net/ctypes/ctypes-0.9.6.tar.gz?download \
ctypes==0.9.6</pre>
</div>
</div>
<div class="section" id="dealing-with-installation-conflicts">
<h4><a class="toc-backref" href="#id21">Dealing with Installation Conflicts</a><a class="headerlink" href="#dealing-with-installation-conflicts" title="Permalink to this headline">¶</a></h4>
<p>(NOTE: As of 0.6a11, this section is obsolete; it is retained here only so that
people using older versions of EasyInstall can consult it. As of version
0.6a11, installation conflicts are handled automatically without deleting the
old or system-installed packages, and without ignoring the issue. Instead,
eggs are automatically shifted to the front of <tt class="docutils literal"><span class="pre">sys.path</span></tt> using special
code added to the <tt class="docutils literal"><span class="pre">easy-install.pth</span></tt> file. So, if you are using version
0.6a11 or better of setuptools, you do not need to worry about conflicts,
and the following issues do not apply to you.)</p>
<p>EasyInstall installs distributions in a “managed” way, such that each
distribution can be independently activated or deactivated on <tt class="docutils literal"><span class="pre">sys.path</span></tt>.
However, packages that were not installed by EasyInstall are “unmanaged”,
in that they usually live all in one directory and cannot be independently
activated or deactivated.</p>
<p>As a result, if you are using EasyInstall to upgrade an existing package, or
to install a package with the same name as an existing package, EasyInstall
will warn you of the conflict. (This is an improvement over <tt class="docutils literal"><span class="pre">setup.py</span>
<span class="pre">install</span></tt>, becuase the <tt class="docutils literal"><span class="pre">distutils</span></tt> just install new packages on top of old
ones, possibly combining two unrelated packages or leaving behind modules that
have been deleted in the newer version of the package.)</p>
<p>By default, EasyInstall will stop the installation if it detects a conflict
between an existing, “unmanaged” package, and a module or package in any of
the distributions you’re installing. It will display a list of all of the
existing files and directories that would need to be deleted for the new
package to be able to function correctly. You can then either delete these
conflicting files and directories yourself and re-run EasyInstall, or you can
just use the <tt class="docutils literal"><span class="pre">--delete-conflicting</span></tt> or <tt class="docutils literal"><span class="pre">--ignore-conflicts-at-my-risk</span></tt>
options, as described under <a class="reference internal" href="#command-line-options">Command-Line Options</a>, below.</p>
<p>Of course, once you’ve replaced all of your existing “unmanaged” packages with
versions managed by EasyInstall, you won’t have any more conflicts to worry
about!</p>
</div>
<div class="section" id="compressed-installation">
<h4><a class="toc-backref" href="#id22">Compressed Installation</a><a class="headerlink" href="#compressed-installation" title="Permalink to this headline">¶</a></h4>
<p>EasyInstall tries to install packages in zipped form, if it can. Zipping
packages can improve Python’s overall import performance if you’re not using
the <tt class="docutils literal"><span class="pre">--multi-version</span></tt> option, because Python processes zipfile entries on
<tt class="docutils literal"><span class="pre">sys.path</span></tt> much faster than it does directories.</p>
<p>As of version 0.5a9, EasyInstall analyzes packages to determine whether they
can be safely installed as a zipfile, and then acts on its analysis. (Previous
versions would not install a package as a zipfile unless you used the
<tt class="docutils literal"><span class="pre">--zip-ok</span></tt> option.)</p>
<p>The current analysis approach is fairly conservative; it currenly looks for:</p>
<blockquote>
<div><ul class="simple">
<li>Any use of the <tt class="docutils literal"><span class="pre">__file__</span></tt> or <tt class="docutils literal"><span class="pre">__path__</span></tt> variables (which should be
replaced with <tt class="docutils literal"><span class="pre">pkg_resources</span></tt> API calls)</li>
<li>Possible use of <tt class="docutils literal"><span class="pre">inspect</span></tt> functions that expect to manipulate source files
(e.g. <tt class="docutils literal"><span class="pre">inspect.getsource()</span></tt>)</li>
<li>Top-level modules that might be scripts used with <tt class="docutils literal"><span class="pre">python</span> <span class="pre">-m</span></tt> (Python 2.4)</li>
</ul>
</div></blockquote>
<p>If any of the above are found in the package being installed, EasyInstall will
assume that the package cannot be safely run from a zipfile, and unzip it to
a directory instead. You can override this analysis with the <tt class="docutils literal"><span class="pre">-zip-ok</span></tt> flag,
which will tell EasyInstall to install the package as a zipfile anyway. Or,
you can use the <tt class="docutils literal"><span class="pre">--always-unzip</span></tt> flag, in which case EasyInstall will always
unzip, even if its analysis says the package is safe to run as a zipfile.</p>
<p>Normally, however, it is simplest to let EasyInstall handle the determination
of whether to zip or unzip, and only specify overrides when needed to work
around a problem. If you find you need to override EasyInstall’s guesses, you
may want to contact the package author and the EasyInstall maintainers, so that
they can make appropriate changes in future versions.</p>
<p>(Note: If a package uses <tt class="docutils literal"><span class="pre">setuptools</span></tt> in its setup script, the package author
has the option to declare the package safe or unsafe for zipped usage via the
<tt class="docutils literal"><span class="pre">zip_safe</span></tt> argument to <tt class="docutils literal"><span class="pre">setup()</span></tt>. If the package author makes such a
declaration, EasyInstall believes the package’s author and does not perform its
own analysis. However, your command-line option, if any, will still override
the package author’s choice.)</p>
</div>
</div>
</div>
<div class="section" id="reference-manual">
<h2><a class="toc-backref" href="#id23">Reference Manual</a><a class="headerlink" href="#reference-manual" title="Permalink to this headline">¶</a></h2>
<div class="section" id="configuration-files">
<h3><a class="toc-backref" href="#id24">Configuration Files</a><a class="headerlink" href="#configuration-files" title="Permalink to this headline">¶</a></h3>
<p>(New in 0.4a2)</p>
<p>You may specify default options for EasyInstall using the standard
distutils configuration files, under the command heading <tt class="docutils literal"><span class="pre">easy_install</span></tt>.
EasyInstall will look first for a <tt class="docutils literal"><span class="pre">setup.cfg</span></tt> file in the current directory,
then a <tt class="docutils literal"><span class="pre">~/.pydistutils.cfg</span></tt> or <tt class="docutils literal"><span class="pre">$HOME\\pydistutils.cfg</span></tt> (on Unix-like OSes
and Windows, respectively), and finally a <tt class="docutils literal"><span class="pre">distutils.cfg</span></tt> file in the
<tt class="docutils literal"><span class="pre">distutils</span></tt> package directory. Here’s a simple example:</p>
<div class="highlight-ini"><div class="highlight"><pre><span class="k">[easy_install]</span>
<span class="c"># set the default location to install packages</span>
<span class="na">install_dir</span> <span class="o">=</span> <span class="s">/home/me/lib/python</span>
<span class="c"># Notice that indentation can be used to continue an option</span>
<span class="c"># value; this is especially useful for the "--find-links"</span>
<span class="c"># option, which tells easy_install to use download links on</span>
<span class="c"># these pages before consulting PyPI:</span>
<span class="c">#</span>
<span class="na">find_links</span> <span class="o">=</span> <span class="s">http://sqlobject.org/</span>
<span class="s"> http://peak.telecommunity.com/dist/</span>
</pre></div>
</div>
<p>In addition to accepting configuration for its own options under
<tt class="docutils literal"><span class="pre">[easy_install]</span></tt>, EasyInstall also respects defaults specified for other
distutils commands. For example, if you don’t set an <tt class="docutils literal"><span class="pre">install_dir</span></tt> for
<tt class="docutils literal"><span class="pre">[easy_install]</span></tt>, but <em>have</em> set an <tt class="docutils literal"><span class="pre">install_lib</span></tt> for the <tt class="docutils literal"><span class="pre">[install]</span></tt>
command, this will become EasyInstall’s default installation directory. Thus,
if you are already using distutils configuration files to set default install
locations, build options, etc., EasyInstall will respect your existing settings
until and unless you override them explicitly in an <tt class="docutils literal"><span class="pre">[easy_install]</span></tt> section.</p>
<p>For more information, see also the current Python documentation on the <a class="reference external" href="http://docs.python.org/inst/config-syntax.html">use and
location of distutils configuration files</a>.</p>
<p>Notice that <tt class="docutils literal"><span class="pre">easy_install</span></tt> will use the <tt class="docutils literal"><span class="pre">setup.cfg</span></tt> from the current
working directory only if it was triggered from <tt class="docutils literal"><span class="pre">setup.py</span></tt> through the
<tt class="docutils literal"><span class="pre">install_requires</span></tt> option. The standalone command will not use that file.</p>
</div>
<div class="section" id="command-line-options">
<h3><a class="toc-backref" href="#id25">Command-Line Options</a><a class="headerlink" href="#command-line-options" title="Permalink to this headline">¶</a></h3>
<dl class="docutils">
<dt><tt class="docutils literal"><span class="pre">--zip-ok,</span> <span class="pre">-z</span></tt></dt>
<dd>Install all packages as zip files, even if they are marked as unsafe for
running as a zipfile. This can be useful when EasyInstall’s analysis
of a non-setuptools package is too conservative, but keep in mind that
the package may not work correctly. (Changed in 0.5a9; previously this
option was required in order for zipped installation to happen at all.)</dd>
<dt><tt class="docutils literal"><span class="pre">--always-unzip,</span> <span class="pre">-Z</span></tt></dt>
<dd><p class="first">Don’t install any packages as zip files, even if the packages are marked
as safe for running as a zipfile. This can be useful if a package does
something unsafe, but not in a way that EasyInstall can easily detect.
EasyInstall’s default analysis is currently very conservative, however, so
you should only use this option if you’ve had problems with a particular
package, and <em>after</em> reporting the problem to the package’s maintainer and
to the EasyInstall maintainers.</p>
<p class="last">(Note: the <tt class="docutils literal"><span class="pre">-z/-Z</span></tt> options only affect the installation of newly-built
or downloaded packages that are not already installed in the target
directory; if you want to convert an existing installed version from
zipped to unzipped or vice versa, you’ll need to delete the existing
version first, and re-run EasyInstall.)</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">--multi-version,</span> <span class="pre">-m</span></tt></dt>
<dd><p class="first">“Multi-version” mode. Specifying this option prevents <tt class="docutils literal"><span class="pre">easy_install</span></tt> from
adding an <tt class="docutils literal"><span class="pre">easy-install.pth</span></tt> entry for the package being installed, and
if an entry for any version the package already exists, it will be removed
upon successful installation. In multi-version mode, no specific version of
the package is available for importing, unless you use
<tt class="docutils literal"><span class="pre">pkg_resources.require()</span></tt> to put it on <tt class="docutils literal"><span class="pre">sys.path</span></tt>. This can be as
simple as:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">pkg_resources</span> <span class="kn">import</span> <span class="n">require</span>
<span class="n">require</span><span class="p">(</span><span class="s">"SomePackage"</span><span class="p">,</span> <span class="s">"OtherPackage"</span><span class="p">,</span> <span class="s">"MyPackage"</span><span class="p">)</span>
</pre></div>
</div>
<p>which will put the latest installed version of the specified packages on
<tt class="docutils literal"><span class="pre">sys.path</span></tt> for you. (For more advanced uses, like selecting specific
versions and enabling optional dependencies, see the <tt class="docutils literal"><span class="pre">pkg_resources</span></tt> API
doc.)</p>
<p class="last">Changed in 0.6a10: this option is no longer silently enabled when
installing to a non-PYTHONPATH, non-“site” directory. You must always
explicitly use this option if you want it to be active.</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">--upgrade,</span> <span class="pre">-U</span></tt> (New in 0.5a4)</dt>
<dd>By default, EasyInstall only searches online if a project/version
requirement can’t be met by distributions already installed
on sys.path or the installation directory. However, if you supply the
<tt class="docutils literal"><span class="pre">--upgrade</span></tt> or <tt class="docutils literal"><span class="pre">-U</span></tt> flag, EasyInstall will always check the package
index and <tt class="docutils literal"><span class="pre">--find-links</span></tt> URLs before selecting a version to install. In
this way, you can force EasyInstall to use the latest available version of
any package it installs (subject to any version requirements that might
exclude such later versions).</dd>
<dt><tt class="docutils literal"><span class="pre">--install-dir=DIR,</span> <span class="pre">-d</span> <span class="pre">DIR</span></tt></dt>
<dd><p class="first">Set the installation directory. It is up to you to ensure that this
directory is on <tt class="docutils literal"><span class="pre">sys.path</span></tt> at runtime, and to use
<tt class="docutils literal"><span class="pre">pkg_resources.require()</span></tt> to enable the installed package(s) that you
need.</p>
<p class="last">(New in 0.4a2) If this option is not directly specified on the command line
or in a distutils configuration file, the distutils default installation
location is used. Normally, this would be the <tt class="docutils literal"><span class="pre">site-packages</span></tt> directory,
but if you are using distutils configuration files, setting things like
<tt class="docutils literal"><span class="pre">prefix</span></tt> or <tt class="docutils literal"><span class="pre">install_lib</span></tt>, then those settings are taken into
account when computing the default installation directory, as is the
<tt class="docutils literal"><span class="pre">--prefix</span></tt> option.</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">--script-dir=DIR,</span> <span class="pre">-s</span> <span class="pre">DIR</span></tt></dt>
<dd>Set the script installation directory. If you don’t supply this option
(via the command line or a configuration file), but you <em>have</em> supplied
an <tt class="docutils literal"><span class="pre">--install-dir</span></tt> (via command line or config file), then this option
defaults to the same directory, so that the scripts will be able to find
their associated package installation. Otherwise, this setting defaults
to the location where the distutils would normally install scripts, taking
any distutils configuration file settings into account.</dd>
<dt><tt class="docutils literal"><span class="pre">--exclude-scripts,</span> <span class="pre">-x</span></tt></dt>
<dd>Don’t install scripts. This is useful if you need to install multiple
versions of a package, but do not want to reset the version that will be
run by scripts that are already installed.</dd>
<dt><tt class="docutils literal"><span class="pre">--user</span></tt> (New in 0.6.11)</dt>
<dd>Use the the user-site-packages as specified in <span class="target" id="index-0"></span><a class="pep reference external" href="http://www.python.org/dev/peps/pep-0370"><strong>PEP 370</strong></a>
instead of the global site-packages.</dd>
<dt><tt class="docutils literal"><span class="pre">--always-copy,</span> <span class="pre">-a</span></tt> (New in 0.5a4)</dt>
<dd><p class="first">Copy all needed distributions to the installation directory, even if they
are already present in a directory on sys.path. In older versions of
EasyInstall, this was the default behavior, but now you must explicitly
request it. By default, EasyInstall will no longer copy such distributions
from other sys.path directories to the installation directory, unless you
explicitly gave the distribution’s filename on the command line.</p>
<p class="last">Note that as of 0.6a10, using this option excludes “system” and
“development” eggs from consideration because they can’t be reliably
copied. 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 copy of something that’s already installed. You will see warning
messages for any eggs that EasyInstall skips, before it falls back to an
older version or attempts to download a fresh copy.</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">--find-links=URLS_OR_FILENAMES,</span> <span class="pre">-f</span> <span class="pre">URLS_OR_FILENAMES</span></tt></dt>
<dd><p class="first">Scan the specified “download pages” or directories for direct links to eggs
or other distributions. Any existing file or directory names or direct
download URLs are immediately added to EasyInstall’s search cache, and any
indirect URLs (ones that don’t point to eggs or other recognized archive
formats) are added to a list of additional places to search for download
links. As soon as EasyInstall has to go online to find a package (either
because it doesn’t exist locally, or because <tt class="docutils literal"><span class="pre">--upgrade</span></tt> or <tt class="docutils literal"><span class="pre">-U</span></tt> was
used), the specified URLs will be downloaded and scanned for additional
direct links.</p>
<p>Eggs and archives found by way of <tt class="docutils literal"><span class="pre">--find-links</span></tt> are only downloaded if
they are needed to meet a requirement specified on the command line; links
to unneeded packages are ignored.</p>
<p>If all requested packages can be found using links on the specified
download pages, the Python Package Index will not be consulted unless you
also specified the <tt class="docutils literal"><span class="pre">--upgrade</span></tt> or <tt class="docutils literal"><span class="pre">-U</span></tt> option.</p>
<p>(Note: if you want to refer to a local HTML file containing links, you must
use a <tt class="docutils literal"><span class="pre">file:</span></tt> URL, as filenames that do not refer to a directory, egg, or
archive are ignored.)</p>
<p>You may specify multiple URLs or file/directory names with this option,
separated by whitespace. Note that on the command line, you will probably
have to surround the URL list with quotes, so that it is recognized as a
single option value. You can also specify URLs in a configuration file;
see <a class="reference internal" href="#configuration-files">Configuration Files</a>, above.</p>
<p class="last">Changed in 0.6a10: previously all URLs and directories passed to this
option were scanned as early as possible, but from 0.6a10 on, 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 <tt class="docutils literal"><span class="pre">--update</span></tt>
or <tt class="docutils literal"><span class="pre">-U</span></tt> option.</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">--no-find-links</span></tt> Blocks the addition of any link. (New in Distribute 0.6.11)</dt>
<dd>This is useful if you want to avoid adding links defined in a project
easy_install is installing (wether it’s a requested project or a
dependency.). When used, <tt class="docutils literal"><span class="pre">--find-links</span></tt> is ignored.</dd>
<dt><tt class="docutils literal"><span class="pre">--delete-conflicting,</span> <span class="pre">-D</span></tt> (Removed in 0.6a11)</dt>
<dd><p class="first">(As of 0.6a11, this option is no longer necessary; please do not use it!)</p>
<p class="last">If you are replacing a package that was previously installed <em>without</em>
using EasyInstall, the old version may end up on <tt class="docutils literal"><span class="pre">sys.path</span></tt> before the
version being installed with EasyInstall. EasyInstall will normally abort
the installation of a package if it detects such a conflict, and ask you to
manually remove the conflicting files or directories. If you specify this
option, however, EasyInstall will attempt to delete the files or
directories itself, and then proceed with the installation.</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">--ignore-conflicts-at-my-risk</span></tt> (Removed in 0.6a11)</dt>
<dd><p class="first">(As of 0.6a11, this option is no longer necessary; please do not use it!)</p>
<p class="last">Ignore conflicting packages and proceed with installation anyway, even
though it means the package probably won’t work properly. If the
conflicting package is in a directory you can’t write to, this may be your
only option, but you will need to take more invasive measures to get the
installed package to work, like manually adding it to <tt class="docutils literal"><span class="pre">PYTHONPATH</span></tt> or to
<tt class="docutils literal"><span class="pre">sys.path</span></tt> at runtime.</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">--index-url=URL,</span> <span class="pre">-i</span> <span class="pre">URL</span></tt> (New in 0.4a1; default changed in 0.6c7)</dt>
<dd>Specifies the base URL of the Python Package Index. The default is
<a class="reference external" href="http://pypi.python.org/simple">http://pypi.python.org/simple</a> if not specified. When a package is requested
that is not locally available or linked from a <tt class="docutils literal"><span class="pre">--find-links</span></tt> download
page, the package index will be searched for download pages for the needed
package, and those download pages will be searched for links to download
an egg or source distribution.</dd>
<dt><tt class="docutils literal"><span class="pre">--editable,</span> <span class="pre">-e</span></tt> (New in 0.6a1)</dt>
<dd>Only find and download source distributions for the specified projects,
unpacking them to subdirectories of the specified <tt class="docutils literal"><span class="pre">--build-directory</span></tt>.
EasyInstall will not actually build or install the requested projects or
their dependencies; it will just find and extract them for you. See
<a class="reference internal" href="#editing-and-viewing-source-packages">Editing and Viewing Source Packages</a> above for more details.</dd>
<dt><tt class="docutils literal"><span class="pre">--build-directory=DIR,</span> <span class="pre">-b</span> <span class="pre">DIR</span></tt> (UPDATED in 0.6a1)</dt>
<dd><p class="first">Set the directory used to build source packages. If a package is built
from a source distribution or checkout, it will be extracted to a
subdirectory of the specified directory. The subdirectory will have the
same name as the extracted distribution’s project, but in all-lowercase.
If a file or directory of that name already exists in the given directory,
a warning will be printed to the console, and the build will take place in
a temporary directory instead.</p>
<p class="last">This option is most useful in combination with the <tt class="docutils literal"><span class="pre">--editable</span></tt> option,
which forces EasyInstall to <em>only</em> find and extract (but not build and
install) source distributions. See <a class="reference internal" href="#editing-and-viewing-source-packages">Editing and Viewing Source Packages</a>,
above, for more information.</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">--verbose,</span> <span class="pre">-v,</span> <span class="pre">--quiet,</span> <span class="pre">-q</span></tt> (New in 0.4a4)</dt>
<dd>Control the level of detail of EasyInstall’s progress messages. The
default detail level is “info”, which prints information only about
relatively time-consuming operations like running a setup script, unpacking
an archive, or retrieving a URL. Using <tt class="docutils literal"><span class="pre">-q</span></tt> or <tt class="docutils literal"><span class="pre">--quiet</span></tt> drops the
detail level to “warn”, which will only display installation reports,
warnings, and errors. Using <tt class="docutils literal"><span class="pre">-v</span></tt> or <tt class="docutils literal"><span class="pre">--verbose</span></tt> increases the detail
level to include individual file-level operations, link analysis messages,
and distutils messages from any setup scripts that get run. If you include
the <tt class="docutils literal"><span class="pre">-v</span></tt> option more than once, the second and subsequent uses are passed
down to any setup scripts, increasing the verbosity of their reporting as
well.</dd>
<dt><tt class="docutils literal"><span class="pre">--dry-run,</span> <span class="pre">-n</span></tt> (New in 0.4a4)</dt>
<dd>Don’t actually install the package or scripts. This option is passed down
to any setup scripts run, so packages should not actually build either.
This does <em>not</em> skip downloading, nor does it skip extracting source
distributions to a temporary/build directory.</dd>
<dt><tt class="docutils literal"><span class="pre">--optimize=LEVEL</span></tt>, <tt class="docutils literal"><span class="pre">-O</span> <span class="pre">LEVEL</span></tt> (New in 0.4a4)</dt>
<dd>If you are installing from a source distribution, and are <em>not</em> using the
<tt class="docutils literal"><span class="pre">--zip-ok</span></tt> option, this option controls the optimization level for
compiling installed <tt class="docutils literal"><span class="pre">.py</span></tt> files to <tt class="docutils literal"><span class="pre">.pyo</span></tt> files. It does not affect
the compilation of modules contained in <tt class="docutils literal"><span class="pre">.egg</span></tt> files, only those in
<tt class="docutils literal"><span class="pre">.egg</span></tt> directories. The optimization level can be set to 0, 1, or 2;
the default is 0 (unless it’s set under <tt class="docutils literal"><span class="pre">install</span></tt> or <tt class="docutils literal"><span class="pre">install_lib</span></tt> in
one of your distutils configuration files).</dd>
<dt><tt class="docutils literal"><span class="pre">--record=FILENAME</span></tt> (New in 0.5a4)</dt>
<dd>Write a record of all installed files to FILENAME. This is basically the
same as the same option for the standard distutils “install” command, and
is included for compatibility with tools that expect to pass this option
to “setup.py install”.</dd>
<dt><tt class="docutils literal"><span class="pre">--site-dirs=DIRLIST,</span> <span class="pre">-S</span> <span class="pre">DIRLIST</span></tt> (New in 0.6a1)</dt>
<dd><p class="first">Specify one or more custom “site” directories (separated by commas).
“Site” directories are directories where <tt class="docutils literal"><span class="pre">.pth</span></tt> files are processed, such
as the main Python <tt class="docutils literal"><span class="pre">site-packages</span></tt> directory. As of 0.6a10, EasyInstall
automatically detects whether a given directory processes <tt class="docutils literal"><span class="pre">.pth</span></tt> files
(or can be made to do so), so you should not normally need to use this
option. It is is now only necessary if you want to override EasyInstall’s
judgment and force an installation directory to be treated as if it
supported <tt class="docutils literal"><span class="pre">.pth</span></tt> files.</p>
<p class="last">(If you want to <em>make</em> a non-<tt class="docutils literal"><span class="pre">PYTHONPATH</span></tt> directory support <tt class="docutils literal"><span class="pre">.pth</span></tt>
files, please see the <a class="reference internal" href="#administrator-installation">Administrator Installation</a> section below.)</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">--no-deps,</span> <span class="pre">-N</span></tt> (New in 0.6a6)</dt>
<dd>Don’t install any dependencies. This is intended as a convenience for
tools that wrap eggs in a platform-specific packaging system. (We don’t
recommend that you use it for anything else.)</dd>
<dt><tt class="docutils literal"><span class="pre">--allow-hosts=PATTERNS,</span> <span class="pre">-H</span> <span class="pre">PATTERNS</span></tt> (New in 0.6a6)</dt>
<dd><p class="first">Restrict downloading and spidering to hosts matching the specified glob
patterns. E.g. <tt class="docutils literal"><span class="pre">-H</span> <span class="pre">*.python.org</span></tt> restricts web access so that only
packages listed and downloadable from machines in the <tt class="docutils literal"><span class="pre">python.org</span></tt>
domain. The glob patterns must match the <em>entire</em> user/host/port section of
the target URL(s). For example, <tt class="docutils literal"><span class="pre">*.python.org</span></tt> will NOT accept a URL
like <tt class="docutils literal"><span class="pre">http://python.org/foo</span></tt> or <tt class="docutils literal"><span class="pre">http://www.python.org:8080/</span></tt>.
Multiple patterns can be specified by separting them with commas. The
default pattern is <tt class="docutils literal"><span class="pre">*</span></tt>, which matches anything.</p>
<p class="last">In general, this option is mainly useful for blocking EasyInstall’s web
access altogether (e.g. <tt class="docutils literal"><span class="pre">-Hlocalhost</span></tt>), or to restrict it to an intranet
or other trusted site. EasyInstall will do the best it can to satisfy
dependencies given your host restrictions, but of course can fail if it
can’t find suitable packages. EasyInstall displays all blocked URLs, so
that you can adjust your <tt class="docutils literal"><span class="pre">--allow-hosts</span></tt> setting if it is more strict
than you intended. Some sites may wish to define a restrictive default
setting for this option in their <a class="reference internal" href="#configuration-files">configuration files</a>, and then manually
override the setting on the command line as needed.</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">--prefix=DIR</span></tt> (New in 0.6a10)</dt>
<dd><p class="first">Use the specified directory as a base for computing the default
installation and script directories. On Windows, the resulting default
directories will be <tt class="docutils literal"><span class="pre">prefix\\Lib\\site-packages</span></tt> and <tt class="docutils literal"><span class="pre">prefix\\Scripts</span></tt>,
while on other platforms the defaults will be
<tt class="docutils literal"><span class="pre">prefix/lib/python2.X/site-packages</span></tt> (with the appropriate version
substituted) for libraries and <tt class="docutils literal"><span class="pre">prefix/bin</span></tt> for scripts.</p>
<p class="last">Note that the <tt class="docutils literal"><span class="pre">--prefix</span></tt> option only sets the <em>default</em> installation and
script directories, and does not override the ones set on the command line
or in a configuration file.</p>
</dd>
<dt><tt class="docutils literal"><span class="pre">--local-snapshots-ok,</span> <span class="pre">-l</span></tt> (New in 0.6c6)</dt>
<dd><p class="first">Normally, EasyInstall prefers to only install <em>released</em> versions of
projects, not in-development ones, because such projects may not
have a currently-valid version number. So, it usually only installs them
when their <tt class="docutils literal"><span class="pre">setup.py</span></tt> directory is explicitly passed on the command line.</p>
<p>However, if this option is used, then any in-development projects that were
installed using the <tt class="docutils literal"><span class="pre">setup.py</span> <span class="pre">develop</span></tt> command, will be used to build
eggs, effectively upgrading the “in-development” project to a snapshot
release. Normally, this option is used only in conjunction with the
<tt class="docutils literal"><span class="pre">--always-copy</span></tt> option to create a distributable snapshot of every egg
needed to run an application.</p>
<p class="last">Note that if you use this option, you must make sure that there is a valid
version number (such as an SVN revision number tag) for any in-development
projects that may be used, as otherwise EasyInstall may not be able to tell
what version of the project is “newer” when future installations or
upgrades are attempted.</p>
</dd>
</dl>
</div>
<div class="section" id="custom-installation-locations">
<span id="non-root-installation"></span><h3><a class="toc-backref" href="#id26">Custom Installation Locations</a><a class="headerlink" href="#custom-installation-locations" title="Permalink to this headline">¶</a></h3>
<p>EasyInstall manages what packages are active using Python <tt class="docutils literal"><span class="pre">.pth</span></tt> files, which
are normally only usable in Python’s main <tt class="docutils literal"><span class="pre">site-packages</span></tt> directory. On some
platforms (such as Mac OS X), there are additional <tt class="docutils literal"><span class="pre">site-packages</span></tt>
directories that you can use besides the main one, but usually there is only
one directory on the system where you can install packages without extra steps.</p>
<p>There are many reasons, however, why you might want to install packages
somewhere other than the <tt class="docutils literal"><span class="pre">site-packages</span></tt> directory. For example, you might
not have write access to that directory. You may be working with unstable
versions of packages that you don’t want to install system-wide. And so on.</p>
<p>The following sections describe various approaches to custom installation; feel
free to choose which one best suits your system and needs.</p>
<dl class="docutils">
<dt><a class="reference internal" href="#administrator-installation">Administrator Installation</a></dt>
<dd>This approach is for when you have write access to <tt class="docutils literal"><span class="pre">site-packages</span></tt> (or
another directory where <tt class="docutils literal"><span class="pre">.pth</span></tt> files are processed), but don’t want to
install packages there. This can also be used by a system administrator
to enable each user having their own private directories that EasyInstall
will use to install packages.</dd>
<dt><a class="reference internal" href="#mac-os-x-user-installation">Mac OS X “User” Installation</a></dt>
<dd>This approach produces a result similar to an administrator installation
that gives each user their own private package directory, but on Mac OS X
the hard part has already been done for you. This is probably the best
approach for Mac OS X users.</dd>
<dt><a class="reference internal" href="#creating-a-virtual-python">Creating a “Virtual” Python</a></dt>
<dd><p class="first">This approach is for when you don’t have “root” or access to write to the
<tt class="docutils literal"><span class="pre">site-packages</span></tt> directory, and would like to be able to set up one or
more “virtual python” executables for your projects. This approach
gives you the benefits of multiple Python installations, but without having
to actually install Python more than once and use up lots of disk space.
(Only the Python executable is copied; the libraries will be symlinked
from the systemwide Python.)</p>
<p class="last">If you don’t already have any <tt class="docutils literal"><span class="pre">PYTHONPATH</span></tt> customization or
special distutils configuration, and you can’t use either of the preceding
approaches, this is probably the best one for you.</p>
</dd>
<dt><a class="reference internal" href="#traditional-pythonpath-based-installation">“Traditional” PYTHONPATH-based Installation</a></dt>
<dd>If you already have a custom <tt class="docutils literal"><span class="pre">PYTHONPATH</span></tt>, and/or a custom distutils
configuration, and don’t want to change any of your existing setup, you may
be interested in this approach. (If you’re using a custom <tt class="docutils literal"><span class="pre">.pth</span></tt> file to
point to your custom installation location, however, you should use
<a class="reference internal" href="#administrator-installation">Administrator Installation</a> to enable <tt class="docutils literal"><span class="pre">.pth</span></tt> processing in the custom
location instead, as that is easier and more flexible than this approach.)</dd>
</dl>
<div class="section" id="administrator-installation">
<h4><a class="toc-backref" href="#id27">Administrator Installation</a><a class="headerlink" href="#administrator-installation" title="Permalink to this headline">¶</a></h4>
<p>If you have root access to your machine, you can easily configure it to allow
each user to have their own directory where Python packages can be installed
and managed by EasyInstall.</p>
<p>First, create an <tt class="docutils literal"><span class="pre">altinstall.pth</span></tt> file in Python’s <tt class="docutils literal"><span class="pre">site-packages</span></tt>
directory, containing the following line (substituting the correct Python
version):</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">site</span><span class="p">;</span> <span class="n">site</span><span class="o">.</span><span class="n">addsitedir</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">expanduser</span><span class="p">(</span><span class="s">'~/lib/python2.3'</span><span class="p">))</span>
</pre></div>
</div>
<p>This will automatically add each user’s <tt class="docutils literal"><span class="pre">~/lib/python2.X</span></tt> directory to
<tt class="docutils literal"><span class="pre">sys.path</span></tt> (if it exists), <em>and</em> it will process any <tt class="docutils literal"><span class="pre">.pth</span></tt> files in that
directory – which is what makes it usable with EasyInstall.</p>
<p>The next step is to create or modify <tt class="docutils literal"><span class="pre">distutils.cfg</span></tt> in the <tt class="docutils literal"><span class="pre">distutils</span></tt>
directory of your Python library. The correct directory will be something like
<tt class="docutils literal"><span class="pre">/usr/lib/python2.X/distutils</span></tt> on most Posix systems and something like
<tt class="docutils literal"><span class="pre">C:\\Python2X\Lib\distutils</span></tt> on Windows machines. Add the following lines
to the file, substituting the correct Python version if necessary:</p>
<div class="highlight-ini"><div class="highlight"><pre><span class="k">[install]</span>
<span class="na">install_lib</span> <span class="o">=</span> <span class="s">~/lib/python2.3</span>
<span class="c"># This next line is optional but often quite useful; it directs EasyInstall</span>
<span class="c"># and the distutils to install scripts in the user's "bin" directory. For</span>
<span class="c"># Mac OS X framework Python builds, you should use /usr/local/bin instead,</span>
<span class="c"># because neither ~/bin nor the default script installation location are on</span>
<span class="c"># the system PATH.</span>
<span class="c">#</span>
<span class="na">install_scripts</span> <span class="o">=</span> <span class="s">~/bin</span>
</pre></div>
</div>
<p>This will configure the distutils and EasyInstall to install packages to the
user’s home directory by default.</p>
<p>Of course, you aren’t limited to using a <tt class="docutils literal"><span class="pre">~/lib/python2.X</span></tt> directory with
this approach. You can substitute a specific systemwide directory if you like.
You can also edit <tt class="docutils literal"><span class="pre">~/.pydistutils.cfg</span></tt> (or <tt class="docutils literal"><span class="pre">~/pydistutils.cfg</span></tt> on Windows)
instead of changing the master <tt class="docutils literal"><span class="pre">distutils.cfg</span></tt> file. The true keys of this
approach are simply that:</p>
<ol class="arabic simple">
<li>any custom installation directory must be added to <tt class="docutils literal"><span class="pre">sys.path</span></tt> using a
<tt class="docutils literal"><span class="pre">site.addsitedir()</span></tt> call from a working <tt class="docutils literal"><span class="pre">.pth</span></tt> file or
<tt class="docutils literal"><span class="pre">sitecustomize.py</span></tt>.</li>
<li>The active distutils configuration file(s) or <tt class="docutils literal"><span class="pre">easy_install</span></tt> command line
should include the custom directory in the <tt class="docutils literal"><span class="pre">--site-dirs</span></tt> option, so that
EasyInstall knows that <tt class="docutils literal"><span class="pre">.pth</span></tt> files will work in that location. (This is
because Python does not keep track of what directories are or aren’t enabled
for <tt class="docutils literal"><span class="pre">.pth</span></tt> processing, in any way that EasyInstall can find out.)</li>
</ol>
<p>As long as both of these things have been done, your custom installation
location is good to go.</p>
</div>
<div class="section" id="mac-os-x-user-installation">
<h4><a class="toc-backref" href="#id28">Mac OS X “User” Installation</a><a class="headerlink" href="#mac-os-x-user-installation" title="Permalink to this headline">¶</a></h4>
<p>If you are on a Mac OS X machine, you should just use the
<tt class="docutils literal"><span class="pre">~/Library/Python/2.x/site-packages</span></tt> directory as your custom installation
location, because it is already configured to process <tt class="docutils literal"><span class="pre">.pth</span></tt> files, and
EasyInstall already knows this.</p>
<p>Before installing EasyInstall/setuptools, just create a <tt class="docutils literal"><span class="pre">~/.pydistutils.cfg</span></tt>
file with the following contents (or add this to the existing contents):</p>
<div class="highlight-ini"><div class="highlight"><pre><span class="k">[install]</span>
<span class="na">install_lib</span> <span class="o">=</span> <span class="s">~/Library/Python/$py_version_short/site-packages</span>
<span class="na">install_scripts</span> <span class="o">=</span> <span class="s">~/bin</span>
</pre></div>
</div>
<p>This will tell the distutils and EasyInstall to always install packages in
your personal <tt class="docutils literal"><span class="pre">site-packages</span></tt> directory, and scripts to <tt class="docutils literal"><span class="pre">~/bin</span></tt>. (Note: do
<em>not</em> replace <tt class="docutils literal"><span class="pre">$py_version_short</span></tt> with an actual Python version in the
configuration file! The distutils will substitute the correct value at
runtime, so that the above configuration file should work correctly no matter
what Python version you use, now or in the future.)</p>
<p>Once you have done this, you can follow the normal <a class="reference internal" href="#installation-instructions">installation instructions</a>
and use <tt class="docutils literal"><span class="pre">easy_install</span></tt> without any other special options or steps.</p>
<p>(Note, however, that <tt class="docutils literal"><span class="pre">~/bin</span></tt> is not in the default <tt class="docutils literal"><span class="pre">PATH</span></tt>, so you may have
to refer to scripts by their full location. You may want to modify your shell
startup script (likely <tt class="docutils literal"><span class="pre">.bashrc</span></tt> or <tt class="docutils literal"><span class="pre">.profile</span></tt>) or your
<tt class="docutils literal"><span class="pre">~/.MacOSX/environment.plist</span></tt> to include <tt class="docutils literal"><span class="pre">~/bin</span></tt> in your <tt class="docutils literal"><span class="pre">PATH</span></tt>.</p>
</div>
<div class="section" id="creating-a-virtual-python">
<h4><a class="toc-backref" href="#id29">Creating a “Virtual” Python</a><a class="headerlink" href="#creating-a-virtual-python" title="Permalink to this headline">¶</a></h4>
<p>If you are on a Linux, BSD, Cygwin, or other similar Unix-like operating
system, but don’t have root access, you can create your own “virtual”
Python installation, which uses its own library directories and some symlinks
to the site-wide Python.</p>
<p>Please refer to the <a class="reference external" href="http://pypi.python.org/pypi/virtualenv">virtualenv</a> documentation for creating such an
environment.</p>
</div>
<div class="section" id="traditional-pythonpath-based-installation">
<h4><a class="toc-backref" href="#id30">“Traditional” <tt class="docutils literal"><span class="pre">PYTHONPATH</span></tt>-based Installation</a><a class="headerlink" href="#traditional-pythonpath-based-installation" title="Permalink to this headline">¶</a></h4>
<p>This installation method is not as robust or as flexible as <a class="reference internal" href="#creating-a-virtual-python">creating a
“virtual” python</a> installation, as it uses various tricks to fool Python into
processing <tt class="docutils literal"><span class="pre">.pth</span></tt> files where it normally wouldn’t. We suggest you at least
consider using one of the other approaches, as they will generally result in
a cleaner, more usable Python configuration. However, if for some reason you
can’t or won’t use one of the other approaches, here’s how to do it.</p>
<p>Assuming that you want to install packages in a directory called <tt class="docutils literal"><span class="pre">~/py-lib</span></tt>,
and scripts in <tt class="docutils literal"><span class="pre">~/bin</span></tt>, here’s what you need to do:</p>
<p>First, edit <tt class="docutils literal"><span class="pre">~/.pydistutils.cfg</span></tt> to include these settings, if you don’t
already have them:</p>
<div class="highlight-ini"><div class="highlight"><pre><span class="k">[install]</span>
<span class="na">install_lib</span> <span class="o">=</span> <span class="s">~/py-lib</span>
<span class="na">install_scripts</span> <span class="o">=</span> <span class="s">~/bin</span>
</pre></div>
</div>
<p>Be sure to do this <em>before</em> you try to run the <tt class="docutils literal"><span class="pre">distribute_setup.py</span></tt>
installation script. Then, follow the standard <a class="reference internal" href="#installation-instructions">installation instructions</a>,
but make sure that <tt class="docutils literal"><span class="pre">~/py-lib</span></tt> is listed in your <tt class="docutils literal"><span class="pre">PYTHONPATH</span></tt> environment
variable.</p>
<p>Your library installation directory <em>must</em> be in listed in <tt class="docutils literal"><span class="pre">PYTHONPATH</span></tt>,
not only when you install packages with EasyInstall, but also when you use
any packages that are installed using EasyInstall. You will probably want to
edit your <tt class="docutils literal"><span class="pre">~/.profile</span></tt> or other configuration file(s) to ensure that it is
set, if you haven’t already got this set up on your machine.</p>
</div>
</div>
<div class="section" id="package-index-api">
<h3><a class="toc-backref" href="#id31">Package Index “API”</a><a class="headerlink" href="#package-index-api" title="Permalink to this headline">¶</a></h3>
<p>Custom package indexes (and PyPI) must follow the following rules for
EasyInstall to be able to look up and download packages:</p>
<ol class="arabic">
<li><p class="first">Except where stated otherwise, “pages” are HTML or XHTML, and “links”
refer to <tt class="docutils literal"><span class="pre">href</span></tt> attributes.</p>
</li>
<li><p class="first">Individual project version pages’ URLs must be of the form
<tt class="docutils literal"><span class="pre">base/projectname/version</span></tt>, where <tt class="docutils literal"><span class="pre">base</span></tt> is the package index’s base URL.</p>
</li>
<li><p class="first">Omitting the <tt class="docutils literal"><span class="pre">/version</span></tt> part of a project page’s URL (but keeping the
trailing <tt class="docutils literal"><span class="pre">/</span></tt>) should result in a page that is either:</p>
<ol class="loweralpha simple">
<li>The single active version of that project, as though the version had been
explicitly included, OR</li>
<li>A page with links to all of the active version pages for that project.</li>
</ol>
</li>
<li><p class="first">Individual project version pages should contain direct links to downloadable
distributions where possible. It is explicitly permitted for a project’s
“long_description” to include URLs, and these should be formatted as HTML
links by the package index, as EasyInstall does no special processing to
identify what parts of a page are index-specific and which are part of the
project’s supplied description.</p>
</li>
<li><p class="first">Where available, MD5 information should be added to download URLs by
appending a fragment identifier of the form <tt class="docutils literal"><span class="pre">#md5=...</span></tt>, where <tt class="docutils literal"><span class="pre">...</span></tt> is
the 32-character hex MD5 digest. EasyInstall will verify that the
downloaded file’s MD5 digest matches the given value.</p>
</li>
<li><p class="first">Individual project version pages should identify any “homepage” or
“download” URLs using <tt class="docutils literal"><span class="pre">rel="homepage"</span></tt> and <tt class="docutils literal"><span class="pre">rel="download"</span></tt> attributes
on the HTML elements linking to those URLs. Use of these attributes will
cause EasyInstall to always follow the provided links, unless it can be
determined by inspection that they are downloadable distributions. If the
links are not to downloadable distributions, they are retrieved, and if they
are HTML, they are scanned for download links. They are <em>not</em> scanned for
additional “homepage” or “download” links, as these are only processed for
pages that are part of a package index site.</p>
</li>
<li><p class="first">The root URL of the index, if retrieved with a trailing <tt class="docutils literal"><span class="pre">/</span></tt>, must result
in a page containing links to <em>all</em> projects’ active version pages.</p>
<p>(Note: This requirement is a workaround for the absence of case-insensitive
<tt class="docutils literal"><span class="pre">safe_name()</span></tt> matching of project names in URL paths. If project names are
matched in this fashion (e.g. via the PyPI server, mod_rewrite, or a similar
mechanism), then it is not necessary to include this all-packages listing
page.)</p>
</li>
<li><p class="first">If a package index is accessed via a <tt class="docutils literal"><span class="pre">file://</span></tt> URL, then EasyInstall will
automatically use <tt class="docutils literal"><span class="pre">index.html</span></tt> files, if present, when trying to read a
directory with a trailing <tt class="docutils literal"><span class="pre">/</span></tt> on the URL.</p>
</li>
</ol>
<div class="section" id="backward-compatibility">
<h4><a class="toc-backref" href="#id32">Backward Compatibility</a><a class="headerlink" href="#backward-compatibility" title="Permalink to this headline">¶</a></h4>
<p>Package indexes that wish to support setuptools versions prior to 0.6b4 should
also follow these rules:</p>
<ul>
<li><p class="first">Homepage and download links must be preceded with <tt class="docutils literal"><span class="pre">"<th>Home</span> <span class="pre">Page"</span></tt> or
<tt class="docutils literal"><span class="pre">"<th>Download</span> <span class="pre">URL"</span></tt>, in addition to (or instead of) the <tt class="docutils literal"><span class="pre">rel=""</span></tt>
attributes on the actual links. These marker strings do not need to be
visible, or uncommented, however! For example, the following is a valid
homepage link that will work with any version of setuptools:</p>
<div class="highlight-python"><pre><li>
<strong>Home Page:</strong>
<!-- <th>Home Page -->
<a rel="homepage" href="http://sqlobject.org">http://sqlobject.org</a>
</li></pre>
</div>
<p>Even though the marker string is in an HTML comment, older versions of
EasyInstall will still “see” it and know that the link that follows is the
project’s home page URL.</p>
</li>
<li><p class="first">The pages described by paragraph 3(b) of the preceding section <em>must</em>
contain the string <tt class="docutils literal"><span class="pre">"Index</span> <span class="pre">of</span> <span class="pre">Packages</title>"</span></tt> somewhere in their text.
This can be inside of an HTML comment, if desired, and it can be anywhere
in the page. (Note: this string MUST NOT appear on normal project pages, as
described in paragraphs 2 and 3(a)!)</p>
</li>
</ul>
<p>In addition, for compatibility with PyPI versions that do not use <tt class="docutils literal"><span class="pre">#md5=</span></tt>
fragment IDs, EasyInstall uses the following regular expression to match PyPI’s
displayed MD5 info (broken onto two lines for readability):</p>
<div class="highlight-python"><pre><a href="([^"#]+)">([^<]+)</a>\n\s+\(<a href="[^?]+\?:action=show_md5
&amp;digest=([0-9a-f]{32})">md5</a>\)</pre>
</div>
</div>
</div>
</div>
<div class="section" id="history">
<h2><a class="toc-backref" href="#id33">History</a><a class="headerlink" href="#history" title="Permalink to this headline">¶</a></h2>
<dl class="docutils">
<dt>0.6c9</dt>
<dd><ul class="first last simple">
<li>Fixed <tt class="docutils literal"><span class="pre">win32.exe</span></tt> 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, notably <tt class="docutils literal"><span class="pre">pywin32</span></tt>.)</li>
<li>Prevent <tt class="docutils literal"><span class="pre">--help-commands</span></tt> and other junk from showing under Python 2.5
when running <tt class="docutils literal"><span class="pre">easy_install</span> <span class="pre">--help</span></tt>.</li>
<li>Fixed GUI scripts sometimes not executing on Windows</li>
<li>Fixed not picking up dependency links from recursive dependencies.</li>
<li>Only make <tt class="docutils literal"><span class="pre">.py</span></tt>, <tt class="docutils literal"><span class="pre">.dll</span></tt> and <tt class="docutils literal"><span class="pre">.so</span></tt> files executable when unpacking eggs</li>
<li>Changes for Jython compatibility</li>
<li>Improved error message when a requirement is also a directory name, but the
specified directory is not a source package.</li>
<li>Fixed <tt class="docutils literal"><span class="pre">--allow-hosts</span></tt> option blocking <tt class="docutils literal"><span class="pre">file:</span></tt> URLs</li>
<li>Fixed HTTP SVN detection failing when the page title included a project
name (e.g. on SourceForge-hosted SVN)</li>
<li>Fix Jython script installation to handle <tt class="docutils literal"><span class="pre">#!</span></tt> lines better when
<tt class="docutils literal"><span class="pre">sys.executable</span></tt> is a script.</li>
<li>Removed use of deprecated <tt class="docutils literal"><span class="pre">md5</span></tt> module if <tt class="docutils literal"><span class="pre">hashlib</span></tt> is available</li>
<li>Keep site directories (e.g. <tt class="docutils literal"><span class="pre">site-packages</span></tt>) from being included in
<tt class="docutils literal"><span class="pre">.pth</span></tt> files.</li>
</ul>
</dd>
<dt>0.6c7</dt>
<dd><ul class="first last simple">
<li><tt class="docutils literal"><span class="pre">ftp:</span></tt> download URLs now work correctly.</li>
<li>The default <tt class="docutils literal"><span class="pre">--index-url</span></tt> is now <tt class="docutils literal"><span class="pre">http://pypi.python.org/simple</span></tt>, to use
the Python Package Index’s new simpler (and faster!) REST API.</li>
</ul>
</dd>
<dt>0.6c6</dt>
<dd><ul class="first last simple">
<li>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.</li>
<li>Fixed distutils-style scripts originally built on Windows having their line
endings doubled when installed on any platform.</li>
<li>Added <tt class="docutils literal"><span class="pre">--local-snapshots-ok</span></tt> flag, to allow building eggs from projects
installed using <tt class="docutils literal"><span class="pre">setup.py</span> <span class="pre">develop</span></tt>.</li>
<li>Fixed not HTML-decoding URLs scraped from web pages</li>
</ul>
</dd>
<dt>0.6c5</dt>
<dd><ul class="first last simple">
<li>Fixed <tt class="docutils literal"><span class="pre">.dll</span></tt> files on Cygwin not having executable permisions when an egg
is installed unzipped.</li>
</ul>
</dd>
<dt>0.6c4</dt>
<dd><ul class="first last simple">
<li>Added support for HTTP “Basic” authentication using <tt class="docutils literal"><span class="pre">http://user:pass@host</span></tt>
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.</li>
<li>Removed all special support for Sourceforge mirrors, as Sourceforge’s
mirror system now works well for non-browser downloads.</li>
<li>Fixed not recognizing <tt class="docutils literal"><span class="pre">win32.exe</span></tt> installers that included a custom
bitmap.</li>
<li>Fixed not allowing <tt class="docutils literal"><span class="pre">os.open()</span></tt> of paths outside the sandbox, even if they
are opened read-only (e.g. reading <tt class="docutils literal"><span class="pre">/dev/urandom</span></tt> for random numbers, as
is done by <tt class="docutils literal"><span class="pre">os.urandom()</span></tt> on some platforms).</li>
<li>Fixed a problem with <tt class="docutils literal"><span class="pre">.pth</span></tt> testing on Windows when <tt class="docutils literal"><span class="pre">sys.executable</span></tt>
has a space in it (e.g., the user installed Python to a <tt class="docutils literal"><span class="pre">Program</span> <span class="pre">Files</span></tt>
directory).</li>
</ul>
</dd>
<dt>0.6c3</dt>
<dd><ul class="first last simple">
<li>You can once again use “python -m easy_install” with Python 2.4 and above.</li>
<li>Python 2.5 compatibility fixes added.</li>
</ul>
</dd>
<dt>0.6c2</dt>
<dd><ul class="first last simple">
<li>Windows script wrappers now support quoted arguments and arguments
containing spaces. (Patch contributed by Jim Fulton.)</li>
<li>The <tt class="docutils literal"><span class="pre">ez_setup.py</span></tt> script now actually works when you put a setuptools
<tt class="docutils literal"><span class="pre">.egg</span></tt> alongside it for bootstrapping an offline machine.</li>
<li>A writable installation directory on <tt class="docutils literal"><span class="pre">sys.path</span></tt> is no longer required to
download and extract a source distribution using <tt class="docutils literal"><span class="pre">--editable</span></tt>.</li>
<li>Generated scripts now use <tt class="docutils literal"><span class="pre">-x</span></tt> on the <tt class="docutils literal"><span class="pre">#!</span></tt> line when <tt class="docutils literal"><span class="pre">sys.executable</span></tt>
contains non-ASCII characters, to prevent deprecation warnings about an
unspecified encoding when the script is run.</li>
</ul>
</dd>
<dt>0.6c1</dt>
<dd><ul class="first last simple">
<li>EasyInstall now includes setuptools version information in the
<tt class="docutils literal"><span class="pre">User-Agent</span></tt> string sent to websites it visits.</li>
</ul>
</dd>
<dt>0.6b4</dt>
<dd><ul class="first last simple">
<li>Fix creating Python wrappers for non-Python scripts</li>
<li>Fix <tt class="docutils literal"><span class="pre">ftp://</span></tt> directory listing URLs from causing a crash when used in the
“Home page” or “Download URL” slots on PyPI.</li>
<li>Fix <tt class="docutils literal"><span class="pre">sys.path_importer_cache</span></tt> not being updated when an existing zipfile
or directory is deleted/overwritten.</li>
<li>Fix not recognizing HTML 404 pages from package indexes.</li>
<li>Allow <tt class="docutils literal"><span class="pre">file://</span></tt> URLs to be used as a package index. URLs that refer to
directories will use an internally-generated directory listing if there is
no <tt class="docutils literal"><span class="pre">index.html</span></tt> file in the directory.</li>
<li>Allow external links in a package index to be specified using
<tt class="docutils literal"><span class="pre">rel="homepage"</span></tt> or <tt class="docutils literal"><span class="pre">rel="download"</span></tt>, without needing the old
PyPI-specific visible markup.</li>
<li>Suppressed warning message about possibly-misspelled project name, if an egg
or link for that project name has already been seen.</li>
</ul>
</dd>
<dt>0.6b3</dt>
<dd><ul class="first last simple">
<li>Fix local <tt class="docutils literal"><span class="pre">--find-links</span></tt> eggs not being copied except with
<tt class="docutils literal"><span class="pre">--always-copy</span></tt>.</li>
<li>Fix sometimes not detecting local packages installed outside of “site”
directories.</li>
<li>Fix mysterious errors during initial <tt class="docutils literal"><span class="pre">setuptools</span></tt> install, caused by
<tt class="docutils literal"><span class="pre">ez_setup</span></tt> trying to run <tt class="docutils literal"><span class="pre">easy_install</span></tt> twice, due to a code fallthru
after deleting the egg from which it’s running.</li>
</ul>
</dd>
<dt>0.6b2</dt>
<dd><ul class="first last simple">
<li>Don’t install or update a <tt class="docutils literal"><span class="pre">site.py</span></tt> patch when installing to a
<tt class="docutils literal"><span class="pre">PYTHONPATH</span></tt> directory with <tt class="docutils literal"><span class="pre">--multi-version</span></tt>, unless an
<tt class="docutils literal"><span class="pre">easy-install.pth</span></tt> file is already in use there.</li>
<li>Construct <tt class="docutils literal"><span class="pre">.pth</span></tt> file paths in such a way that installing an egg whose
name begins with <tt class="docutils literal"><span class="pre">import</span></tt> doesn’t cause a syntax error.</li>
<li>Fixed a bogus warning message that wasn’t updated since the 0.5 versions.</li>
</ul>
</dd>
<dt>0.6b1</dt>
<dd><ul class="first last simple">
<li>Better ambiguity management: accept <tt class="docutils literal"><span class="pre">#egg</span></tt> name/version even if processing
what appears to be a correctly-named distutils file, and ignore <tt class="docutils literal"><span class="pre">.egg</span></tt>
files with no <tt class="docutils literal"><span class="pre">-</span></tt>, since valid Python <tt class="docutils literal"><span class="pre">.egg</span></tt> files always have a version
number (but Scheme eggs often don’t).</li>
<li>Support <tt class="docutils literal"><span class="pre">file://</span></tt> links to directories in <tt class="docutils literal"><span class="pre">--find-links</span></tt>, so that
easy_install can build packages from local source checkouts.</li>
<li>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.</li>
<li>Ignore bdist_dumb distributions when looking at download URLs.</li>
</ul>
</dd>
<dt>0.6a11</dt>
<dd><ul class="first last">
<li><p class="first">Process <tt class="docutils literal"><span class="pre">dependency_links.txt</span></tt> if found in a distribution, by adding the
URLs to the list for scanning.</p>
</li>
<li><p class="first">Use relative paths in <tt class="docutils literal"><span class="pre">.pth</span></tt> files when eggs are being installed to the
same directory as the <tt class="docutils literal"><span class="pre">.pth</span></tt> file. This maximizes portability of the
target directory when building applications that contain eggs.</p>
</li>
<li><p class="first">Added <tt class="docutils literal"><span class="pre">easy_install-N.N</span></tt> script(s) for convenience when using multiple
Python versions.</p>
</li>
<li><p class="first">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.</p>
<p>The <tt class="docutils literal"><span class="pre">--delete-conflicting</span></tt> and <tt class="docutils literal"><span class="pre">--ignore-conflicts-at-my-risk</span></tt> options
are now no longer necessary, and will generate warnings at the end of a
run if you use them.</p>
</li>
<li><p class="first">Don’t recursively traverse subdirectories given to <tt class="docutils literal"><span class="pre">--find-links</span></tt>.</p>
</li>
</ul>
</dd>
<dt>0.6a10</dt>
<dd><ul class="first last simple">
<li>Added exhaustive testing of the install directory, including a spawn test
for <tt class="docutils literal"><span class="pre">.pth</span></tt> file support, and directory writability/existence checks. This
should virtually eliminate the need to set or configure <tt class="docutils literal"><span class="pre">--site-dirs</span></tt>.</li>
<li>Added <tt class="docutils literal"><span class="pre">--prefix</span></tt> option for more do-what-I-mean-ishness in the absence of
RTFM-ing. :)</li>
<li>Enhanced <tt class="docutils literal"><span class="pre">PYTHONPATH</span></tt> support so that you don’t have to put any eggs on it
manually to make it work. <tt class="docutils literal"><span class="pre">--multi-version</span></tt> is no longer a silent
default; you must explicitly use it if installing to a non-PYTHONPATH,
non-“site” directory.</li>
<li>Expand <tt class="docutils literal"><span class="pre">$variables</span></tt> used in the <tt class="docutils literal"><span class="pre">--site-dirs</span></tt>, <tt class="docutils literal"><span class="pre">--build-directory</span></tt>,
<tt class="docutils literal"><span class="pre">--install-dir</span></tt>, and <tt class="docutils literal"><span class="pre">--script-dir</span></tt> options, whether on the command line
or in configuration files.</li>
<li>Improved SourceForge mirror processing to work faster and be less affected
by transient HTML changes made by SourceForge.</li>
<li>PyPI searches now use the exact spelling of requirements specified on the
command line or in a project’s <tt class="docutils literal"><span class="pre">install_requires</span></tt>. 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 (<tt class="docutils literal"><span class="pre">_</span></tt>) in it.</li>
<li>EasyInstall can now download bare <tt class="docutils literal"><span class="pre">.py</span></tt> files and wrap them in an egg,
as long as you include an <tt class="docutils literal"><span class="pre">#egg=name-version</span></tt> suffix on the URL, or if
the <tt class="docutils literal"><span class="pre">.py</span></tt> 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).</li>
<li>The <tt class="docutils literal"><span class="pre">--always-copy</span></tt> 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.</li>
<li>The <tt class="docutils literal"><span class="pre">--find-links</span></tt> 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 <tt class="docutils literal"><span class="pre">--update</span></tt> or <tt class="docutils literal"><span class="pre">-U</span></tt> option.</li>
<li>Fixed the annoying <tt class="docutils literal"><span class="pre">--help-commands</span></tt> wart.</li>
</ul>
</dd>
<dt>0.6a9</dt>
<dd><ul class="first last simple">
<li>Fixed <tt class="docutils literal"><span class="pre">.pth</span></tt> file processing picking up nested eggs (i.e. ones inside
“baskets”) when they weren’t explicitly listed in the <tt class="docutils literal"><span class="pre">.pth</span></tt> file.</li>
<li>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.</li>
<li>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.</li>
<li>Support full roundtrip translation of eggs to and from <tt class="docutils literal"><span class="pre">bdist_wininst</span></tt>
format. Running <tt class="docutils literal"><span class="pre">bdist_wininst</span></tt> 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), and <tt class="docutils literal"><span class="pre">easy_install</span></tt> can turn the .exe
back into an <tt class="docutils literal"><span class="pre">.egg</span></tt> file or directory and install it as such.</li>
</ul>
</dd>
<dt>0.6a8</dt>
<dd><ul class="first last simple">
<li>Update for changed SourceForge mirror format</li>
<li>Fixed not installing dependencies for some packages fetched via Subversion</li>
<li>Fixed dependency installation with <tt class="docutils literal"><span class="pre">--always-copy</span></tt> not using the same
dependency resolution procedure as other operations.</li>
<li>Fixed not fully removing temporary directories on Windows, if a Subversion
checkout left read-only files behind</li>
<li>Fixed some problems building extensions when Pyrex was installed, especially
with Python 2.4 and/or packages using SWIG.</li>
</ul>
</dd>
<dt>0.6a7</dt>
<dd><ul class="first last simple">
<li>Fixed not being able to install Windows script wrappers using Python 2.3</li>
</ul>
</dd>
<dt>0.6a6</dt>
<dd><ul class="first last simple">
<li>Added support for “traditional” PYTHONPATH-based non-root installation, and
also the convenient <tt class="docutils literal"><span class="pre">virtual-python.py</span></tt> script, based on a contribution
by Ian Bicking. The setuptools egg now contains a hacked <tt class="docutils literal"><span class="pre">site</span></tt> module
that makes the PYTHONPATH-based approach work with .pth files, so that you
can get the full EasyInstall feature set on such installations.</li>
<li>Added <tt class="docutils literal"><span class="pre">--no-deps</span></tt> and <tt class="docutils literal"><span class="pre">--allow-hosts</span></tt> options.</li>
<li>Improved Windows <tt class="docutils literal"><span class="pre">.exe</span></tt> script wrappers so that the script can have the
same name as a module without confusing Python.</li>
<li>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.</li>
</ul>
</dd>
<dt>0.6a3</dt>
<dd><ul class="first last simple">
<li>Improved error message when trying to use old ways of running
<tt class="docutils literal"><span class="pre">easy_install</span></tt>. Removed the ability to run via <tt class="docutils literal"><span class="pre">python</span> <span class="pre">-m</span></tt> or by
running <tt class="docutils literal"><span class="pre">easy_install.py</span></tt>; <tt class="docutils literal"><span class="pre">easy_install</span></tt> is the command to run on all
supported platforms.</li>
<li>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.</li>
<li>Fixed a problem parsing version numbers in <tt class="docutils literal"><span class="pre">#egg=</span></tt> links.</li>
</ul>
</dd>
<dt>0.6a2</dt>
<dd><ul class="first last simple">
<li>EasyInstall can now install “console_scripts” defined by packages that use
<tt class="docutils literal"><span class="pre">setuptools</span></tt> and define appropriate entry points. On Windows, console
scripts get an <tt class="docutils literal"><span class="pre">.exe</span></tt> wrapper so you can just type their name. On other
platforms, the scripts are installed without a file extension.</li>
<li>Using <tt class="docutils literal"><span class="pre">python</span> <span class="pre">-m</span> <span class="pre">easy_install</span></tt> or running <tt class="docutils literal"><span class="pre">easy_install.py</span></tt> is now
DEPRECATED, since an <tt class="docutils literal"><span class="pre">easy_install</span></tt> wrapper is now available on all
platforms.</li>
</ul>
</dd>
<dt>0.6a1</dt>
<dd><ul class="first last simple">
<li>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.</li>
<li>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 above in
the <a class="reference internal" href="#non-root-installation">Non-Root Installation</a> section).</li>
<li>Added support for handling MacOS platform information in <tt class="docutils literal"><span class="pre">.egg</span></tt> 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.</li>
<li>easy_install’s dependency processing algorithms have changed. When using
<tt class="docutils literal"><span class="pre">--always-copy</span></tt>, it now ensures that dependencies are copied too. When
not using <tt class="docutils literal"><span class="pre">--always-copy</span></tt>, it tries to use a single resolution loop,
rather than recursing.</li>
<li>Fixed installing extra <tt class="docutils literal"><span class="pre">.pyc</span></tt> or <tt class="docutils literal"><span class="pre">.pyo</span></tt> files for scripts with <tt class="docutils literal"><span class="pre">.py</span></tt>
extensions.</li>
<li>Added <tt class="docutils literal"><span class="pre">--site-dirs</span></tt> option to allow adding custom “site” directories.
Made <tt class="docutils literal"><span class="pre">easy-install.pth</span></tt> work in platform-specific alternate site
directories (e.g. <tt class="docutils literal"><span class="pre">~/Library/Python/2.x/site-packages</span></tt> on Mac OS X).</li>
<li>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 <tt class="docutils literal"><span class="pre">easy-install.pth</span></tt> file.</li>
<li>EasyInstall now recognizes URLs with a <tt class="docutils literal"><span class="pre">#egg=project_name</span></tt> 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 <tt class="docutils literal"><span class="pre">--editable</span></tt> option. The <tt class="docutils literal"><span class="pre">#egg</span></tt>
fragment can contain a version if it’s formatted as <tt class="docutils literal"><span class="pre">#egg=proj-ver</span></tt>,
where <tt class="docutils literal"><span class="pre">proj</span></tt> is the project name, and <tt class="docutils literal"><span class="pre">ver</span></tt> is the version number. You
<em>must</em> use the format for these values that the <tt class="docutils literal"><span class="pre">bdist_egg</span></tt> command uses;
i.e., all non-alphanumeric runs must be condensed to single underscore
characters.</li>
<li>Added the <tt class="docutils literal"><span class="pre">--editable</span></tt> option; see <a class="reference internal" href="#editing-and-viewing-source-packages">Editing and Viewing Source Packages</a>
above for more info. Also, slightly changed the behavior of the
<tt class="docutils literal"><span class="pre">--build-directory</span></tt> option.</li>
<li>Fixed the setup script sandbox facility not recognizing certain paths as
valid on case-insensitive platforms.</li>
</ul>
</dd>
<dt>0.5a12</dt>
<dd><ul class="first last simple">
<li>Fix <tt class="docutils literal"><span class="pre">python</span> <span class="pre">-m</span> <span class="pre">easy_install</span></tt> not working due to setuptools being installed
as a zipfile. Update safety scanner to check for modules that might be used
as <tt class="docutils literal"><span class="pre">python</span> <span class="pre">-m</span></tt> scripts.</li>
<li>Misc. fixes for win32.exe support, including changes to support Python 2.4’s
changed <tt class="docutils literal"><span class="pre">bdist_wininst</span></tt> format.</li>
</ul>
</dd>
<dt>0.5a10</dt>
<dd><ul class="first last simple">
<li>Put the <tt class="docutils literal"><span class="pre">easy_install</span></tt> module back in as a module, as it’s needed for
<tt class="docutils literal"><span class="pre">python</span> <span class="pre">-m</span></tt> to run it!</li>
<li>Allow <tt class="docutils literal"><span class="pre">--find-links/-f</span></tt> to accept local directories or filenames as well
as URLs.</li>
</ul>
</dd>
<dt>0.5a9</dt>
<dd><ul class="first last simple">
<li>EasyInstall now automatically detects when an “unmanaged” package or
module is going to be on <tt class="docutils literal"><span class="pre">sys.path</span></tt> 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 (<tt class="docutils literal"><span class="pre">--delete-conflicting</span></tt> and <tt class="docutils literal"><span class="pre">--ignore-conflicts-at-my-risk</span></tt>)
available to change the default behavior. (Note: this new feature doesn’t
take effect for egg files that were built with older <tt class="docutils literal"><span class="pre">setuptools</span></tt>
versions, because they lack the new metadata file required to implement it.)</li>
<li>The <tt class="docutils literal"><span class="pre">easy_install</span></tt> distutils command now uses <tt class="docutils literal"><span class="pre">DistutilsError</span></tt> as its
base error type for errors that should just issue a message to stderr and
exit the program without a traceback.</li>
<li>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.</li>
<li>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.</li>
<li>Added the <tt class="docutils literal"><span class="pre">--always-unzip/-Z</span></tt> option, to force unzipping of packages that
would ordinarily be considered safe to unzip, and changed the meaning of
<tt class="docutils literal"><span class="pre">--zip-ok/-z</span></tt> to “always leave everything zipped”.</li>
</ul>
</dd>
<dt>0.5a8</dt>
<dd><ul class="first last simple">
<li>There is now a separate documentation page for <a class="reference external" href="http://peak.telecommunity.com/DevCenter/setuptools">setuptools</a>; revision
history that’s not specific to EasyInstall has been moved to that page.</li>
</ul>
</dd>
<dt>0.5a5</dt>
<dd><ul class="first last simple">
<li>Made <tt class="docutils literal"><span class="pre">easy_install</span></tt> a standard <tt class="docutils literal"><span class="pre">setuptools</span></tt> command, moving it from
the <tt class="docutils literal"><span class="pre">easy_install</span></tt> module to <tt class="docutils literal"><span class="pre">setuptools.command.easy_install</span></tt>. Note
that if you were importing or extending it, you must now change your imports
accordingly. <tt class="docutils literal"><span class="pre">easy_install.py</span></tt> is still installed as a script, but not as
a module.</li>
</ul>
</dd>
<dt>0.5a4</dt>
<dd><ul class="first last simple">
<li>Added <tt class="docutils literal"><span class="pre">--always-copy/-a</span></tt> 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.)</li>
<li>Added <tt class="docutils literal"><span class="pre">--upgrade/-U</span></tt> 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.</li>
<li>Added automatic installation of dependencies declared by a distribution
being installed. These dependencies must be listed in the distribution’s
<tt class="docutils literal"><span class="pre">EGG-INFO</span></tt> 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.)</li>
<li>Added the <tt class="docutils literal"><span class="pre">--record</span></tt> option to <tt class="docutils literal"><span class="pre">easy_install</span></tt> for the benefit of tools
that run <tt class="docutils literal"><span class="pre">setup.py</span> <span class="pre">install</span> <span class="pre">--record=filename</span></tt> on behalf of another
packaging system.)</li>
</ul>
</dd>
<dt>0.5a3</dt>
<dd><ul class="first last simple">
<li>Fixed not setting script permissions to allow execution.</li>
<li>Improved sandboxing so that setup scripts that want a temporary directory
(e.g. pychecker) can still run in the sandbox.</li>
</ul>
</dd>
<dt>0.5a2</dt>
<dd><ul class="first last simple">
<li>Fix stupid stupid refactoring-at-the-last-minute typos. :(</li>
</ul>
</dd>
<dt>0.5a1</dt>
<dd><ul class="first last simple">
<li>Added support for converting <tt class="docutils literal"><span class="pre">.win32.exe</span></tt> installers to eggs on the fly.
EasyInstall will now recognize such files by name and install them.</li>
<li>Fixed a problem with picking the “best” version to install (versions were
being sorted as strings, rather than as parsed values)</li>
</ul>
</dd>
<dt>0.4a4</dt>
<dd><ul class="first last simple">
<li>Added support for the distutils “verbose/quiet” and “dry-run” options, as
well as the “optimize” flag.</li>
<li>Support downloading packages that were uploaded to PyPI (by scanning all
links on package pages, not just the homepage/download links).</li>
</ul>
</dd>
<dt>0.4a3</dt>
<dd><ul class="first last simple">
<li>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.)</li>
</ul>
</dd>
<dt>0.4a2</dt>
<dd><ul class="first last simple">
<li>Added support for installing scripts</li>
<li>Added support for setting options via distutils configuration files, and
using distutils’ default options as a basis for EasyInstall’s defaults.</li>
<li>Renamed <tt class="docutils literal"><span class="pre">--scan-url/-s</span></tt> to <tt class="docutils literal"><span class="pre">--find-links/-f</span></tt> to free up <tt class="docutils literal"><span class="pre">-s</span></tt> for the
script installation directory option.</li>
<li>Use <tt class="docutils literal"><span class="pre">urllib2</span></tt> instead of <tt class="docutils literal"><span class="pre">urllib</span></tt>, to allow use of <tt class="docutils literal"><span class="pre">https:</span></tt> URLs if
Python includes SSL support.</li>
</ul>
</dd>
<dt>0.4a1</dt>
<dd><ul class="first last simple">
<li>Added <tt class="docutils literal"><span class="pre">--scan-url</span></tt> and <tt class="docutils literal"><span class="pre">--index-url</span></tt> options, to scan download pages
and search PyPI for needed packages.</li>
</ul>
</dd>
<dt>0.3a4</dt>
<dd><ul class="first last simple">
<li>Restrict <tt class="docutils literal"><span class="pre">--build-directory=DIR/-b</span> <span class="pre">DIR</span></tt> option to only be used with single
URL installs, to avoid running the wrong setup.py.</li>
</ul>
</dd>
<dt>0.3a3</dt>
<dd><ul class="first last simple">
<li>Added <tt class="docutils literal"><span class="pre">--build-directory=DIR/-b</span> <span class="pre">DIR</span></tt> option.</li>
<li>Added “installation report” that explains how to use ‘require()’ when doing
a multiversion install or alternate installation directory.</li>
<li>Added SourceForge mirror auto-select (Contributed by Ian Bicking)</li>
<li>Added “sandboxing” that stops a setup script from running if it attempts to
write to the filesystem outside of the build area</li>
<li>Added more workarounds for packages with quirky <tt class="docutils literal"><span class="pre">install_data</span></tt> hacks</li>
</ul>
</dd>
<dt>0.3a2</dt>
<dd><ul class="first last simple">
<li>Added subversion download support for <tt class="docutils literal"><span class="pre">svn:</span></tt> and <tt class="docutils literal"><span class="pre">svn+</span></tt> URLs, as well as
automatic recognition of HTTP subversion URLs (Contributed by Ian Bicking)</li>
<li>Misc. bug fixes</li>
</ul>
</dd>
<dt>0.3a1</dt>
<dd><ul class="first last simple">
<li>Initial release.</li>
</ul>
</dd>
</dl>
</div>
<div class="section" id="future-plans">
<h2><a class="toc-backref" href="#id34">Future Plans</a><a class="headerlink" href="#future-plans" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Additional utilities to list/remove/verify packages</li>
<li>Signature checking? SSL? Ability to suppress PyPI search?</li>
<li>Display byte progress meter when downloading distributions and long pages?</li>
<li>Redirect stdout/stderr to log during run_setup?</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Easy Install</a><ul>
<li><a class="reference internal" href="#using-easy-install">Using “Easy Install”</a><ul>
<li><a class="reference internal" href="#installing-easy-install">Installing “Easy Install”</a><ul>
<li><a class="reference internal" href="#troubleshooting">Troubleshooting</a></li>
<li><a class="reference internal" href="#windows-notes">Windows Notes</a></li>
</ul>
</li>
<li><a class="reference internal" href="#downloading-and-installing-a-package">Downloading and Installing a Package</a></li>
<li><a class="reference internal" href="#upgrading-a-package">Upgrading a Package</a></li>
<li><a class="reference internal" href="#changing-the-active-version">Changing the Active Version</a></li>
<li><a class="reference internal" href="#uninstalling-packages">Uninstalling Packages</a></li>
<li><a class="reference internal" href="#managing-scripts">Managing Scripts</a></li>
<li><a class="reference internal" href="#tips-techniques">Tips & Techniques</a><ul>
<li><a class="reference internal" href="#multiple-python-versions">Multiple Python Versions</a></li>
<li><a class="reference internal" href="#restricting-downloads-with-allow-hosts">Restricting Downloads with <tt class="docutils literal"><span class="pre">--allow-hosts</span></tt></a></li>
<li><a class="reference internal" href="#installing-on-un-networked-machines">Installing on Un-networked Machines</a></li>
<li><a class="reference internal" href="#packaging-others-projects-as-eggs">Packaging Others’ Projects As Eggs</a></li>
<li><a class="reference internal" href="#creating-your-own-package-index">Creating your own Package Index</a></li>
</ul>
</li>
<li><a class="reference internal" href="#password-protected-sites">Password-Protected Sites</a><ul>
<li><a class="reference internal" href="#controlling-build-options">Controlling Build Options</a></li>
<li><a class="reference internal" href="#editing-and-viewing-source-packages">Editing and Viewing Source Packages</a></li>
<li><a class="reference internal" href="#dealing-with-installation-conflicts">Dealing with Installation Conflicts</a></li>
<li><a class="reference internal" href="#compressed-installation">Compressed Installation</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#reference-manual">Reference Manual</a><ul>
<li><a class="reference internal" href="#configuration-files">Configuration Files</a></li>
<li><a class="reference internal" href="#command-line-options">Command-Line Options</a></li>
<li><a class="reference internal" href="#custom-installation-locations">Custom Installation Locations</a><ul>
<li><a class="reference internal" href="#administrator-installation">Administrator Installation</a></li>
<li><a class="reference internal" href="#mac-os-x-user-installation">Mac OS X “User” Installation</a></li>
<li><a class="reference internal" href="#creating-a-virtual-python">Creating a “Virtual” Python</a></li>
<li><a class="reference internal" href="#traditional-pythonpath-based-installation">“Traditional” <tt class="docutils literal"><span class="pre">PYTHONPATH</span></tt>-based Installation</a></li>
</ul>
</li>
<li><a class="reference internal" href="#package-index-api">Package Index “API”</a><ul>
<li><a class="reference internal" href="#backward-compatibility">Backward Compatibility</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#history">History</a></li>
<li><a class="reference internal" href="#future-plans">Future Plans</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="setuptools.html"
title="previous chapter">Building and Distributing Packages with Distribute</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="pkg_resources.html"
title="next chapter">Package Discovery and Resource Access using <tt class="docutils literal"><span class="pre">pkg_resources</span></tt></a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/easy_install.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="pkg_resources.html" title="Package Discovery and Resource Access using pkg_resources"
>next</a></li>
<li class="right" >
<a href="setuptools.html" title="Building and Distributing Packages with Distribute"
>previous</a> |</li>
<li><a href="index.html">Distribute</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2009-2011, The fellowship of the packaging.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.8.
</div>
</body>
</html>
|