NOTE. This answer is no longer valid, it is saved only for historical reasons, now the correct answer is to use setuptools, more information https://mail.python.org/pipermail/distutils-sig/2013-March/020126.html
First of all, I recommend abandoning setuptools:

And use distutils (which is the standard Python package distribution mechanism ) or distribute you are also distutils2 , but I think that it is not ready yet, and for the new standard here it is a guide for how to write setup.py.
For your problem, find_packages() does not exist in distutils , and you will need to add your package as follows:
setup(name='package', version='0.0dev1', description='blalal', author='me', packages=['package', 'package.sub_package', 'package.sub_package2'])
And if you have many packages and subpackages, you will have to create code that creates a list of packages here is an example from a Django source.
I think using distutils can help you with your problem , and I hope this can help :)
mouad source share