Révision 56c2f017
Ajouté par Benjamin Dauvergne il y a environ 11 ans
tools/check-git2python-packaging.sh | ||
---|---|---|
1 |
#!/bin/bash |
|
2 |
|
|
3 |
if [ ! -f setup.py ]; then |
|
4 |
echo Not in a python package root directory, no setup.py file |
|
5 |
exit 1 |
|
6 |
fi |
|
7 |
|
|
8 |
echo Cleaning... |
|
9 |
rm -rf dist/ build/ *.egg-info/ |
|
10 |
|
|
11 |
echo Building distribution file... |
|
12 |
python setup.py sdist |
|
13 |
|
|
14 |
if [ -d .git ]; then |
|
15 |
DIST=`ls dist/*.tar.gz` |
|
16 |
NAME=`basename $DIST | sed s/\\.tar\\.gz//` |
|
17 |
echo $DIST |
|
18 |
echo $NAME |
|
19 |
echo "tar tzf $DIST | sed s/$NAME\/// | grep -v '/$' | sort -u" |
|
20 |
diff -ub <(git ls-files|sort) <(tar tzf $DIST | sed s/$NAME\\/// | grep -v '/$' | sort -u) | less |
|
21 |
fi |
Formats disponibles : Unified diff
add tool script to check proper packaging of a git python repository