Currently using setuptools 0.6c9




















If a package matching the requested name and version is not already installed in a directory on sys. This will activate the latest installed version. If you want to delete the currently installed version of a package or all versions of a package , you should first run:. Whenever you install, upgrade, or change versions of a package, EasyInstall automatically installs the scripts for the selected package version, unless you tell it not to with -x or --exclude-scripts.

If any scripts in the script directory have the same name, they are overwritten. Thus, you do not normally need to manually delete scripts for older versions of a package, unless the newer version of the package does not include a script of the same name.

However, if you are completely uninstalling a package, you may wish to manually delete its scripts. If you want to keep multiple versions of a script available, however, you can simply use the --multi-version or -m option, and rename the scripts that EasyInstall creates.

This works because EasyInstall installs scripts as short code stubs that require the matching version of the package the script came from, so renaming the script has no effect on what it executes. For example, suppose you want to use two versions of the rst2html tool provided by the docutils package. You might first install one version:.

This will create another rst2html. You now have two scripts, each using a different version of the package. Regardless of the technique used, the script s will be installed to a Scripts directory by default in the Python installation directory. During installation, pass command line options such as --script-dir to control where scripts will be installed.

These small. This behavior is currently default. EasyInstall also supports deferring to an external launcher such as pylauncher for launching scripts. EasyInstall will then install scripts as simple scripts with a. If these extensions are associated with the pylauncher and listed in the PATHEXT environment variable, these scripts can then be invoked simply and directly just like any other executable.

This behavior may become default in a future version. EasyInstall uses the. This distinct extension is necessary to prevent Python from treating the scripts as importable modules where name conflicts exist. Current releases of pylauncher do not yet associate with. N , where N. N is the Python version used to install it. Thus, if you install EasyInstall for both Python 3. You can use the --allow-hosts -H option to restrict what domains EasyInstall will look for links and downloads on.

You can also use wildcards, for example to restrict downloading to hosts in your own intranet. See the section below on Command-Line Options for more details on the --allow-hosts option.

By default, there are no host restrictions in effect, but you can change this default by editing the appropriate configuration files and adding:. The above example would then allow downloads only from hosts in the python. For example:.

This will tell EasyInstall to put zipped eggs or source packages for SomePackage and all its dependencies into somedir , without creating any scripts or. You can then copy the contents of somedir to the target machine. You can also build the eggs from local development packages that were installed with the setup. You can use EasyInstall to build eggs for a project. By placing them in a directory that is published to the web, you can then make the eggs available for download, either in an intranet or to the internet at large.

If someone distributes a package in the form of a single. So, something like this:. In addition to local directories and the Python Package Index, EasyInstall can find download links on most any web page whose URL is given to the -f --find-links option. In the simplest case, you can simply have a web page with links to eggs or Python source packages, even an automatically generated directory listing such as the Apache web server provides.

If you are setting up an intranet site for package downloads, you may want to configure the target machines to use your download site by default, adding something like this to their configuration files :.

As you can see, you can list multiple URLs separated by whitespace, continuing on multiple lines if necessary as long as the subsequent lines are indented.

If you are more ambitious, you can also create an entirely custom package index or PyPI mirror. Teams maintaining a private repository of packages may already have defined access credentials for uploading packages according to the distutils documentation. Refer to the distutils documentation for Python 2.

EasyInstall respects standard distutils Configuration Files , so you can use them to configure build options for packages that it installs from source. For example, if you are on Windows using the MinGW compiler, you can configure the default compiler by putting something like this:.

In fact, since this is just normal distutils configuration, it will affect any builds using that config file, not just ones done by EasyInstall. For example, if you add those lines to distutils. See Configuration Files below for a list of the standard configuration file locations, and links to more documentation on using distutils configuration files.

If you want to be able to examine these files, you can use the --editable option to EasyInstall, and EasyInstall will look for a source distribution or Subversion URL for the package, then download and extract it or check it out as a subdirectory of the --build-directory you specify. If you then wish to install the package after editing or configuring it, you can do so by rerunning EasyInstall with that directory as the target. Note that using --editable stops EasyInstall from actually building or installing the package; it just finds, obtains, and possibly unpacks it for you.

This allows you to make changes to the package if necessary, and to either install it in development mode using setup. 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.

If you have a dependency that needs 2to3, then That's where the main incompatibility was introduced. I doubt making a backward-incompatible release will have any benefit.

The main case to be made is for old, unmaintained code that's still in Python 2 syntax but installed on Python 3. I don't want to support this use case any longer. I did expect there would be some disruption from this change and my hope was that it would be small a few fringe packages , and thus believe a deprecation period to be possibly unnecessary.

Fixed in On the other hand, how will this be handled in future releases of setuptools? FTR this manifests itself as Skip to content. Star 1. New issue. Jump to bottom. Copy link. Make sure you're environment tools are updated.

Output Generate a virtualenv like: virtualenv. For linux, it would be pretty much the same commands, just changing around the directories to point to the correct python versions.

Documenting Your Project Using Sphinx. Documentation for the Code. Enter search terms or a module, class or function name. Getting Started With setuptools and setup. This tutorial will focus on the bare minimum basics you need to get setuptools running so you can: Register your package on pypi.

Setting up setup. Using setup. Note A key point here is you need to run these commands with the version of python you want to support.



0コメント

  • 1000 / 1000