0

In my setup.py file which uses setuptools, I use packages = find_packages(). This works fine, except that it includes unversioned .py files that are stored in the package folders. I would like it to include only the .py files that I have checked into my Subversion repository. Is that possible and, if so, how?

In essence, I would like the inclusion of .py files in the packages to work more like the inclusion of data files enabled with include_package_data = True, where only data files that are also checked into Subversion get included.

Roger Dahl
  • 15,132
  • 8
  • 62
  • 82

1 Answers1

1

1 Find a list of files not version controlled using

svn status | grep ^?

Refer to How do I get a list of all unversioned files from SVN?

You will have to shell out using something like subprocess.check_output.

2 setuptools.find_packages() takes an exclude= parameter to specify a list of patterns and it will ignore all packages that match these patterns. You will have to send the filenames from setp 1 as exclude=. Refer: http://pythonhosted.org/setuptools/setuptools.html#using-find-packages

Community
  • 1
  • 1
sdqali
  • 2,234
  • 1
  • 13
  • 6