This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Extends the clean command to remove stuff generated by the development process.

Wait… Why? What??

So setup.py clean is useful for developers of C extensions or anything else that takes advantage of the setup.py build command. Pure Python packages generate their own set of artifacts that clutter up the source tree. This package extends the clean command so that it removes the following artifacts as well:

  • The distribution directory as generated by the sdist and bdist* commands
  • Top-level .egg-info and .egg directories that setup.py creates
  • Local virtual environment directories
  • __pycache__ directories

I come from a C/C++ background where the Makefile usually provide house keeping targets such as clean, dist-clean, and maintainer-clean. This extension is inspired by the same desire for a clean working environment.

Installation

The setuptools package contains a number of interesting ways in which it can be extended. If you develop Python packages, then you can include extension packages using the setup_requires and cmdclass keyword parameters to the setup function call. This is a little more difficult than it should be since the setupext package needs to be imported into setup.py so that it can be passed as a keyword parameter before it is downloaded. The easiest way to do this is to catch the ImportError that happens if it is not already downloaded:

import setuptools
try:
   from setupext import janitor
   CleanCommand = janitor.CleanCommand
except ImportError:
   CleanCommand = None

cmd_classes = {}
if CleanCommand is not None:
   cmd_classes['clean'] = CleanCommand

setup(
   # normal parameters
   setup_requires=['setupext.janitor'],
   cmdclass=cmd_classes,
)

You can use a different approach if you are simply a developer that wants to have this functionality available for your own use, then you can install it into your working environment. This package installs itself into the environment as a distutils extension so that it is available to any setup.py script as if by magic.

Usage

Once the extension is installed, the clean command will accept a few new command line parameters.

setup.py clean --dist
Removes directories that the various dist commands produce.
setup.py clean --egg
Removes .egg and .egg-info directories.
setup.py clean --environment
Removes the currently active virtual environment as indicated by the $VIRTUAL_ENV environment variable. The name of the directory can also be specified using the --virtualenv-dir command line option.
setup.py clean --pycache
Recursively removes directories named __pycache__.
setup.py clean --all
Remove all of by-products. This is the same as using --dist --egg --environment --pycache.
Release History

Release History

1.0.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
setupext_janitor-1.0.0-py2.py3-none-any.whl (8.5 kB) Copy SHA256 Checksum SHA256 3.4 Wheel Nov 20, 2014
setupext-janitor-1.0.0.tar.gz (9.9 kB) Copy SHA256 Checksum SHA256 Source Nov 20, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting