archive-com.com » COM » T » TELECOMMUNITY.COM

Total: 388

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Full text search for "EasyInstall" - The PEAK Developers' Center
    FrontPage RecentChanges TitleIndex WordIndex SiteNavigation HelpContents EasyInstall 116 matches setuptools 48 matches EggFormats 17 matches PythonEggs 15 matches PackageNotes 13 matches PackageIndexAPI 9 matches PkgResources 4 matches Trellis 1 match 8 hits out of 162 pages searched Needed 0 2

    Original URL path: http://peak.telecommunity.com/DevCenter/EasyInstall?action=fullsearch&value=EasyInstall&literal=1&case=1 (2016-04-24)
    Open archived version from archive


  • FindPage - The PEAK Developers' Center
    TitleIndex a list of all pages in the wiki WordIndex a list of all words that are part of page title thus a list of the concepts in a wiki WikiSandBox feel free to change this page and experiment with editing Here s a title search Try something like manager Here s a full text search Display context of search results Case sensitive searching You can also use regular expressions

    Original URL path: http://peak.telecommunity.com/DevCenter/FindPage?value=EasyInstall (2016-04-24)
    Open archived version from archive

  • Diff for "EasyInstall" - The PEAK Developers' Center
    marked like this Additions are marked like this Release Notes Change History 0 6c11 Fix installed script exe files not working with 64 bit Python on Windows wasn t actually released in 0 6c10 due to a lost checkin 0 6c10 Fix easy install exe giving UAC errors on Windows Vista Fix installed script exe files not working with 64 bit Python on Windows Support for the most recent Sourceforge

    Original URL path: http://peak.telecommunity.com/DevCenter/EasyInstall?action=diff (2016-04-24)
    Open archived version from archive

  • Info for "EasyInstall" - The PEAK Developers' Center
    43 22 69896 m595e36d0 tmodns net document install data needed for turbogears eggs view diff 24 2006 05 12 18 47 37 69797 Phillip J Eby 0 6b1 minor bug fixes view diff 25 2006 04 28 14 04 45 69097 Phillip J Eby Remove outdated info about zipfile analysis view diff 26 2006 03 29 18 56 03 69275 Phillip J Eby 0 6a11 major user experience improvements view diff 27 2006 02 14 16 09 18 66735 Phillip J Eby 0 6a10 Major cleanups and enhancements view diff 28 2006 01 13 16 44 06 60091 192 208 10 131 describe the Windows gotcha regarding easy install exe view diff 29 2006 01 04 13 15 49 59859 Phillip J Eby 0 6a9 bugfix release and enhanced docs view diff 30 2005 12 18 11 33 54 59096 dsl027 181 031 sfo1 dsl speakeasy net Corrections for Mac OS X view diff 31 2005 12 16 13 32 41 58534 Phillip J Eby Overhaul docs for custom install locations and FAQs view diff 32 2005 11 22 18 59 20 54168 Phillip J Eby Remove feature request see pkg resources doc instead view diff 33 2005 11 22 18 05 09 54297 207 118 85 171 dyn centurytel net Suggestion in Future Plans about run time package installs view diff 34 2005 11 16 14 25 39 53951 Phillip J Eby 0 6a8 subversion features and SF bugfix release view diff 35 2005 11 01 19 47 53 53265 a 67 102 209 4 elementalsecurity com one character arg for index url was incorrect view diff 36 2005 10 22 15 43 10 53265 Phillip J Eby 0 6a6 bug fixes PYTHONPATH support virtual python py etc view diff 37 2005 10 22 14 12 04 49671 Phillip J Eby Add warning about broken installation instructions view diff 38 2005 10 16 04 30 09 49285 snafu rickshawconsulting net view diff 39 2005 10 16 03 41 47 49138 snafu rickshawconsulting net view diff 40 2005 09 25 15 06 51 48330 dsl081 225 227 chi1 dsl speakeasy net added note about script to create non root installs view diff 41 2005 09 24 17 39 34 48200 Phillip J Eby 0 6a3 GUI scripts bug fixes enhanced conflict resolution view diff 42 2005 09 18 00 04 24 47547 Phillip J Eby 0 6a2 support for autogen scripts and exe s view diff 43 2005 09 13 23 37 29 46202 Phillip J Eby Fix typo view diff 44 2005 09 13 23 35 58 46201 Phillip J Eby Update for 0 6a1 view diff 45 2005 08 15 11 10 09 35255 ca redbch cuda1 c9b b 23 stmnca adelphia net view diff 46 2005 07 12 20 33 45 35156 Phillip J Eby Fix typo view diff 47 2005 07 12 20 32 55 35154 Phillip J Eby 0 5a12 bug fixes view diff 48 2005 07 11 00 18 58 34573 Phillip J Eby

    Original URL path: http://peak.telecommunity.com/DevCenter/EasyInstall?action=info (2016-04-24)
    Open archived version from archive

  • EasyInstall - The PEAK Developers' Center
    if necessary and to either install it in development mode using setup py develop if the package uses setuptools that is or by running easy install projectdir where projectdir is the subdirectory EasyInstall created for the downloaded package In order to use editable e for short you must also supply a build directory b 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 Also when using editable you cannot use URLs or filenames as arguments You must 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 find links item f for short and then also specify the project name e g easy install eb projects fhttp prdownloads sourceforge net ctypes ctypes 0 9 6 tar gz download ctypes 0 9 6 Dealing with Installation Conflicts 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 sys path using special code added to the easy install pth 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 EasyInstall installs distributions in a managed way such that each distribution can be independently activated or deactivated on sys path 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 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 setup py install becuase the distutils 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 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 delete conflicting or ignore conflicts at my risk options as described under Command Line Options below 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 Compressed Installation 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 multi version option because Python processes zipfile entries on sys path much faster than it does directories 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 zip ok option The current analysis approach is fairly conservative it currenly looks for Any use of the file or path variables which should be replaced with pkg resources API calls Possible use of inspect functions that expect to manipulate source files e g inspect getsource Top level modules that might be scripts used with python m Python 2 4 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 zip ok flag which will tell EasyInstall to install the package as a zipfile anyway Or you can use the always unzip flag in which case EasyInstall will always unzip even if its analysis says the package is safe to run as a zipfile 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 Note If a package uses setuptools in its setup script the package author has the option to declare the package safe or unsafe for zipped usage via the zip safe argument to setup 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 Reference Manual Configuration Files New in 0 4a2 You may specify default options for EasyInstall using the standard distutils configuration files under the command heading easy install EasyInstall will look first for a setup cfg file in the current directory then a pydistutils cfg or HOME pydistutils cfg on Unix like OSes and Windows respectively and finally a distutils cfg file in the distutils package directory Here s a simple example easy install set the default location to install packages install dir home me lib python Notice that indentation can be used to continue an option value this is especially useful for the find links option which tells easy install to use download links on these pages before consulting PyPI find links http sqlobject org http peak telecommunity com dist In addition to accepting configuration for its own options under easy install EasyInstall also respects defaults specified for other distutils commands For example if you don t set an install dir for easy install but have set an install lib for the install 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 easy install section For more information see also the current Python documentation on the use and location of distutils configuration files Command Line Options zip ok z 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 always unzip Z 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 after reporting the problem to the package s maintainer and to the EasyInstall maintainers Note the z Z 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 multi version m Multi version mode Specifying this option prevents easy install from adding an easy install pth 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 pkg resources require to put it on sys path This can be as simple as from pkg resources import require require SomePackage OtherPackage MyPackage which will put the latest installed version of the specified packages on sys path for you For more advanced uses like selecting specific versions and enabling optional dependencies see the pkg resources API doc 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 upgrade U New in 0 5a4 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 upgrade or U flag EasyInstall will always check the package index and find links 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 install dir DIR d DIR Set the installation directory It is up to you to ensure that this directory is on sys path at runtime and to use pkg resources require to enable the installed package s that you need 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 site packages directory but if you are using distutils configuration files setting things like prefix or install lib then those settings are taken into account when computing the default installation directory as is the prefix option script dir DIR s DIR Set the script installation directory If you don t supply this option via the command line or a configuration file but you have supplied an install dir 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 exclude scripts x 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 always copy a New in 0 5a4 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 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 find links URLS OR FILENAMES f URLS OR FILENAMES 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 upgrade or U was used the specified URLs will be downloaded and scanned for additional direct links Eggs and archives found by way of find links are only downloaded if they are needed to meet a requirement specified on the command line links to unneeded packages are ignored 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 upgrade or U option Note if you want to refer to a local HTML file containing links you must use a file URL as filenames that do not refer to a directory egg or archive are ignored 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 Configuration Files above 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 update or U option delete conflicting D Removed in 0 6a11 As of 0 6a11 this option is no longer necessary please do not use it If you are replacing a package that was previously installed without using EasyInstall the old version may end up on sys path 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 ignore conflicts at my risk Removed in 0 6a11 As of 0 6a11 this option is no longer necessary please do not use it 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 PYTHONPATH or to sys path at runtime index url URL i URL New in 0 4a1 default changed in 0 6c7 Specifies the base URL of the Python Package Index The default is http pypi python org simple if not specified When a package is requested that is not locally available or linked from a find links 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 editable e New in 0 6a1 Only find and download source distributions for the specified projects unpacking them to subdirectories of the specified build directory EasyInstall will not actually build or install the requested projects or their dependencies it will just find and extract them for you See Editing and Viewing Source Packages above for more details build directory DIR b DIR UPDATED in 0 6a1 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 This option is most useful in combination with the editable option which forces EasyInstall to only find and extract but not build and install source distributions See Editing and Viewing Source Packages above for more information verbose v quiet q New in 0 4a4 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 q or quiet drops the detail level to warn which will only display installation reports warnings and errors Using v or verbose 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 v option more than once the second and subsequent uses are passed down to any setup scripts increasing the verbosity of their reporting as well dry run n New in 0 4a4 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 not skip downloading nor does it skip extracting source distributions to a temporary build directory optimize LEVEL O LEVEL New in 0 4a4 If you are installing from a source distribution and are not using the zip ok option this option controls the optimization level for compiling installed py files to pyo files It does not affect the compilation of modules contained in egg files only those in egg directories The optimization level can be set to 0 1 or 2 the default is 0 unless it s set under install or install lib in one of your distutils configuration files record FILENAME New in 0 5a4 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 site dirs DIRLIST S DIRLIST New in 0 6a1 Specify one or more custom site directories separated by commas Site directories are directories where pth files are processed such as the main Python site packages directory As of 0 6a10 EasyInstall automatically detects whether a given directory processes pth 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 pth files If you want to make a non PYTHONPATH directory support pth files please see the Administrator Installation section below no deps N New in 0 6a6 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 allow hosts PATTERNS H PATTERNS New in 0 6a6 Restrict downloading and spidering to hosts matching the specified glob patterns E g H python org restricts web access so that only packages listed and downloadable from machines in the python org domain The glob patterns must match the entire user host port section of the target URL s For example python org will NOT accept a URL like http python org foo or http www python org 8080 Multiple patterns can be specified by separting them with commas The default pattern is which matches anything In general this option is mainly useful for blocking EasyInstall s web access altogether e g Hlocalhost 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 allow hosts setting if it is more strict than you intended Some sites may wish to define a restrictive default setting for this option in their configuration files and then manually override the setting on the command line as needed prefix DIR New in 0 6a10 Use the specified directory as a base for computing the default installation and script directories On Windows the resulting default directories will be prefix Lib site packages and prefix Scripts while on other platforms the defaults will be prefix lib python2 X site packages with the appropriate version substituted for libraries and prefix bin for scripts Note that the prefix option only sets the default installation and script directories and does not override the ones set on the command line or in a configuration file local snapshots ok l New in 0 6c6 Normally EasyInstall prefers to only install released 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 setup py directory is explicitly passed on the command line However if this option is used then any in development projects that were installed using the setup py develop 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 always copy option to create a distributable snapshot of every egg needed to run an application 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 Custom Installation Locations EasyInstall manages what packages are active using Python pth files which are normally only usable in Python s main site packages directory On some platforms such as Mac OS X there are additional site packages 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 There are many reasons however why you might want to install packages somewhere other than the site packages 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 The following sections describe various approaches to custom installation feel free to choose which one best suits your system and needs Administrator Installation This approach is for when you have write access to site packages or another directory where pth 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 Mac OS X User Installation 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 Creating a Virtual Python This approach is for when you don t have root or access to write to the site packages 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 If you don t already have any PYTHONPATH customization or special distutils configuration and you can t use either of the preceding approaches this is probably the best one for you Traditional PYTHONPATH based Installation If you already have a custom PYTHONPATH 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 pth file to point to your custom installation location however you should use Administrator Installation to enable pth processing in the custom location instead as that is easier and more flexible than this approach Administrator Installation 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 First create an altinstall pth file in Python s site packages directory containing the following line substituting the correct Python version import os site site addsitedir os path expanduser lib python2 3 This will automatically add each user s lib python2 X directory to sys path if it exists and it will process any pth files in that directory which is what makes it usable with EasyInstall The next step is to create or modify distutils cfg in the distutils directory of your Python library The correct directory will be something like usr lib python2 X distutils on most Posix systems and something like C Python2X Lib distutils on Windows machines Add the following lines to the file substituting the correct Python version if necessary install install lib lib python2 3 This next line is optional but often quite useful it directs EasyInstall and the distutils to install scripts in the user s bin directory For Mac OS X framework Python builds you should use usr local bin instead because neither bin nor the default script installation location are on the system PATH install scripts bin This will configure the distutils and EasyInstall to install packages to the user s home directory by default Of course you aren t limited to using a lib python2 X directory with this approach You can substitute a specific systemwide directory if you like You can also edit pydistutils cfg or pydistutils cfg on Windows instead of changing the master distutils cfg file The true keys of this approach are simply that any custom installation directory must be added to sys path using a site addsitedir call from a working pth file or sitecustomize py The active distutils configuration file s or easy install command line should include the custom directory in the site dirs option so that EasyInstall knows that pth files will work in that location This is because Python does not keep track of what directories are or aren t enabled for pth processing in any way that EasyInstall can find out As long as both of these things have been done your custom installation location is good to go Mac OS X User Installation If you are on a Mac OS X machine you should just use the Library Python 2 x site packages directory as your custom installation location because it is already configured to process pth files and EasyInstall already knows this Before installing EasyInstall setuptools just create a pydistutils cfg file with the following contents or add this to the existing contents install install lib Library Python py version short site packages install scripts bin This will tell the distutils and EasyInstall to always install packages in your personal site packages directory and scripts to bin Note do not replace py version short 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 Once you have done this you can follow the normal installation instructions and use easy install without any other special options or steps Note however that bin is not in the default PATH so you may have to refer to scripts by their full location You may want to modify your shell startup script likely bashrc or profile or your MacOSX environment plist to include bin in your PATH Creating a Virtual Python 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 In the simplest case your virtual Python installation will live under the lib python2 x include python2 x and bin directories Just download virtual python py and run it using the site wide Python If you want to customize the location you can use the prefix option to specify an installation base directory in place of Use help to get the complete list of options When you re done you ll have a bin python executable that s linked to the local Python installation and inherits all its current libraries but which allows you to add as many new libraries as you want Simply use this new Python in place of your system defined one and you can modify it as you like without breaking anything that relies on the system Python You ll also still need to follow the standard installation instructions to install setuptools and EasyInstall using your new bin python executable in place of the system Python Note that if you were previously setting a PYTHONPATH and or had other special configuration options in your pydistutils cfg you may need to remove these settings before running virtual python py This is because your new Python executable will not need any custom configuration for the distutils or EasyInstall everything will go to the correct lib and bin directories automatically You should however also make sure that the bin subdirectory of your installation prefix e g bin is on your PATH because that is where EasyInstall and the distutils will install new Python scripts Traditional PYTHONPATH based Installation This installation method is not as robust or as flexible as creating a virtual python installation as it uses various tricks to fool Python into processing pth 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 Assuming that you want to install packages in a directory called py lib and scripts in bin here s what you need to do First edit pydistutils cfg to include these settings if you don t already have them install install lib py lib install scripts bin Be sure to do this before you try to run the ez setup py installation script Then follow the standard installation instructions but make sure that py lib is listed in your PYTHONPATH environment variable Your library installation directory must be in listed in PYTHONPATH 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 profile or other configuration file s to ensure that it is set if you haven t already got this set up on your machine Package Index API Custom package indexes and PyPI must follow the following rules for EasyInstall to be able to look up and download packages Except where stated otherwise pages are HTML or XHTML and links refer to href attributes Individual project version pages URLs must be of the form base projectname version where base is the package index s base URL Omitting the version part of a project page s URL but keeping the trailing should result in a page that is either The single active version of that project as though the version had been explicitly included OR A page with links to all of the active version pages for that project 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 Where available MD5 information should be added to download URLs by appending a fragment identifier of the form md5 where is the 32 character hex MD5 digest EasyInstall will verify that the downloaded file s MD5 digest matches the given value Individual project version pages should identify any homepage or download URLs using rel homepage and rel download 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 not scanned for additional homepage or download links as these are only processed for pages that are part of a package index site The root URL of the index if retrieved with a trailing must result in a page containing links to all projects active version pages Note This requirement is a workaround for the absence of case insensitive safe name 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 If a package index is accessed via a file URL then EasyInstall will automatically use index html files if present when trying to read a directory with a trailing on the URL Backward Compatibility Package indexes that wish to support setuptools versions prior to 0 6b4 should also follow these rules Homepage and download links must be preceded with th Home Page or th Download URL in addition to or instead of the rel 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 li strong Home Page strong th Home Page a rel homepage href http sqlobject org http sqlobject org a li 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 The pages described by paragraph 3 b of the preceding section must contain the string Index of Packages title 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 In addition for compatibility with PyPI versions that do not use md5 fragment IDs EasyInstall uses the following regular expression to match PyPI s displayed MD5 info broken onto two lines for readability a href a n s a href action show md5 amp digest 0 9a f 32 md5 a Release Notes Change History 0 6c11 Fix installed script exe files not working with 64 bit Python on Windows wasn t actually released in 0 6c10 due to a lost checkin 0 6c10 Fix easy install exe giving UAC errors on Windows Vista Support for the most recent Sourceforge download link insanity Stop crashing on certain types of HTTP error Stop re trying URLs that already failed retrieval once Fixes for various dependency management problems such as looping builds re downloading packages already present on sys path but not in a registered site directory and semi randomly preferring local f packages over local installed packages 0 6c9 Fixed win32 exe support for pth files so unnecessary directory nesting is flattened out in the resulting egg There was

    Original URL path: http://peak.telecommunity.com/DevCenter/EasyInstall?action=edit (2016-04-24)
    Open archived version from archive

  • EasyInstall - The PEAK Developers' Center
    to make changes to the package if necessary and to either install it in development mode using setup py develop if the package uses setuptools that is or by running easy install projectdir where projectdir is the subdirectory EasyInstall created for the downloaded package In order to use editable e for short you must also supply a build directory b 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 Also when using editable you cannot use URLs or filenames as arguments You must 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 find links item f for short and then also specify the project name e g easy install eb projects fhttp prdownloads sourceforge net ctypes ctypes 0 9 6 tar gz download ctypes 0 9 6 Dealing with Installation Conflicts 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 sys path using special code added to the easy install pth 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 EasyInstall installs distributions in a managed way such that each distribution can be independently activated or deactivated on sys path 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 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 setup py install becuase the distutils 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 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 delete conflicting or ignore conflicts at my risk options as described under Command Line Options below 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 Compressed Installation 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 multi version option because Python processes zipfile entries on sys path much faster than it does directories 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 zip ok option The current analysis approach is fairly conservative it currenly looks for Any use of the file or path variables which should be replaced with pkg resources API calls Possible use of inspect functions that expect to manipulate source files e g inspect getsource Top level modules that might be scripts used with python m Python 2 4 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 zip ok flag which will tell EasyInstall to install the package as a zipfile anyway Or you can use the always unzip flag in which case EasyInstall will always unzip even if its analysis says the package is safe to run as a zipfile 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 Note If a package uses setuptools in its setup script the package author has the option to declare the package safe or unsafe for zipped usage via the zip safe argument to setup 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 Reference Manual Configuration Files New in 0 4a2 You may specify default options for EasyInstall using the standard distutils configuration files under the command heading easy install EasyInstall will look first for a setup cfg file in the current directory then a pydistutils cfg or HOME pydistutils cfg on Unix like OSes and Windows respectively and finally a distutils cfg file in the distutils package directory Here s a simple example easy install set the default location to install packages install dir home me lib python Notice that indentation can be used to continue an option value this is especially useful for the find links option which tells easy install to use download links on these pages before consulting PyPI find links http sqlobject org http peak telecommunity com dist In addition to accepting configuration for its own options under easy install EasyInstall also respects defaults specified for other distutils commands For example if you don t set an install dir for easy install but have set an install lib for the install 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 easy install section For more information see also the current Python documentation on the use and location of distutils configuration files Command Line Options zip ok z 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 always unzip Z 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 after reporting the problem to the package s maintainer and to the EasyInstall maintainers Note the z Z 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 multi version m Multi version mode Specifying this option prevents easy install from adding an easy install pth 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 pkg resources require to put it on sys path This can be as simple as from pkg resources import require require SomePackage OtherPackage MyPackage which will put the latest installed version of the specified packages on sys path for you For more advanced uses like selecting specific versions and enabling optional dependencies see the pkg resources API doc 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 upgrade U New in 0 5a4 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 upgrade or U flag EasyInstall will always check the package index and find links 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 install dir DIR d DIR Set the installation directory It is up to you to ensure that this directory is on sys path at runtime and to use pkg resources require to enable the installed package s that you need 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 site packages directory but if you are using distutils configuration files setting things like prefix or install lib then those settings are taken into account when computing the default installation directory as is the prefix option script dir DIR s DIR Set the script installation directory If you don t supply this option via the command line or a configuration file but you have supplied an install dir 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 exclude scripts x 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 always copy a New in 0 5a4 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 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 find links URLS OR FILENAMES f URLS OR FILENAMES 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 upgrade or U was used the specified URLs will be downloaded and scanned for additional direct links Eggs and archives found by way of find links are only downloaded if they are needed to meet a requirement specified on the command line links to unneeded packages are ignored 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 upgrade or U option Note if you want to refer to a local HTML file containing links you must use a file URL as filenames that do not refer to a directory egg or archive are ignored 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 Configuration Files above 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 update or U option delete conflicting D Removed in 0 6a11 As of 0 6a11 this option is no longer necessary please do not use it If you are replacing a package that was previously installed without using EasyInstall the old version may end up on sys path 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 ignore conflicts at my risk Removed in 0 6a11 As of 0 6a11 this option is no longer necessary please do not use it 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 PYTHONPATH or to sys path at runtime index url URL i URL New in 0 4a1 default changed in 0 6c7 Specifies the base URL of the Python Package Index The default is http pypi python org simple if not specified When a package is requested that is not locally available or linked from a find links 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 editable e New in 0 6a1 Only find and download source distributions for the specified projects unpacking them to subdirectories of the specified build directory EasyInstall will not actually build or install the requested projects or their dependencies it will just find and extract them for you See Editing and Viewing Source Packages above for more details build directory DIR b DIR UPDATED in 0 6a1 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 This option is most useful in combination with the editable option which forces EasyInstall to only find and extract but not build and install source distributions See Editing and Viewing Source Packages above for more information verbose v quiet q New in 0 4a4 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 q or quiet drops the detail level to warn which will only display installation reports warnings and errors Using v or verbose 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 v option more than once the second and subsequent uses are passed down to any setup scripts increasing the verbosity of their reporting as well dry run n New in 0 4a4 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 not skip downloading nor does it skip extracting source distributions to a temporary build directory optimize LEVEL O LEVEL New in 0 4a4 If you are installing from a source distribution and are not using the zip ok option this option controls the optimization level for compiling installed py files to pyo files It does not affect the compilation of modules contained in egg files only those in egg directories The optimization level can be set to 0 1 or 2 the default is 0 unless it s set under install or install lib in one of your distutils configuration files record FILENAME New in 0 5a4 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 site dirs DIRLIST S DIRLIST New in 0 6a1 Specify one or more custom site directories separated by commas Site directories are directories where pth files are processed such as the main Python site packages directory As of 0 6a10 EasyInstall automatically detects whether a given directory processes pth 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 pth files If you want to make a non PYTHONPATH directory support pth files please see the Administrator Installation section below no deps N New in 0 6a6 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 allow hosts PATTERNS H PATTERNS New in 0 6a6 Restrict downloading and spidering to hosts matching the specified glob patterns E g H python org restricts web access so that only packages listed and downloadable from machines in the python org domain The glob patterns must match the entire user host port section of the target URL s For example python org will NOT accept a URL like http python org foo or http www python org 8080 Multiple patterns can be specified by separting them with commas The default pattern is which matches anything In general this option is mainly useful for blocking EasyInstall s web access altogether e g Hlocalhost 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 allow hosts setting if it is more strict than you intended Some sites may wish to define a restrictive default setting for this option in their configuration files and then manually override the setting on the command line as needed prefix DIR New in 0 6a10 Use the specified directory as a base for computing the default installation and script directories On Windows the resulting default directories will be prefix Lib site packages and prefix Scripts while on other platforms the defaults will be prefix lib python2 X site packages with the appropriate version substituted for libraries and prefix bin for scripts Note that the prefix option only sets the default installation and script directories and does not override the ones set on the command line or in a configuration file local snapshots ok l New in 0 6c6 Normally EasyInstall prefers to only install released 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 setup py directory is explicitly passed on the command line However if this option is used then any in development projects that were installed using the setup py develop 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 always copy option to create a distributable snapshot of every egg needed to run an application 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 Custom Installation Locations EasyInstall manages what packages are active using Python pth files which are normally only usable in Python s main site packages directory On some platforms such as Mac OS X there are additional site packages 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 There are many reasons however why you might want to install packages somewhere other than the site packages 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 The following sections describe various approaches to custom installation feel free to choose which one best suits your system and needs Administrator Installation This approach is for when you have write access to site packages or another directory where pth 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 Mac OS X User Installation 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 Creating a Virtual Python This approach is for when you don t have root or access to write to the site packages 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 If you don t already have any PYTHONPATH customization or special distutils configuration and you can t use either of the preceding approaches this is probably the best one for you Traditional PYTHONPATH based Installation If you already have a custom PYTHONPATH 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 pth file to point to your custom installation location however you should use Administrator Installation to enable pth processing in the custom location instead as that is easier and more flexible than this approach Administrator Installation 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 First create an altinstall pth file in Python s site packages directory containing the following line substituting the correct Python version import os site site addsitedir os path expanduser lib python2 3 This will automatically add each user s lib python2 X directory to sys path if it exists and it will process any pth files in that directory which is what makes it usable with EasyInstall The next step is to create or modify distutils cfg in the distutils directory of your Python library The correct directory will be something like usr lib python2 X distutils on most Posix systems and something like C Python2X Lib distutils on Windows machines Add the following lines to the file substituting the correct Python version if necessary install install lib lib python2 3 This next line is optional but often quite useful it directs EasyInstall and the distutils to install scripts in the user s bin directory For Mac OS X framework Python builds you should use usr local bin instead because neither bin nor the default script installation location are on the system PATH install scripts bin This will configure the distutils and EasyInstall to install packages to the user s home directory by default Of course you aren t limited to using a lib python2 X directory with this approach You can substitute a specific systemwide directory if you like You can also edit pydistutils cfg or pydistutils cfg on Windows instead of changing the master distutils cfg file The true keys of this approach are simply that any custom installation directory must be added to sys path using a site addsitedir call from a working pth file or sitecustomize py The active distutils configuration file s or easy install command line should include the custom directory in the site dirs option so that EasyInstall knows that pth files will work in that location This is because Python does not keep track of what directories are or aren t enabled for pth processing in any way that EasyInstall can find out As long as both of these things have been done your custom installation location is good to go Mac OS X User Installation If you are on a Mac OS X machine you should just use the Library Python 2 x site packages directory as your custom installation location because it is already configured to process pth files and EasyInstall already knows this Before installing EasyInstall setuptools just create a pydistutils cfg file with the following contents or add this to the existing contents install install lib Library Python py version short site packages install scripts bin This will tell the distutils and EasyInstall to always install packages in your personal site packages directory and scripts to bin Note do not replace py version short 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 Once you have done this you can follow the normal installation instructions and use easy install without any other special options or steps Note however that bin is not in the default PATH so you may have to refer to scripts by their full location You may want to modify your shell startup script likely bashrc or profile or your MacOSX environment plist to include bin in your PATH Creating a Virtual Python 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 In the simplest case your virtual Python installation will live under the lib python2 x include python2 x and bin directories Just download virtual python py and run it using the site wide Python If you want to customize the location you can use the prefix option to specify an installation base directory in place of Use help to get the complete list of options When you re done you ll have a bin python executable that s linked to the local Python installation and inherits all its current libraries but which allows you to add as many new libraries as you want Simply use this new Python in place of your system defined one and you can modify it as you like without breaking anything that relies on the system Python You ll also still need to follow the standard installation instructions to install setuptools and EasyInstall using your new bin python executable in place of the system Python Note that if you were previously setting a PYTHONPATH and or had other special configuration options in your pydistutils cfg you may need to remove these settings before running virtual python py This is because your new Python executable will not need any custom configuration for the distutils or EasyInstall everything will go to the correct lib and bin directories automatically You should however also make sure that the bin subdirectory of your installation prefix e g bin is on your PATH because that is where EasyInstall and the distutils will install new Python scripts Traditional PYTHONPATH based Installation This installation method is not as robust or as flexible as creating a virtual python installation as it uses various tricks to fool Python into processing pth 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 Assuming that you want to install packages in a directory called py lib and scripts in bin here s what you need to do First edit pydistutils cfg to include these settings if you don t already have them install install lib py lib install scripts bin Be sure to do this before you try to run the ez setup py installation script Then follow the standard installation instructions but make sure that py lib is listed in your PYTHONPATH environment variable Your library installation directory must be in listed in PYTHONPATH 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 profile or other configuration file s to ensure that it is set if you haven t already got this set up on your machine Package Index API Custom package indexes and PyPI must follow the following rules for EasyInstall to be able to look up and download packages Except where stated otherwise pages are HTML or XHTML and links refer to href attributes Individual project version pages URLs must be of the form base projectname version where base is the package index s base URL Omitting the version part of a project page s URL but keeping the trailing should result in a page that is either The single active version of that project as though the version had been explicitly included OR A page with links to all of the active version pages for that project 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 Where available MD5 information should be added to download URLs by appending a fragment identifier of the form md5 where is the 32 character hex MD5 digest EasyInstall will verify that the downloaded file s MD5 digest matches the given value Individual project version pages should identify any homepage or download URLs using rel homepage and rel download 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 not scanned for additional homepage or download links as these are only processed for pages that are part of a package index site The root URL of the index if retrieved with a trailing must result in a page containing links to all projects active version pages Note This requirement is a workaround for the absence of case insensitive safe name 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 If a package index is accessed via a file URL then EasyInstall will automatically use index html files if present when trying to read a directory with a trailing on the URL Backward Compatibility Package indexes that wish to support setuptools versions prior to 0 6b4 should also follow these rules Homepage and download links must be preceded with th Home Page or th Download URL in addition to or instead of the rel 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 li strong Home Page strong th Home Page a rel homepage href http sqlobject org http sqlobject org a li 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 The pages described by paragraph 3 b of the preceding section must contain the string Index of Packages title 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 In addition for compatibility with PyPI versions that do not use md5 fragment IDs EasyInstall uses the following regular expression to match PyPI s displayed MD5 info broken onto two lines for readability a href a n s a href action show md5 amp digest 0 9a f 32 md5 a Release Notes Change History 0 6c11 Fix installed script exe files not working with 64 bit Python on Windows wasn t actually released in 0 6c10 due to a lost checkin 0 6c10 Fix easy install exe giving UAC errors on Windows Vista Support for the most recent Sourceforge download link insanity Stop crashing on certain types of HTTP error Stop re trying URLs that already failed retrieval once Fixes for various dependency management problems such as looping builds re downloading packages already present on sys path but not in a registered site directory and semi randomly preferring local f packages over local installed packages 0 6c9 Fixed win32 exe support for pth files so unnecessary directory nesting is flattened out

    Original URL path: http://peak.telecommunity.com/DevCenter/EasyInstall?action=subscribe (2016-04-24)
    Open archived version from archive


  • to make changes to the package if necessary and to either install it in development mode using setup py develop if the package uses setuptools that is or by running easy install projectdir where projectdir is the subdirectory EasyInstall created for the downloaded package In order to use editable e for short you must also supply a build directory b 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 Also when using editable you cannot use URLs or filenames as arguments You must 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 find links item f for short and then also specify the project name e g easy install eb projects fhttp prdownloads sourceforge net ctypes ctypes 0 9 6 tar gz download ctypes 0 9 6 Dealing with Installation Conflicts 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 sys path using special code added to the easy install pth 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 EasyInstall installs distributions in a managed way such that each distribution can be independently activated or deactivated on sys path 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 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 setup py install becuase the distutils 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 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 delete conflicting or ignore conflicts at my risk options as described under Command Line Options below 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 Compressed Installation 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 multi version option because Python processes zipfile entries on sys path much faster than it does directories 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 zip ok option The current analysis approach is fairly conservative it currenly looks for Any use of the file or path variables which should be replaced with pkg resources API calls Possible use of inspect functions that expect to manipulate source files e g inspect getsource Top level modules that might be scripts used with python m Python 2 4 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 zip ok flag which will tell EasyInstall to install the package as a zipfile anyway Or you can use the always unzip flag in which case EasyInstall will always unzip even if its analysis says the package is safe to run as a zipfile 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 Note If a package uses setuptools in its setup script the package author has the option to declare the package safe or unsafe for zipped usage via the zip safe argument to setup 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 Reference Manual Configuration Files New in 0 4a2 You may specify default options for EasyInstall using the standard distutils configuration files under the command heading easy install EasyInstall will look first for a setup cfg file in the current directory then a pydistutils cfg or HOME pydistutils cfg on Unix like OSes and Windows respectively and finally a distutils cfg file in the distutils package directory Here s a simple example easy install set the default location to install packages install dir home me lib python Notice that indentation can be used to continue an option value this is especially useful for the find links option which tells easy install to use download links on these pages before consulting PyPI find links http sqlobject org http peak telecommunity com dist In addition to accepting configuration for its own options under easy install EasyInstall also respects defaults specified for other distutils commands For example if you don t set an install dir for easy install but have set an install lib for the install 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 easy install section For more information see also the current Python documentation on the use and location of distutils configuration files Command Line Options zip ok z 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 always unzip Z 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 after reporting the problem to the package s maintainer and to the EasyInstall maintainers Note the z Z 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 multi version m Multi version mode Specifying this option prevents easy install from adding an easy install pth 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 pkg resources require to put it on sys path This can be as simple as from pkg resources import require require SomePackage OtherPackage MyPackage which will put the latest installed version of the specified packages on sys path for you For more advanced uses like selecting specific versions and enabling optional dependencies see the pkg resources API doc 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 upgrade U New in 0 5a4 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 upgrade or U flag EasyInstall will always check the package index and find links 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 install dir DIR d DIR Set the installation directory It is up to you to ensure that this directory is on sys path at runtime and to use pkg resources require to enable the installed package s that you need 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 site packages directory but if you are using distutils configuration files setting things like prefix or install lib then those settings are taken into account when computing the default installation directory as is the prefix option script dir DIR s DIR Set the script installation directory If you don t supply this option via the command line or a configuration file but you have supplied an install dir 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 exclude scripts x 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 always copy a New in 0 5a4 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 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 find links URLS OR FILENAMES f URLS OR FILENAMES 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 upgrade or U was used the specified URLs will be downloaded and scanned for additional direct links Eggs and archives found by way of find links are only downloaded if they are needed to meet a requirement specified on the command line links to unneeded packages are ignored 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 upgrade or U option Note if you want to refer to a local HTML file containing links you must use a file URL as filenames that do not refer to a directory egg or archive are ignored 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 Configuration Files above 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 update or U option delete conflicting D Removed in 0 6a11 As of 0 6a11 this option is no longer necessary please do not use it If you are replacing a package that was previously installed without using EasyInstall the old version may end up on sys path 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 ignore conflicts at my risk Removed in 0 6a11 As of 0 6a11 this option is no longer necessary please do not use it 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 PYTHONPATH or to sys path at runtime index url URL i URL New in 0 4a1 default changed in 0 6c7 Specifies the base URL of the Python Package Index The default is http pypi python org simple if not specified When a package is requested that is not locally available or linked from a find links 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 editable e New in 0 6a1 Only find and download source distributions for the specified projects unpacking them to subdirectories of the specified build directory EasyInstall will not actually build or install the requested projects or their dependencies it will just find and extract them for you See Editing and Viewing Source Packages above for more details build directory DIR b DIR UPDATED in 0 6a1 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 This option is most useful in combination with the editable option which forces EasyInstall to only find and extract but not build and install source distributions See Editing and Viewing Source Packages above for more information verbose v quiet q New in 0 4a4 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 q or quiet drops the detail level to warn which will only display installation reports warnings and errors Using v or verbose 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 v option more than once the second and subsequent uses are passed down to any setup scripts increasing the verbosity of their reporting as well dry run n New in 0 4a4 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 not skip downloading nor does it skip extracting source distributions to a temporary build directory optimize LEVEL O LEVEL New in 0 4a4 If you are installing from a source distribution and are not using the zip ok option this option controls the optimization level for compiling installed py files to pyo files It does not affect the compilation of modules contained in egg files only those in egg directories The optimization level can be set to 0 1 or 2 the default is 0 unless it s set under install or install lib in one of your distutils configuration files record FILENAME New in 0 5a4 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 site dirs DIRLIST S DIRLIST New in 0 6a1 Specify one or more custom site directories separated by commas Site directories are directories where pth files are processed such as the main Python site packages directory As of 0 6a10 EasyInstall automatically detects whether a given directory processes pth 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 pth files If you want to make a non PYTHONPATH directory support pth files please see the Administrator Installation section below no deps N New in 0 6a6 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 allow hosts PATTERNS H PATTERNS New in 0 6a6 Restrict downloading and spidering to hosts matching the specified glob patterns E g H python org restricts web access so that only packages listed and downloadable from machines in the python org domain The glob patterns must match the entire user host port section of the target URL s For example python org will NOT accept a URL like http python org foo or http www python org 8080 Multiple patterns can be specified by separting them with commas The default pattern is which matches anything In general this option is mainly useful for blocking EasyInstall s web access altogether e g Hlocalhost 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 allow hosts setting if it is more strict than you intended Some sites may wish to define a restrictive default setting for this option in their configuration files and then manually override the setting on the command line as needed prefix DIR New in 0 6a10 Use the specified directory as a base for computing the default installation and script directories On Windows the resulting default directories will be prefix Lib site packages and prefix Scripts while on other platforms the defaults will be prefix lib python2 X site packages with the appropriate version substituted for libraries and prefix bin for scripts Note that the prefix option only sets the default installation and script directories and does not override the ones set on the command line or in a configuration file local snapshots ok l New in 0 6c6 Normally EasyInstall prefers to only install released 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 setup py directory is explicitly passed on the command line However if this option is used then any in development projects that were installed using the setup py develop 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 always copy option to create a distributable snapshot of every egg needed to run an application 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 Custom Installation Locations EasyInstall manages what packages are active using Python pth files which are normally only usable in Python s main site packages directory On some platforms such as Mac OS X there are additional site packages 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 There are many reasons however why you might want to install packages somewhere other than the site packages 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 The following sections describe various approaches to custom installation feel free to choose which one best suits your system and needs Administrator Installation This approach is for when you have write access to site packages or another directory where pth 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 Mac OS X User Installation 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 Creating a Virtual Python This approach is for when you don t have root or access to write to the site packages 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 If you don t already have any PYTHONPATH customization or special distutils configuration and you can t use either of the preceding approaches this is probably the best one for you Traditional PYTHONPATH based Installation If you already have a custom PYTHONPATH 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 pth file to point to your custom installation location however you should use Administrator Installation to enable pth processing in the custom location instead as that is easier and more flexible than this approach Administrator Installation 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 First create an altinstall pth file in Python s site packages directory containing the following line substituting the correct Python version import os site site addsitedir os path expanduser lib python2 3 This will automatically add each user s lib python2 X directory to sys path if it exists and it will process any pth files in that directory which is what makes it usable with EasyInstall The next step is to create or modify distutils cfg in the distutils directory of your Python library The correct directory will be something like usr lib python2 X distutils on most Posix systems and something like C Python2X Lib distutils on Windows machines Add the following lines to the file substituting the correct Python version if necessary install install lib lib python2 3 This next line is optional but often quite useful it directs EasyInstall and the distutils to install scripts in the user s bin directory For Mac OS X framework Python builds you should use usr local bin instead because neither bin nor the default script installation location are on the system PATH install scripts bin This will configure the distutils and EasyInstall to install packages to the user s home directory by default Of course you aren t limited to using a lib python2 X directory with this approach You can substitute a specific systemwide directory if you like You can also edit pydistutils cfg or pydistutils cfg on Windows instead of changing the master distutils cfg file The true keys of this approach are simply that any custom installation directory must be added to sys path using a site addsitedir call from a working pth file or sitecustomize py The active distutils configuration file s or easy install command line should include the custom directory in the site dirs option so that EasyInstall knows that pth files will work in that location This is because Python does not keep track of what directories are or aren t enabled for pth processing in any way that EasyInstall can find out As long as both of these things have been done your custom installation location is good to go Mac OS X User Installation If you are on a Mac OS X machine you should just use the Library Python 2 x site packages directory as your custom installation location because it is already configured to process pth files and EasyInstall already knows this Before installing EasyInstall setuptools just create a pydistutils cfg file with the following contents or add this to the existing contents install install lib Library Python py version short site packages install scripts bin This will tell the distutils and EasyInstall to always install packages in your personal site packages directory and scripts to bin Note do not replace py version short 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 Once you have done this you can follow the normal installation instructions and use easy install without any other special options or steps Note however that bin is not in the default PATH so you may have to refer to scripts by their full location You may want to modify your shell startup script likely bashrc or profile or your MacOSX environment plist to include bin in your PATH Creating a Virtual Python 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 In the simplest case your virtual Python installation will live under the lib python2 x include python2 x and bin directories Just download virtual python py and run it using the site wide Python If you want to customize the location you can use the prefix option to specify an installation base directory in place of Use help to get the complete list of options When you re done you ll have a bin python executable that s linked to the local Python installation and inherits all its current libraries but which allows you to add as many new libraries as you want Simply use this new Python in place of your system defined one and you can modify it as you like without breaking anything that relies on the system Python You ll also still need to follow the standard installation instructions to install setuptools and EasyInstall using your new bin python executable in place of the system Python Note that if you were previously setting a PYTHONPATH and or had other special configuration options in your pydistutils cfg you may need to remove these settings before running virtual python py This is because your new Python executable will not need any custom configuration for the distutils or EasyInstall everything will go to the correct lib and bin directories automatically You should however also make sure that the bin subdirectory of your installation prefix e g bin is on your PATH because that is where EasyInstall and the distutils will install new Python scripts Traditional PYTHONPATH based Installation This installation method is not as robust or as flexible as creating a virtual python installation as it uses various tricks to fool Python into processing pth 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 Assuming that you want to install packages in a directory called py lib and scripts in bin here s what you need to do First edit pydistutils cfg to include these settings if you don t already have them install install lib py lib install scripts bin Be sure to do this before you try to run the ez setup py installation script Then follow the standard installation instructions but make sure that py lib is listed in your PYTHONPATH environment variable Your library installation directory must be in listed in PYTHONPATH 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 profile or other configuration file s to ensure that it is set if you haven t already got this set up on your machine Package Index API Custom package indexes and PyPI must follow the following rules for EasyInstall to be able to look up and download packages Except where stated otherwise pages are HTML or XHTML and links refer to href attributes Individual project version pages URLs must be of the form base projectname version where base is the package index s base URL Omitting the version part of a project page s URL but keeping the trailing should result in a page that is either The single active version of that project as though the version had been explicitly included OR A page with links to all of the active version pages for that project 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 Where available MD5 information should be added to download URLs by appending a fragment identifier of the form md5 where is the 32 character hex MD5 digest EasyInstall will verify that the downloaded file s MD5 digest matches the given value Individual project version pages should identify any homepage or download URLs using rel homepage and rel download 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 not scanned for additional homepage or download links as these are only processed for pages that are part of a package index site The root URL of the index if retrieved with a trailing must result in a page containing links to all projects active version pages Note This requirement is a workaround for the absence of case insensitive safe name 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 If a package index is accessed via a file URL then EasyInstall will automatically use index html files if present when trying to read a directory with a trailing on the URL Backward Compatibility Package indexes that wish to support setuptools versions prior to 0 6b4 should also follow these rules Homepage and download links must be preceded with th Home Page or th Download URL in addition to or instead of the rel 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 li strong Home Page strong th Home Page a rel homepage href http sqlobject org http sqlobject org a li 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 The pages described by paragraph 3 b of the preceding section must contain the string Index of Packages title 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 In addition for compatibility with PyPI versions that do not use md5 fragment IDs EasyInstall uses the following regular expression to match PyPI s displayed MD5 info broken onto two lines for readability a href a n s a href action show md5 amp digest 0 9a f 32 md5 a Release Notes Change History 0 6c11 Fix installed script exe files not working with 64 bit Python on Windows wasn t actually released in 0 6c10 due to a lost checkin 0 6c10 Fix easy install exe giving UAC errors on Windows Vista Support for the most recent Sourceforge download link insanity Stop crashing on certain types of HTTP error Stop re trying URLs that already failed retrieval once Fixes for various dependency management problems such as looping builds re downloading packages already present on sys path but not in a registered site directory and semi randomly preferring local f packages over local installed packages 0 6c9 Fixed win32 exe support for pth files so unnecessary directory nesting is flattened out

    Original URL path: http://peak.telecommunity.com/DevCenter/EasyInstall?action=format&mimetype=text/xml (2016-04-24)
    Open archived version from archive


  • def make exe fn if os name posix oldmode os stat fn st mode 07777 newmode oldmode 0555 07777 os chmod fn newmode if verbose print Changed mode of s to s fn oct newmode def main if os name posix print This script only works on Unix like platforms sorry return parser optparse OptionParser parser add option v verbose action count dest verbose default 0 help Increase verbosity parser add option prefix dest prefix default help The base directory to install to default parser add option clear dest clear action store true help Clear out the non root install and start from scratch parser add option no site packages dest no site packages action store true help Don t copy the contents of the global site packages dir to the non root site packages options args parser parse args global verbose home dir os path expanduser options prefix lib dir join home dir lib py version inc dir join home dir include py version bin dir join home dir bin if sys executable startswith bin dir print Please use the system python to run this script return verbose options verbose assert not args No arguments allowed if options clear rmtree lib dir rmtree inc dir print Not deleting bin dir prefix sys prefix mkdir lib dir stdlib dir join prefix lib py version for fn in os listdir stdlib dir if fn site packages symlink join stdlib dir fn join lib dir fn mkdir join lib dir site packages if not options no site packages for fn in os listdir join stdlib dir site packages symlink join stdlib dir site packages fn join lib dir site packages fn mkdir inc dir stdinc dir join prefix include py version for fn in os listdir stdinc dir symlink join stdinc dir

    Original URL path: http://peak.telecommunity.com/dist/virtual-python.py (2016-04-24)
    Open archived version from archive



  •