more work on Debian packages creation
This commit is contained in:
parent
6e94a3101a
commit
b4efc7430d
31 changed files with 256 additions and 60 deletions
28
tools/packaging/find_imports.sh
Executable file
28
tools/packaging/find_imports.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/sh
|
||||
# This script greps imports excluding standard packages (the list is not exhaustive).
|
||||
# It helps finding dependencies on a given directory.
|
||||
# Execute it on a setuptools sdist directory.
|
||||
#
|
||||
# For example:
|
||||
# ./tools/packaging/setup.py.d/core.py sdist
|
||||
# => generates dist/weboob-core-x.y.tar.gz
|
||||
# cd dist
|
||||
# tar xzf weboob-core-x.y.tar.gz
|
||||
# cd ..
|
||||
# ./tools/packaging/find_imports.sh dist/weboob-core-x.y/weboob
|
||||
#
|
||||
# Then, add the results to the setup.py.d files,
|
||||
# and to the tools/packaging/stdeb.cfg for Debian dependencies.
|
||||
|
||||
[ -z "$1" ] && echo "Please specify a directory" && exit
|
||||
|
||||
grep 'import' "$1" -r --include=*.py | \
|
||||
egrep -w -v '^.+:.*weboob|__import__|__future__|logging|threading|ConfigParser|from \..*|copy|'\
|
||||
'optparse|functools|inspect|datetime|ordereddict|from\ HTMLParser|xml\.etree|sqlite3|'\
|
||||
're|time|os|sys|hashlib|subprocess|stat|__builtin__|tempfile|urllib|urllib2|types|traceback|'\
|
||||
'getpass|htmlentitydefs|random|StringIO|minidom|from\ email|from\ smtplib|from\ smtpd|asyncore|'\
|
||||
'wsgiref'
|
||||
|
||||
echo
|
||||
echo "Used parsers:"
|
||||
grep "tools\.parsers" "$1" -r --include=*.py
|
||||
Loading…
Reference in a new issue