1
0
mirror of https://github.com/pypiserver/pypiserver synced 2024-11-09 16:45:51 +01:00
pypiserver/make-manifest
2014-01-07 16:53:25 +01:00

23 lines
599 B
Python
Executable File

#! /usr/bin/env python
# please install this file as pre-commit hook with the following command:
#
# ln -sf ../../make-manifest .git/hooks/pre-commit
#
import os
def main():
files = sorted(set([x.strip() for x in os.popen("git ls-files")]) -
set(("make-manifest", "commit-standalone",
"vendor", ".gitmodules", ".travis.yml")))
with open("MANIFEST.in", "w") as f:
for x in files:
f.write("include %s\n" % x)
os.system("git add MANIFEST.in; git diff --cached MANIFEST.in | cat")
if __name__ == '__main__':
main()