setuptools/easy_install does not install *.cfg files and locale directories?
Question: I have a little problem with setuptools/easy_install; maybe someone could give
me a hint what might be the cause of the problem:

To easily distribute one of my python webapps to servers I use setuptools'
`sdist` command to build a tar.gz file which is copied to servers and locally
installed using `easy_install /path/to/file.tar.gz`.

So far this seems to work great. I have listed everything in the `MANIFEST.in`
file like this:

    
    
    global-include */*.py */*.mo */*.po */*.pot */*.css */*.js */*.png */*.jpg */*.ico */*.woff */*.gif */*.mako */*.cfg
    

And the resulting tar.gz file does indeed contain all of the files I need.

It gets weird as soon as easy_install tries to actually install it on the
remote system. For some reason a directory called `locales` and a
configuration file called `migrate.cfg` won't get installed. This is odd and I
can't find any documentaiton about this, but I guess it's some automatic
ignore feature of easy_install?

Is there something like that? And if so, how do I get easy_install to install
the `locales` and `migrate.cfg` files?

Thanks!

For reference here is the content of my `setup.py`:

    
    
    from setuptools import setup, find_packages
    
    
    requires = ['flup', 'pyramid', 'WebError', 'wtforms', 'webhelpers', 'pil', 'apns', \
                'pyramid_beaker', 'sqlalchemy', 'poster', 'boto', 'pypdf', 'sqlalchemy_migrate', \
                'Babel']
    
    version_number = execfile('pubserverng/version.py')
    
    setup(
        author='Bastian',
        author_email='test@domain.com',
        url='http://domain.de/',
        name = "mywebapp",
        install_requires = requires,
        version = __version__,
        packages = find_packages(),
        zip_safe=False,
        entry_points = {
            'paste.app_factory': [
                'pubserverng=pubserverng:main'
            ]
        },
    
        namespace_packages = ['pubserverng'],
    
        message_extractors = { 'pubserverng': [
                ('**.py', 'python', None),
                ('templates/**.html', 'mako', None),
                ('templates/**.mako', 'mako', None),
                ('static/**', 'ignore', None),
                ('migrations/**', 'ignore', None), 
            ]
        },
    
    
    )
    


Answer: The entire package distribution system in python leaves a lot to be desired.
My issues were similar to yours and were eventually solved by using
`distutils` (rather than `setuptools`) which honored the `include_package_data
= True` setting as expected.

Using `distutils` allowed me to more or less keep required file list in
`MANIFEST.in`and avoid using the `package_data` setting where I would have had
to duplicate the source list; the draw back is `find_packages` is not
available. Below is my setup.py:

    
    
    from distutils.core import setup
    package = __import__('simplemenu')
    
    setup(name='django-simplemenu',
        version=package.get_version(),
        url='http://github.com/danielsokolowski/django-simplemenu',
        license='BSD',
        description=package.__doc__.strip(),
        author='Alex Vasi <eee@someuser.com>, Justin Steward <justin+github@justinsteward.com>, Daniel Sokolowski <unemelpmis-ognajd@danols.com>',
        author_email='unemelpmis-ognajd@danols.com',
        include_package_data=True, # this will read MANIFEST.in during install phase
        packages=[
            'simplemenu',
            'simplemenu.migrations',
            'simplemenu.templatetags',
        ],
        # below is no longer needed as we are utilizing MANIFEST.in with include_package_data setting
        #package_data={'simplemenu': ['locale/en/LC_MESSAGES/*', 
        #                             'locale/ru/LC_MESSAGES/*']
        #              },
        scripts=[],
        requires=[],
        )
    

And here is a `MANIFEST.in` file:

    
    
        include LICENSE
        include README.rst
        recursive-include simplemenu *.py
        recursive-include simplemenu/locale *
        prune simplemenu/migrations
    

