[llvm] r174002 - [lit] Add a MANIFEST file and a script for sanity checking the source dist.

Daniel Dunbar daniel at zuster.org
Wed Jan 30 16:22:00 PST 2013


Author: ddunbar
Date: Wed Jan 30 18:21:59 2013
New Revision: 174002

URL: http://llvm.org/viewvc/llvm-project?rev=174002&view=rev
Log:
[lit] Add a MANIFEST file and a script for sanity checking the source dist.

Added:
    llvm/trunk/utils/lit/MANIFEST.in
    llvm/trunk/utils/lit/utils/check-sdist   (with props)

Added: llvm/trunk/utils/lit/MANIFEST.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/MANIFEST.in?rev=174002&view=auto
==============================================================================
--- llvm/trunk/utils/lit/MANIFEST.in (added)
+++ llvm/trunk/utils/lit/MANIFEST.in Wed Jan 30 18:21:59 2013
@@ -0,0 +1,7 @@
+include TODO lit.py
+recursive-include tests *
+global-exclude *pyc
+global-exclude *~
+prune tests/Output
+prune tests/*/Output
+prune tests/*/*/Output

Added: llvm/trunk/utils/lit/utils/check-sdist
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/utils/check-sdist?rev=174002&view=auto
==============================================================================
--- llvm/trunk/utils/lit/utils/check-sdist (added)
+++ llvm/trunk/utils/lit/utils/check-sdist Wed Jan 30 18:21:59 2013
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+if [ $# == 1 ]; then
+    cd $1
+fi
+
+# Create a list of all the files in the source tree, excluding various things we
+# know don't belong.
+echo "Creating current directory contents list."
+find . | \
+    grep -v '^\./.gitignore' | \
+    grep -v '^\./dist' | \
+    grep -v '^\./utils' | \
+    grep -v '^\./venv' | \
+    grep -v '^\./lit.egg-info' | \
+    grep -v '^\./lit/ExampleTests' | \
+    grep -v '/Output' | \
+    grep -v '__pycache__' | \
+    grep -v '.pyc$' | grep -v '~$' | \
+    sort > /tmp/lit_source_files.txt
+
+# Create the source distribution.
+echo "Creating source distribution."
+rm -rf lit.egg-info dist
+python setup.py sdist > /tmp/lit_sdist_log.txt
+
+# Creating list of files in source distribution.
+echo "Creating source distribution file list."
+tar zft dist/lit*.tar.gz | \
+    sed -e 's#lit-[0-9.dev]*/#./#' | \
+    sed -e 's#/$##' | \
+    grep -v '^\./PKG-INFO' | \
+    grep -v '^\./setup.cfg' | \
+    grep -v '^\./lit.egg-info' | \
+    sort > /tmp/lit_sdist_files.txt
+
+# Diff the files.
+echo "Running diff..."
+if (diff /tmp/lit_source_files.txt /tmp/lit_sdist_files.txt); then
+    echo "Diff is clean!"
+else
+    echo "error: there were differences in the source lists!"
+    exit 1
+fi

Propchange: llvm/trunk/utils/lit/utils/check-sdist
------------------------------------------------------------------------------
    svn:executable = *





More information about the llvm-commits mailing list