Python setup script requires




















Additional trailing version information is sometimes used to indicate sub-releases. Some examples:. Distutils catches any exceptions when running the setup script, and print a simple error message before the script is terminated.

Navigation index modules next previous Python ». Extension 'pkg. This warning notwithstanding, options to SWIG can be currently passed like this: setup Extension 'foo' , [ 'foo.

For example, if you need to link against libraries known to be in the standard library search path on target systems Extension It can provide packages or modules. It can obsolete packages or modules. From the PyXML setup script: setup For example, if a package should contain a subdirectory with several data files, the files can be arranged like this in the source tree: setup.

It is recommended that versions take the form major. This field must be a list. Some examples: 0. Table of Contents 2. Writing the Setup Script 2. Listing whole packages 2. Listing individual modules 2. Describing extension modules 2.

Extension names and packages 2. Extension source files 2. Preprocessor options 2. Library options 2. Other options 2. Relationships between Distributions and Packages 2.

Installing Scripts 2. Installing Package Data 2. Installing Additional Files 2. Additional meta-data 2. Debugging the setup script Previous topic 1. An Introduction to Distutils Next topic 3.

See History and License for more information. The Python Software Foundation is a non-profit corporation. Please donate. Last updated on Jan 13, The archive file will be named foo If an end-user wishes to install your foo module, all she has to do is download foo Command line scripts inside python packages are common.

You can organise your package in such a way that when a user installs the package, the script will be available on their path. Then, you need a builder, such as PyPA build which you can obtain via pip install build. After downloading it, invoke the builder:.

You now have your distribution ready e. And maybe your project will have grown by then to include a few dependencies, and perhaps some data files and scripts. In the next few sections, we will walk through the additional but essential information you need to specify to properly package your project. However, for very large projects, it can be a big burden to keep the package list updated. To use it in your project:.

When you pass the above information, alongside other necessary information, setuptools walks through the directory specified in where omitted here as the package resides in the current directory and filters the packages it can find following the include defaults to none , then removes those that match the exclude and returns a list of Python packages.

Note that each entry in the [options. For more details and advanced use, go to Package Discovery and Namespace Package. EasyInstall will recognize this suffix and automatically create a trivial setup. Currently available are:.

Be careful with the version. It should match the one inside the project files. This will do a checkout or a clone, in Git and Mercurial parlance to a temporary folder and run setup.

Setuptools allows you to declare dependencies that only get installed under specific circumstances. For example, Package-A offers optional PDF support and requires two other dependencies for it to work:.



0コメント

  • 1000 / 1000