Include templates and static files in MANIFEST.in #95

Closed
Signum opened this Issue Jan 8, 2011 · 5 comments

Comments

Projects
None yet
3 participants

Signum commented Jan 8, 2011

On http://docs.pylonshq.com/pyramid/dev/narr/project.html#creating-the-project the documentation reads "By default, setup.py sdist does not place non-Python-source files in generated tarballs.".

We have had the same issue in Pylons back then and decided that it's worth creating a MANIFEST.in file reading:

recursive-include foo/static *
recursive-include foo/templates *

Please at least add to the documentation that such a MANIFEST.in file helps distributing a complete application. I honestly don't see the reason not to include templates and static files in a Pyramid-based application because it will probably not work.

My preferred solution is to include such a MANIFEST.in as we did in Pylons.

Contributor

mgedmin commented Jan 8, 2011

I second this in the strongest possible terms. Relying on setuptools version control support breaks down when

  • the user running python setup.py sdist forgets to install the relevant plugin for git/hg support
  • subversion releases a new version that changes the working tree format again, breaking setuptools (this used to happen once a year or so)
  • the user tries to build an sdist from a tree created by svn export
  • the user unpacks an sdist, modifies it, and tries to build an sdist again.

MANIFEST.in works always.

Owner

mcdonc commented Jan 20, 2011

Can anyone describe (or point me to a link that describes) the interaction between MANIFEST.in and setuptools autoinclusion-by-version-control-status?

Signum commented Jan 20, 2011

I have never used the "autoinclusion-by-version-control-status" feature. The MANIFEST.in is a description of files that should get included in a Python package although they are not actual Python files. See: http://docs.python.org/distutils/sourcedist.html#specifying-the-files-to-distribute

Contributor

mgedmin commented Jan 20, 2011

Here's the Setuptools official documentation.

My experience with it leads me to summarize: setup.py sdist includes all of

  • files that are under version control (assuming setuptools recognizes the version control system)
  • files that are included by MANIFEST.in
  • files that were included by the MANIFEST in the .egg-info directory of the previous build
Owner

mcdonc commented Jan 22, 2011

MANIFEST.in files are now included in the renderings of each paster template in Pyramid: 47442fb

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment