diff --git a/README b/README new file mode 100644 index 0000000000000000000000000000000000000000..519b226a1b88dfd43e286c8668dc27224adf1b43 --- /dev/null +++ b/README @@ -0,0 +1,20 @@ +Weboob is a project which provides a core library, backends and applications. + +The core library defines capabilities: features common to various websites. For +example, http://www.youtube.com and http://www.dailymotion.com are both videos +providers: Weboob defines the “ICapVideo” capability. + +Each backend interfaces a website and implements one or many of these +capabilities. Backends can be configured, which means that the end-user can +provide personal information to access the underlaying website (login/password +for example). + +Applications offer the ability to the end-user to work with many backends in +parallel, in a multi-threaded way. For example, one could search a video on +many providers websites. Applications are toolkit-agnostic. They can use Gtk, +Qt or text-only, more adapted to reuse data through pipes. + +The core library provides base classes which help the developer to write +backends and applications. + +Weboob is written in Python and is distributed under the GPLv3 license. diff --git a/tools/packaging/MANIFEST.in.d/backends-bank b/tools/packaging/MANIFEST.in.d/backends-bank new file mode 100644 index 0000000000000000000000000000000000000000..ea11e623829388bbbe2e386d833337be57752004 --- /dev/null +++ b/tools/packaging/MANIFEST.in.d/backends-bank @@ -0,0 +1 @@ +include share/pyshared/weboob/backends/aum/data/* diff --git a/tools/packaging/MANIFEST.in.d/backends-dating b/tools/packaging/MANIFEST.in.d/backends-dating new file mode 100644 index 0000000000000000000000000000000000000000..79d7930aeb016ab870ea5c42cc0e2ce952a4e5aa --- /dev/null +++ b/tools/packaging/MANIFEST.in.d/backends-dating @@ -0,0 +1 @@ +include share/pyshared/weboob/backends/bnporc/data/* diff --git a/tools/packaging/README.d/core-qt b/tools/packaging/README.d/core-qt new file mode 100644 index 0000000000000000000000000000000000000000..ce1ef259eae151eec2a1bb0efef8c98b0231222b --- /dev/null +++ b/tools/packaging/README.d/core-qt @@ -0,0 +1,2 @@ +This package provides a dialog box used to configure backends. +This dialog box can be integrated in a Qt GUI. diff --git a/tools/packaging/create_debian_packages.sh b/tools/packaging/create_debian_packages.sh index fe3a6b6ab2a2e31997d9c01a779f1f7b32c569a9..01f16f0c77f8e59fa03148629b7c7a2fea547696 100755 --- a/tools/packaging/create_debian_packages.sh +++ b/tools/packaging/create_debian_packages.sh @@ -1,4 +1,12 @@ #!/bin/sh +# +# This script generates the .deb packages for Weboob. +# It is based on python-stdeb setuptools extension. +# +# To accelerate the procedure, it is advised to disable the stdeb +# automatic depencies search feature. +# This requires a patch: +# # patch -p0 < stdeb.patch [ ! -d /usr/share/pyshared/stdeb ] && echo 'Please install the python-stdeb package' && exit @@ -41,28 +49,35 @@ mkdir $DEB_DIRPATH for f in $SETUP_PY_LIST do echo "========== Creating Debian package for $f" - rm -rf $DIST_DIRPATH - MANIFEST_IN=$SCRIPT_DIRPATH/MANIFEST.in.d/$(basename $f .py) + PKGNAME=$(basename $f .py) + rm -f MANIFEST.in + MANIFEST_IN=$SCRIPT_DIRPATH/MANIFEST.in.d/$PKGNAME [ -f $MANIFEST_IN ] && ln -s $MANIFEST_IN MANIFEST.in + README=$SCRIPT_DIRPATH/README.d/$PKGNAME + [ -f $README ] && mv README README.old && ln -s $README README python $f sdist cd $DIST_DIRPATH - TARGZ=$(ls *.tar.gz) + TARGZ=$(ls weboob-$PKGNAME-*.tar.gz) tar xf $TARGZ - PKGNAME=$(basename $f .py) TARGZ_DIRPATH=$(basename $TARGZ .tar.gz) + [ ! -d $TARGZ_DIRPATH ] && echo "$TARGZ_DIRPATH not found" && exit cd $TARGZ_DIRPATH ln -s $f setup.py - [ -f $MANIFEST_IN ] && ln -s $MANIFEST_IN MANIFEST.in + [ -f $MANIFEST_IN ] && ln -sf $MANIFEST_IN MANIFEST.in python setup.py --command-packages=stdeb.command sdist_dsc --extra-cfg-file $SCRIPT_DIRPATH/stdeb.cfg + [ ! -d deb_dist/$TARGZ_DIRPATH ] && echo "deb_dist/$TARGZ_DIRPATH not found" && exit cd deb_dist/$TARGZ_DIRPATH fakeroot dpkg-buildpackage cd .. + [ ! -f *.deb ] && echo "Debian package not found" && exit mv *.deb *.diff.gz *.changes *.orig.tar.gz $DEB_DIRPATH cd ../../.. + [ -f $README ] && mv README.old README + pwd # break done -rm -rf $DIST_DIRPATH MANIFEST.in *.egg-info +# rm -rf $DIST_DIRPATH MANIFEST.in *.egg-info echo echo "Packages are in the $DEB_DIRPATH directory" diff --git a/tools/packaging/setup.py.d/backends-bank.py b/tools/packaging/setup.py.d/backends-bank.py index ffe80dcc199399afb473fb0332b188a842ec6ba7..35504b25c020445082ec163f78f78efaf75e5356 100755 --- a/tools/packaging/setup.py.d/backends-bank.py +++ b/tools/packaging/setup.py.d/backends-bank.py @@ -35,11 +35,14 @@ 'weboob', 'weboob.backends', 'weboob.backends.bnporc', - 'weboob.backends.bnporc.data', 'weboob.backends.bnporc.pages', 'weboob.backends.cragr', 'weboob.backends.cragr.pages', ], + include_package_data=True, + package_data={ + 'weboob.backends.bnporc': ['data/*'], + }, install_requires=[ 'weboob-core', # python-weboob-core 'ClientForm', # python-clientform diff --git a/tools/packaging/setup.py.d/backends-dating.py b/tools/packaging/setup.py.d/backends-dating.py index 91f150e557e2440d4e77cdee9a30a965cb071739..a59df62947836abfb889373efbc4aab5c00a25a8 100755 --- a/tools/packaging/setup.py.d/backends-dating.py +++ b/tools/packaging/setup.py.d/backends-dating.py @@ -35,10 +35,13 @@ 'weboob', 'weboob.backends', 'weboob.backends.aum', - 'weboob.backends.aum.data', 'weboob.backends.aum.optim', 'weboob.backends.aum.pages', ], + include_package_data=True, + package_data={ + 'weboob.backends.aum': ['data/*'], + }, install_requires=[ 'weboob-core', # python-weboob-core 'html5lib', # python-html5lib diff --git a/tools/packaging/setup.py.d/backends-video.py b/tools/packaging/setup.py.d/backends-video.py index dd1da23872821ecb1c24ff39b4ee64938f11012a..e58f5a91bb2b7c6e92423df9883ca32ebd06c01f 100755 --- a/tools/packaging/setup.py.d/backends-video.py +++ b/tools/packaging/setup.py.d/backends-video.py @@ -37,7 +37,6 @@ 'weboob.backends.ina', 'weboob.backends.ina.pages', 'weboob.backends.youtube', - 'weboob.backends.youtube.pages', ], install_requires=[ 'weboob-core', # python-weboob-core diff --git a/tools/packaging/setup.py.d/core-qt.py b/tools/packaging/setup.py.d/core-qt.py index d6b09d17f051e4afcd0e630b849fe4046d8ca082..562f67e4a4cdf0b22f61474a7beb502b86dce402 100755 --- a/tools/packaging/setup.py.d/core-qt.py +++ b/tools/packaging/setup.py.d/core-qt.py @@ -46,10 +46,10 @@ 'weboob.applications.qweboobcfg', 'weboob.tools.application.qt', ], - data_files=[ - ('weboob/tools', ['weboob/tools/__init__.py']), - ('weboob/tools/application', ['weboob/tools/application/__init__.py']), - ], + # data_files=[ + # ('weboob/tools', ['weboob/tools/__init__.py']), + # ('weboob/tools/application', ['weboob/tools/application/__init__.py']), + # ], scripts=[ 'scripts/weboob-config-qt', ], diff --git a/tools/packaging/setup.py.d/core-webkit-formatter.py b/tools/packaging/setup.py.d/core-webkit-formatter.py index 3cb467ab524e66599ae8d227749ee286ac812b7e..14b0b40b90f19c6e845d79da465c4a5a7895972b 100755 --- a/tools/packaging/setup.py.d/core-webkit-formatter.py +++ b/tools/packaging/setup.py.d/core-webkit-formatter.py @@ -49,16 +49,16 @@ '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']), - ], + # 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']), + # ], install_requires=[ 'weboob-core', # python-weboob-core # not Pypi packages: # Depends - # gtk - # webkit + # python-gtk + # python-webkit ], ) diff --git a/tools/packaging/setup.py.d/core.py b/tools/packaging/setup.py.d/core.py index 5f1782182f6b339b0ae9932e36cb56d02ba0020c..9b72ded65b2bb06544729dee9f9baa0d95b7822a 100755 --- a/tools/packaging/setup.py.d/core.py +++ b/tools/packaging/setup.py.d/core.py @@ -17,30 +17,19 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +from __future__ import with_statement + from setuptools import setup +with open('README') as f: + readme_data = f.read() + setup( name='weboob-core', version='0.1', description='Weboob, Web Out Of Browsers - core library', - long_description=""" -Weboob is a project which provides a core library, backends and applications. - -The core library defines capabilities: features common to various websites. For example, http://www.youtube.com and -http://www.dailymotion.com are both videos providers: Weboob defines the “ICapVideo” capability. - -Each backend interfaces a website and implements one or many of these capabilities. Backends can be configured, which -means that the end-user can provide personal information to access the underlaying website (login/password for example). - -Applications offer the ability to the end-user to work with many backends in parallel, in a multi-threaded way. For -example, one could search a video on many providers websites. Applications are toolkit-agnostic. They can use Gtk, Qt or -text-only, more adapted to reuse data through pipes. - -The core library provides base classes which help the developer to write backends and applications. - -Weboob is written in Python and is distributed under the GPLv3 license. -""", + long_description=readme_data, author='Romain Bignon', author_email='weboob@lists.symlink.me', maintainer='Christophe Benz', diff --git a/tools/packaging/stdeb.patch b/tools/packaging/stdeb.patch new file mode 100644 index 0000000000000000000000000000000000000000..c6bb504c06e0c4e7381ecc680929b33657e68acf --- /dev/null +++ b/tools/packaging/stdeb.patch @@ -0,0 +1,10 @@ +--- /dev/null 2010-07-21 23:28:33.036382748 +0200 ++++ /usr/share/pyshared/stdeb/util.py 2010-07-21 23:28:39.808445830 +0200 +@@ -254,6 +254,7 @@ + import pkg_resources + + depends = [] # This will be the return value from this function. ++ return depends + + parsed_reqs=[] +