2011-07-29 02:02:28 +02:00
|
|
|
#! /usr/bin/env python
|
|
|
|
|
2013-07-22 21:39:28 +02:00
|
|
|
# please install this file as pre-commit hook with the following command:
|
|
|
|
#
|
|
|
|
# ln -sf ../../make-manifest .git/hooks/pre-commit
|
|
|
|
#
|
|
|
|
|
2011-07-29 02:02:28 +02:00
|
|
|
import os
|
|
|
|
|
2011-07-29 02:41:27 +02:00
|
|
|
|
2011-07-29 02:02:28 +02:00
|
|
|
def main():
|
2012-10-15 22:17:17 +02:00
|
|
|
files = sorted(set([x.strip() for x in os.popen("git ls-files")]) -
|
2013-07-22 21:39:28 +02:00
|
|
|
set(("make-manifest", "commit-standalone",
|
2012-12-02 01:37:01 +01:00
|
|
|
"vendor", ".gitmodules", ".travis.yml", ".travis-runtox.py")))
|
2012-10-15 22:17:17 +02:00
|
|
|
with open("MANIFEST.in", "w") as f:
|
|
|
|
for x in files:
|
|
|
|
f.write("include %s\n" % x)
|
2011-07-29 02:02:28 +02:00
|
|
|
|
2013-07-22 21:39:28 +02:00
|
|
|
os.system("git add MANIFEST.in; git diff --cached MANIFEST.in | cat")
|
|
|
|
|
2011-07-29 02:41:27 +02:00
|
|
|
if __name__ == '__main__':
|
2011-07-29 02:02:28 +02:00
|
|
|
main()
|