bercats.blogg.se

Cmh constructor 9 setup file
Cmh constructor 9 setup file










cmh constructor 9 setup file
  1. Cmh constructor 9 setup file install#
  2. Cmh constructor 9 setup file portable#

Sources to rebuild extension if any on this files has been modified since the The build command will call the compiler on the The depends option is a list of files that the extension depends on This option is not needed whenīuilding compiled extensions: Distutils will automatically add initmodule Symbols (functions or variables) to be exported. Specify additional command line options for the respective compiler and linkerĮxport_symbols is only useful on Windows. These files must not have extensions, as the default extension for theĮxtra_compile_args and extra_link_args can be used to The extra_objects option is a list of object files to be passed to the

Cmh constructor 9 setup file install#

Instead simply not install the failing extension. The optional option is a boolean if it is true,Ī build failure in the extension will not abort the build process, but There are still some other options which can be used to handle special cases. Package at all) are in lib, modules in the foo package are in Under lib, so that modules in the “root package” (i.e., not in any For example, say you keep all Python source

cmh constructor 9 setup file

Problem: you just have to supply the package_dir option to tell theĭistutils about your convention. If you use a different convention to lay out your source directory, that’s no If you break this promise, theĭistutils will issue a warning but still process the broken package anyway. The directory where your setup script lives. Might be spelled differently on your system, but you get the idea) relative to Promising that the Distutils will find a file foo/_init_.py (which Thus, when you say packages = in your setup script, you are package distutils isįound in the directory distutils relative to the distribution root. Theĭefault correspondence is the most obvious one, i.e. In order to do this, of course, there has to be aĬorrespondence between package names and directories in the filesystem. Install, etc.) all pure Python modules found in each package mentioned in the The packages option tells the Distutils to process (build, distribute, Os.listdir() to specify files, you should be careful to write portableĬode instead of hardcoding path separators: You, for example, use standard Python functions such as glob.glob() or

cmh constructor 9 setup file

This, of course, only applies to pathnames given to Distutils functions. Pathnames in this document are slash-separated. Of course is one of the major goals of the Distutils.

Cmh constructor 9 setup file portable#

This makes your setup script portable across operating systems, which Whatever is appropriate on your current platform before actually using the Theĭistutils will take care of converting this platform-neutral representation into Should be written using the Unix convention, i.e. Note that any pathnames (files or directories) supplied in the setup script Meta-data, see section Additional meta-data. (so far) two packages an explicit list of every module would be tedious to Important since the Distutils consist of a couple of dozen modules split into Specification of pure Python modules by package, rather than by module. There are only two differences between this and the trivial one-fileĭistribution presented in section A Simple Example: more metadata, and the #!/usr/bin/env python from re import setup setup ( name = 'Distutils', version = '1.0', description = 'Python Distribution Utilities', author = 'Greg Ward', author_email =, url = '', packages =, ) The Distutils’ own setup script, shown here, is used to install (Keep in mind that although theĭistutils are included with Python 1.6 and later, they also have an independentĮxistence so that Python 1.5.2 users can use them to install other moduleĭistributions. Of sections: the Distutils’ own setup script. Here’s a slightly more involved example, which we’ll follow for the next couple Setup(), and most information supplied to the Distutils by the moduleĭeveloper is supplied as keyword arguments to setup(). As we saw in sectionĪ Simple Example above, the setup script consists mainly of a call to To describe your module distribution to the Distutils, so that the variousĬommands that operate on your modules do the right thing. The setup script is the centre of all activity in building, distributing, and Independently covers all of the relevant information currently included here. This document is being retained solely until the setuptools documentation












Cmh constructor 9 setup file