more work on Debian packages creation

This commit is contained in:
Christophe Benz 2010-07-21 23:09:00 +02:00
commit b4efc7430d
31 changed files with 256 additions and 60 deletions

View file

@ -33,6 +33,8 @@ setup(
description='Weboob, Web Out Of Browsers - core library',
author='Romain Bignon',
author_email='weboob@lists.symlink.me',
maintainer='Christophe Benz',
maintainer_email='christophe.benz@gmail.com',
license='GPLv3',
url='http://www.weboob.org',
packages=find_packages(),

View file

@ -0,0 +1,2 @@
include weboob/tools/__init__.py
include weboob/tools/application/__init__.py

View file

@ -0,0 +1,3 @@
include weboob/tools/__init__.py
include weboob/tools/application/__init__.py
include weboob/tools/application/formatters/__init__.py

View file

@ -1,7 +1,10 @@
#!/bin/sh
[ ! -d /usr/share/pyshared/stdeb ] && echo 'Please install the python-stdeb package' && exit
DEB_DIRPATH="$PWD/deb"
SCRIPT_DIRPATH=$(dirname $0)
DIST_DIRPATH="$PWD/dist"
SCRIPT_DIRPATH=$(dirname $(readlink -f "$0"))
SETUP_PY_LIST="
$SCRIPT_DIRPATH/setup.py.d/core.py
@ -32,29 +35,34 @@ $SCRIPT_DIRPATH/setup.py.d/weboorrents.py
$SCRIPT_DIRPATH/setup.py.d/wetboobs.py
"
rm -rf $DEB_DIRPATH
rm -rf $DEB_DIRPATH *.egg-info
mkdir $DEB_DIRPATH
for f in $SETUP_PY_LIST
do
echo "========== Creating Debian package for $f"
rm -rf dist
rm -rf $DIST_DIRPATH
MANIFEST_IN=$SCRIPT_DIRPATH/MANIFEST.in.d/$(basename $f .py)
ln -s $MANIFEST_IN MANIFEST.in
python $f sdist
pushd dist
cd $DIST_DIRPATH
TARGZ=$(ls *.tar.gz)
tar xf $TARGZ
PKGNAME=$(basename $f .py)
mkdir $DEB_DIRPATH/$PKGNAME
TARGZ_DIRPATH=$(basename $TARGZ .tar.gz)
pushd $TARGZ_DIRPATH
ln -s ../../$f setup.py
python setup.py --command-packages=stdeb.command sdist_dsc --extra-cfg-file $SCRIPT_DIRPATH/stdeb.d/$PKGNAME.cfg
pushd deb_dist
pushd $TARGZ_DIRPATH
cd $TARGZ_DIRPATH
ln -s $f setup.py
ln -s $MANIFEST_IN MANIFEST.in
python setup.py --command-packages=stdeb.command sdist_dsc --extra-cfg-file $SCRIPT_DIRPATH/stdeb.cfg
cd deb_dist/$TARGZ_DIRPATH
fakeroot dpkg-buildpackage
popd
mv *.deb *.diff.gz *.changes *.orig.tar.gz $DEB_DIRPATH/$PKGNAME/
popd
popd
#break
cd ..
mv *.deb *.diff.gz *.changes *.orig.tar.gz $DEB_DIRPATH
cd ../..
break
done
rm -rf $DIST_DIRPATH MANIFEST.in *.egg-info
echo
echo "Packages are in the $DEB_DIRPATH directory"

28
tools/packaging/find_imports.sh Executable file
View 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

View file

@ -26,6 +26,8 @@ setup(
description='Weboob backends implementing bank capability',
author='Laurent Bachelier',
author_email='weboob@lists.symlink.me',
maintainer='Christophe Benz',
maintainer_email='christophe.benz@gmail.com',
license='GPLv3',
url='http://www.weboob.org/ICapBank',
namespace_packages = ['weboob', 'weboob.backends'],
@ -39,8 +41,10 @@ setup(
'weboob.backends.cragr.pages',
],
install_requires=[
'weboob-core',
# bnporc requires Image module
#'PIL',
'weboob-core', # python-weboob-core
'ClientForm', # python-clientform
# not Pypi packages:
# Suggests
# python-imaging
],
)

View file

@ -26,6 +26,8 @@ setup(
description='Weboob backends implementing dating capability',
author='Romain Bignon',
author_email='weboob@lists.symlink.me',
maintainer='Christophe Benz',
maintainer_email='christophe.benz@gmail.com',
license='GPLv3',
url='http://www.weboob.org/ICapDating',
namespace_packages = ['weboob', 'weboob.backends'],
@ -38,7 +40,9 @@ setup(
'weboob.backends.aum.pages',
],
install_requires=[
'weboob-core',
# html5lib, no egg?
'weboob-core', # python-weboob-core
'html5lib', # python-html5lib
'PIL', # python-imaging
'simplejson', # python-simplejson
],
)

View file

@ -26,6 +26,8 @@ setup(
description='Weboob backends implementing messages capability',
author='Romain Bignon',
author_email='weboob@lists.symlink.me',
maintainer='Christophe Benz',
maintainer_email='christophe.benz@gmail.com',
license='GPLv3',
url='http://www.weboob.org/ICapMessages',
namespace_packages = ['weboob', 'weboob.backends'],
@ -38,7 +40,7 @@ setup(
'weboob.backends.fourchan.pages',
],
install_requires=[
'weboob-core',
# feedparser, no egg?
'weboob-core', # python-weboob-core
'FeedParser', # python-feedparser
],
)

View file

@ -26,6 +26,8 @@ setup(
description='Weboob backends implementing torrent capability',
author='Romain Bignon',
author_email='weboob@lists.symlink.me',
maintainer='Christophe Benz',
maintainer_email='christophe.benz@gmail.com',
license='GPLv3',
url='http://www.weboob.org/ICapTorrent',
namespace_packages = ['weboob.backends'],
@ -36,6 +38,6 @@ setup(
'weboob.backends.gazelle.pages',
],
install_requires=[
'weboob-core',
'weboob-core', # python-weboob-core
],
)

View file

@ -26,6 +26,8 @@ setup(
description='Weboob backends implementing travel capability',
author='Romain Bignon, Julien Hébert',
author_email='weboob@lists.symlink.me',
maintainer='Christophe Benz',
maintainer_email='christophe.benz@gmail.com',
license='GPLv3',
url='http://www.weboob.org/ICapTravel',
namespace_packages = ['weboob', 'weboob.backends'],
@ -37,6 +39,6 @@ setup(
'weboob.backends.transilien.pages',
],
install_requires=[
'weboob-core',
'weboob-core', # python-weboob-core
],
)

View file

@ -26,6 +26,8 @@ setup(
description='Weboob backends implementing video capability - non-suitable for work',
author='Romain Bignon, Roger Philibert',
author_email='weboob@lists.symlink.me',
maintainer='Christophe Benz',
maintainer_email='christophe.benz@gmail.com',
license='GPLv3',
url='http://www.weboob.org/ICapVideo',
namespace_packages = ['weboob', 'weboob.backends'],
@ -38,6 +40,6 @@ setup(
'weboob.backends.youporn.pages',
],
install_requires=[
'weboob-core',
'weboob-core', # python-weboob-core
],
)

View file

@ -26,6 +26,8 @@ setup(
description='Weboob backends implementing video capability',
author='Christophe Benz, Romain Bignon',
author_email='weboob@lists.symlink.me',
maintainer='Christophe Benz',
maintainer_email='christophe.benz@gmail.com',
license='GPLv3',
url='http://www.weboob.org/ICapVideo',
namespace_packages = ['weboob', 'weboob.backends'],
@ -38,7 +40,7 @@ setup(
'weboob.backends.youtube.pages',
],
install_requires=[
'weboob-core',
# gdata, no egg?
'weboob-core', # python-weboob-core
'gdata', # python-gdata
],
)

View file

@ -26,6 +26,8 @@ setup(
description='Weboob backends implementing weather capability',
author='Romain Bignon',
author_email='weboob@lists.symlink.me',
maintainer='Christophe Benz',
maintainer_email='christophe.benz@gmail.com',
license='GPLv3',
url='http://www.weboob.org/ICapWeather',
namespace_packages = ['weboob', 'weboob.backends'],
@ -35,6 +37,6 @@ setup(
'weboob.backends.yweather',
],
install_requires=[
'weboob-core',
'weboob-core', # python-weboob-core
],
)

View file

@ -27,6 +27,8 @@ setup(
long_description='List your bank accounts and get info about them',
author='Christophe Benz, Romain Bignon',
author_email='weboob@lists.symlink.me',
maintainer='Christophe Benz',
maintainer_email='christophe.benz@gmail.com',
license='GPLv3',
url='http://www.weboob.org/Boobank',
namespace_packages = ['weboob', 'weboob.applications'],
@ -39,6 +41,6 @@ setup(
'scripts/boobank',
],
install_requires=[
'weboob-backends-bank',
'weboob-backends-bank', # python-weboob-backends-bank
],
)

View file

@ -31,6 +31,8 @@ setup(
long_description='Configure backends using a Qt GUI.',
author='Romain Bignon',
author_email='weboob@lists.symlink.me',
maintainer='Christophe Benz',
maintainer_email='christophe.benz@gmail.com',
license='GPLv3',
url='http://www.weboob.org',
namespace_packages = [
@ -45,14 +47,14 @@ setup(
'weboob.tools.application.qt',
],
data_files=[
('weboob/tools', ['weboob/tools/__init__.py']),
('weboob/tools/application', ['weboob/tools/application/__init__.py']),
('weboob/tools', ['weboob/tools/__init__.py']),
('weboob/tools/application', ['weboob/tools/application/__init__.py']),
],
scripts=[
'scripts/weboob-config-qt',
],
install_requires=[
'weboob-core',
#'PyQt',
'weboob-core', # python-weboob-core
'PyQt', # python-qt4
],
)

View file

@ -26,6 +26,8 @@ setup(
description='Weboob, Web Out Of Browsers - core library, WebKit formatter',
author='Christophe Benz',
author_email='weboob@lists.symlink.me',
maintainer='Christophe Benz',
maintainer_email='christophe.benz@gmail.com',
license='GPLv3',
url='http://www.weboob.org',
classifiers=[
@ -38,22 +40,25 @@ setup(
'Topic :: Internet',
],
namespace_packages = [
'weboob',
'weboob',
'weboob.tools',
'weboob.tools.application',
'weboob.tools.application.formatters',
],
packages=[
'weboob',
'weboob',
'weboob.tools.application.formatters.webkit',
],
data_files=[
('weboob/tools', ['weboob/tools/__init__.py']),
('weboob/tools/application', ['weboob/tools/application/__init__.py']),
('weboob/tools/application/formatters', ['weboob/tools/application/formatters/__init__.py']),
('weboob/tools', ['weboob/tools/__init__.py']),
('weboob/tools/application', ['weboob/tools/application/__init__.py']),
('weboob/tools/application/formatters', ['weboob/tools/application/formatters/__init__.py']),
],
install_requires=[
'weboob-core',
# webkit dependency, is not an egg?
'weboob-core', # python-weboob-core
# not Pypi packages:
# Depends
# gtk
# webkit
],
)

View file

@ -43,6 +43,8 @@ Weboob is written in Python and is distributed under the GPLv3 license.
""",
author='Romain Bignon',
author_email='weboob@lists.symlink.me',
maintainer='Christophe Benz',
maintainer_email='christophe.benz@gmail.com',
license='GPLv3',
url='http://www.weboob.org',
classifiers=[
@ -56,8 +58,8 @@ Weboob is written in Python and is distributed under the GPLv3 license.
],
# keywords='',
namespace_packages = [
'weboob',
'weboob.applications',
'weboob',
'weboob.applications',
'weboob.tools',
'weboob.tools.application',
],
@ -78,10 +80,25 @@ Weboob is written in Python and is distributed under the GPLv3 license.
],
scripts=[
'scripts/weboob-config',
'scripts/weboob-debug',
'scripts/weboob-tests',
# 'scripts/weboob-debug',
# 'scripts/weboob-tests',
],
install_requires=[
'python-dateutil',
'elementtidy', # python-elementtidy
'lxml', # python-lxml
'mechanize', # python-mechanize
'python-dateutil', # python-dateutil
'PyYAML', # python-yaml
],
# package name / Debian package name
#
# Recommends
# html2text / python-html2text
# PrettyTable / python-prettytable
#
# Suggests
# ClientForm / python-clientform
# ipython / ipython
# nose / python-nose
# pysqlite / python-pysqlite2
)

View file

@ -27,6 +27,8 @@ setup(
long_description='Optimize your probabilities to have sex on dating websites',
author='Romain Bignon',
author_email='weboob@lists.symlink.me',
maintainer='Christophe Benz',
maintainer_email='christophe.benz@gmail.com',
license='GPLv3',
url='http://www.weboob.org/HaveSex',
namespace_packages = ['weboob', 'weboob.applications'],
@ -39,6 +41,6 @@ setup(
'scripts/havesex',
],
install_requires=[
'weboob-backends-dating',
'weboob-backends-dating', # python-weboob-backends-dating
],
)

View file

@ -27,6 +27,8 @@ setup(
long_description='Search for train stations and departure timegrids',
author='Julien Hébert',
author_email='weboob@lists.symlink.me',
maintainer='Christophe Benz',
maintainer_email='christophe.benz@gmail.com',
license='GPLv3',
url='http://www.weboob.org/Masstransit',
namespace_packages = ['weboob', 'weboob.applications'],
@ -39,6 +41,9 @@ setup(
'scripts/masstransit',
],
install_requires=[
'weboob-backends-travel',
'weboob-backends-travel', # python-weboob-backends-travel
# python-gtk
# python-conic, on Maemo
# python-hildon, on Maemo
],
)

Some files were not shown because too many files have changed in this diff Show more