Skip to main content

Extra distutils commands

Project description

https://travis-ci.org/farzadghanei/distutilazy.svg?branch=master

Extra distutils commands, including:

  • clean_pyc: clean compiled python files
  • clean_all: using distutils.clean and clean_pyc to clean all temporary files
  • bdist_pyinstaller: convenient calls for PyInstaller with sane defaults
  • test: run unit tests

How

Make sure distutilazy package is in sys.path, then add distutilazy.command package to the list of command packages in your setup.cfg file.

[global]
command_packages = distutilazy.command

That’s it. now you may use new commands directly from your setup.py:

To clean compiled python files from the project:

$ python setup.py clean_pyc

To run unit tests (by default runs tests/test*.py files):

$ python setup.py test

Available commands are in distutilazy.command package as separate modules.

A more detailed way is to use command classes, defined in distutilazy package modules. Each module might define more than a single command class.

The modules should be imported in setup.py, then desired classes might be assigned to command names using the cmdclass parameter.

import distutilazy.clean

setup(
    cmdclass: {'clean_pyc': distutilazy.clean.clean_pyc}
)

License

Distutilazy is released under the terms of MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for distutilazy, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size distutilazy-0.3.0.tar.gz (10.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page