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
],
)

View file

@ -26,6 +26,8 @@ setup(
description='Monboob, the Weboob e-mail swiss-knife',
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/Monboob',
namespace_packages = ['weboob', 'weboob.applications'],
@ -38,6 +40,6 @@ setup(
'scripts/monboob',
],
install_requires=[
'weboob-backends-messages',
'weboob-backends-messages', # python-weboob-backends-messages
],
)

View file

@ -30,6 +30,8 @@ setup(
description='QBoobMsg, the Weboob e-mail swiss-knife, Qt version',
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/QBoobMsg',
namespace_packages = ['weboob', 'weboob.applications'],
@ -43,6 +45,7 @@ setup(
'scripts/qboobmsg',
],
install_requires=[
'weboob-backends-messages',
'weboob-core-qt', # python-weboob-core-qt
'weboob-backends-messages', # python-weboob-backends-messages
],
)

View file

@ -31,6 +31,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/QHaveSex',
namespace_packages = ['weboob', 'weboob.applications'],
@ -44,7 +46,7 @@ setup(
'scripts/qhavesex',
],
install_requires=[
'weboob-backends-dating',
#'yaml',
'weboob-core-qt', # python-weboob-core-qt
'weboob-backends-dating', # python-weboob-backends-dating
],
)

View file

@ -31,6 +31,8 @@ setup(
long_description='Search for videos on many websites, and get info about them',
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/QVideoob',
namespace_packages = ['weboob', 'weboob.applications'],
@ -44,7 +46,8 @@ setup(
'scripts/qvideoob',
],
install_requires=[
'weboob-backends-video',
# python-qt4-phonon
'weboob-core-qt', # python-weboob-core-qt
'weboob-backends-video', # python-weboob-backends-video
# python-qt4-phonon
],
)

View file

@ -27,6 +27,8 @@ setup(
long_description='Search for train stations and departure timegrids',
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/Travel',
namespace_packages = ['weboob', 'weboob.applications'],
@ -39,6 +41,6 @@ setup(
'scripts/travel',
],
install_requires=[
'weboob-backends-travel',
'weboob-backends-travel', # python-weboob-backends-travel
],
)

View file

@ -27,6 +27,8 @@ setup(
long_description='Search for videos on many websites, and get info about them',
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/Videoob',
namespace_packages = ['weboob', 'weboob.applications'],
@ -39,6 +41,6 @@ setup(
'scripts/videoob',
],
install_requires=[
'weboob-backends-video',
'weboob-backends-video', # python-weboob-backends-video
],
)

View file

@ -27,6 +27,8 @@ setup(
long_description='Search for videos on many websites, and get info about them',
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/VideoobWeb',
namespace_packages = ['weboob', 'weboob.applications'],
@ -41,6 +43,9 @@ setup(
'scripts/videoob-web-server',
],
install_requires=[
'weboob-backends-video',
'weboob-backends-video', # python-weboob-backends-video
'Mako', # python-mako
'Routes', # python-routes
'WebOb', # python-webob
],
)

View file

@ -27,6 +27,8 @@ setup(
long_description='Search for torrents on many websites, and get info about them',
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/Weboorrents',
namespace_packages = ['weboob', 'weboob.applications'],
@ -39,6 +41,6 @@ setup(
'scripts/weboorrents',
],
install_requires=[
'weboob-backends-torrent',
'weboob-backends-torrent', # python-weboob-backends-torrent
],
)

View file

@ -26,6 +26,8 @@ setup(
description='Wetboobs, the Weboob weather forecast swiss-knife',
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/Wetboobs',
namespace_packages = ['weboob', 'weboob.applications'],
@ -38,6 +40,6 @@ setup(
'scripts/wetboobs',
],
install_requires=[
'weboob-backends-weather',
'weboob-backends-weather', # python-weboob-backends-weather
],
)

79
tools/packaging/stdeb.cfg Normal file
View file

@ -0,0 +1,79 @@
# core
[weboob-core]
Depends = python-elementtidy, python-dateutil, python-lxml, python-mechanize, python-yaml
Recommends = python-prettytable, python-html2text, python-html5lib
Suggests = python-clientform, python-nose, ipython, python-pysqlite2
[weboob-core-qt]
Depends = python-weboob-core, python-qt4
[weboob-core-webkit-formatter]
Depends = python-weboob-core, python-gtk, python-webkit
# backends
[weboob-backends-bank]
Depends = python-weboob-core, python-clientform
Recommends = python-imaging
[weboob-backends-dating]
Depends = python-weboob-core, python-html5lib, python-imaging
[weboob-backends-messages]
Depends = python-weboob-core, python-feedparser
[weboob-backends-torrent]
Depends = python-weboob-core
[weboob-backends-travel]
Depends = python-weboob-core
[weboob-backends-video-nsfw]
Depends = python-weboob-core
[weboob-backends-video]
Depends = python-weboob-core, python-gdata
[weboob-backends-weather]
Depends = python-weboob-core
# applications
[weboob-boobank]
Depends = python-weboob-backends-bank
[weboob-havesex]
Depends = python-weboob-backends-dating
[weboob-masstransit]
Depends = python-weboob-backends-travel, python-conic, python-hildon
[weboob-monboob]
Depends = python-weboob-backends-messages
[weboob-qboobmsg]
Depends = python-weboob-backends-messages, python-weboob-core-qt
[weboob-qhavesex]
Depends = python-weboob-backends-dating, python-weboob-core-qt
[weboob-qvideoob]
Depends = python-weboob-backends-messages, python-weboob-core-qt, python-qt4-phonon
[weboob-travel]
Depends = python-weboob-backends-travel
[weboob-videoob]
Depends = python-weboob-backends-video
[weboob-videoob-web]
Depends = python-weboob-backends-video, python-mako, python-routes, python-webob
[weboob-weboorrents]
Depends = python-weboob-backends-torrent
[weboob-wetboobs]
Depends = python-weboob-backends-weather

View file

@ -1,2 +0,0 @@
[weboob-core]
depends = python-dateutil