Login | Register
My pages Projects Community openCollabNet

repoguard
Wiki: BuildTargets

Edit this page | Links to this page | Page information | Attachments | Refresh page

 

The build script is basically implemented using the latest Distribute module.

To call a specific build target, change to source the project root and call the build script setup.py as follows:

python setup.py [-GLOBAL OPTIONS] <BUILD_TARGET_NAME> [-BUILD TARGET OPTIONS]

Build target and global options can also be changed in the configuration file setup.cfg. The file is structured as follows:

[global]
<OPTION1>=<OPTIONVALUE1>
<OPTION2>=<OPTIONVALUE2>

[<BUILD_TARGET>]
<OPTION1>=<OPTIONVALUE1>
<OPTION2>=<OPTIONVALUE2>

The following table lists the important build targets.

Name

Description

Options

audit

Alias which produces human-readable code coverage and pylint reports. It is recommended that you run this target before you commit your changes to the repository.

-

clean

Removes all temporary build files. The dist folder is removed as well.

-

develop

Alias definition of the develop command. It ensures that the source package is found.

-

doc

Alias definition of the build_sphinx command to build the documentation with the correct options.

-

pylint

Checks the code for compliance with the Coding Standard.

--command=pylint sets path and name of the pylint command. Default is pylint. --out=[html|parseable] to produce either a human readable or CI usable report. Default is html.

test

Runs all unit tests and determines the code coverage.

--command=py.test sets path and name of the py.test command. --out=xml to produce a CI usable XML report. Default is to show the results on standard output.--covout=[html|xml] to produce either a human readable or CI usable code coverage report.

release

Alias definition to create release distributions (zip, tar) with proper version number.

-

snapshot

Alias definition to create a snapshot release. It creates source code distributions (zip, tar) and produces reports for the CI build.

-

<!> To change options of an alias definition, you can either edit setup.cfg or use the setopt target as follows:

python setup.py setopt --command=test --option=command --set-value=py.test-2.5
python setup.py snapshot

BuildTargets (last edited 2012-03-14 09:29:20 -0700 by ?schlauch)