7 # Create a list of all the files in the source tree, excluding various things we
9 echo "Creating current directory contents list."
11 grep -v '^\./.gitignore' | \
12 grep -v '^\./dist' | \
13 grep -v '^\./utils' | \
14 grep -v '^\./venv' | \
15 grep -v '^\./notes.txt' | \
16 grep -v '^\./lit.egg-info' | \
17 grep -v '^\./lit/ExampleTests' | \
19 grep -v '__pycache__' | \
20 grep -v '.pyc$' | grep -v '~$' | \
21 sort > /tmp/lit_source_files.txt
23 # Create the source distribution.
24 echo "Creating source distribution."
25 rm -rf lit.egg-info dist
26 python setup.py sdist > /tmp/lit_sdist_log.txt
28 # Creating list of files in source distribution.
29 echo "Creating source distribution file list."
30 tar zft dist/lit*.tar.gz | \
31 sed -e 's#lit-[0-9.dev]*/#./#' | \
33 grep -v '^\./PKG-INFO' | \
34 grep -v '^\./setup.cfg' | \
35 grep -v '^\./lit.egg-info' | \
36 sort > /tmp/lit_sdist_files.txt
39 echo "Running diff..."
40 if (diff /tmp/lit_source_files.txt /tmp/lit_sdist_files.txt); then
43 echo "error: there were differences in the source lists!"