Auto Script Writer 2 Larry Keys

Writing the Setup Script The setup script is the centre of all activity in building, distributing, and installing modules using the Distutils. The main purpose of the setup script is to describe your module distribution to the Distutils, so that the various commands that operate on your modules do the right thing. As we saw in section above, the setup script consists mainly of a call to setup(), and most information supplied to the Distutils by the module developer is supplied as keyword arguments to setup(). Here’s a slightly more involved example, which we’ll follow for the next couple of sections: the Distutils’ own setup script.

(Keep in mind that although the Distutils are included with Python 1.6 and later, they also have an independent existence so that Python 1.5.2 users can use them to install other module distributions. Terjemah umdatul ahkam pdf to doc The Distutils’ own setup script, shown here, is used to install the package into Python 1.5.2.).

#!/usr/bin/env python from distutils.core import setup setup ( name = 'Distutils', version = '1.0', description = 'Python Distribution Utilities', author = 'Greg Ward', author_email = 'gward@python.net', url = ', packages = [ 'distutils', 'distutils.command' ], ) There are only two differences between this and the trivial one-file distribution presented in section: more metadata, and the specification of pure Python modules by package, rather than by module. This is important since the Distutils consist of a couple of dozen modules split into (so far) two packages; an explicit list of every module would be tedious to generate and difficult to maintain. For more information on the additional meta-data, see section. Note that any pathnames (files or directories) supplied in the setup script should be written using the Unix convention, i.e. The Distutils will take care of converting this platform-neutral representation into whatever is appropriate on your current platform before actually using the pathname. This makes your setup script portable across operating systems, which of course is one of the major goals of the Distutils. In this spirit, all pathnames in this document are slash-separated.

Auto Script Writer 2 Larry Keys

This, of course, only applies to pathnames given to Distutils functions. If you, for example, use standard Python functions such as or to specify files, you should be careful to write portable code instead of hardcoding path separators. Listing whole packages The packages option tells the Distutils to process (build, distribute, install, etc.) all pure Python modules found in each package mentioned in the packages list. In order to do this, of course, there has to be a correspondence between package names and directories in the filesystem. The default correspondence is the most obvious one, i.e. Package is found in the directory distutils relative to the distribution root. Thus, when you say packages = ['foo'] in your setup script, you are promising that the Distutils will find a file foo/__init__.py (which might be spelled differently on your system, but you get the idea) relative to the directory where your setup script lives.

Auto Script Writer 2 Larry Keys Download About the Authors - playwrights Off The Wall Plays. ABOUT THE AUTHORS AND PLAYWRIGHTS OFF THE WALL PLAYSOUR BEST SELLING AUTHORSCaitlin Coxon.

If you break this promise, the Distutils will issue a warning but still process the broken package anyway. Mario superstar baseball iso dolphin. If you use a different convention to lay out your source directory, that’s no problem: you just have to supply the package_dir option to tell the Distutils about your convention.

For example, say you keep all Python source under lib, so that modules in the “root package” (i.e., not in any package at all) are in lib, modules in the foo package are in lib/foo, and so forth. Then you would put. Describing extension modules Just as writing Python extension modules is a bit more complicated than writing pure Python modules, describing them to the Distutils is a bit more complicated.