=============
importchecker
=============

This recipe creates an importchecker instance in the bin directory.


options
-------

The ``p01.recipe.setup:download`` recipe can be used to download and
extract packages from the net. It supports the following options:

``path``
    path to python module to start with


usage
-----

  >>> write(sample_buildout, 'buildout.cfg',
  ... """
  ... [buildout]
  ... parts = checker
  ...
  ... [checker]
  ... recipe = p01.recipe.setup:importchecker
  ... path = src/p01/recipe/setup
  ...
  ... """)

  >>> print(system(buildout))
  Installing checker.
  Generated script '/sample-buildout/bin/checker'.

  >>> import os
  >>> ls(os.path.join(sample_buildout, 'bin'))
  -  buildout
  -  checker

  >>> cat('bin', 'checker')
  <BLANKLINE>
  import sys
  sys.path[0:0] = [
    ...
      ]
  <BLANKLINE>
  <BLANKLINE>
  import os
  sys.argv[0] = os.path.abspath(sys.argv[0])
  <BLANKLINE>
  <BLANKLINE>
  import p01.recipe.setup.importchecker
  <BLANKLINE>
  if __name__ == '__main__':
      sys.exit(p01.recipe.setup.importchecker.checker("src/p01/recipe/setup"))
