Op 17-03-12 11:27, Simon Sapin schreef:
> Le 17/03/2012 11:15, Ike Devolder a écrit :
>> if the part sitting in /usr/bin is working with both the python2 and
>> python3 libs i would suggest the following
> 
> It does not. Distribute creates files with a shebang of whatever python
> executable was used to run setup.py, eg:
> 
> #!/usr/bin/python2
> 
> We could make instead a shell script that checks at run-time which
> version is installed, but is it really worth it?
> 

in my oppinion it is worth it, there are people around who dont want any
python3 stuff on their pc until they can move everything
now your weasyprint combined package pulls a lot of stuff, it is simple
in a way that it will always work but you have a *lot* of overhead there

so personally i would consider the following:

- have python-weasyprint with renamed binary python-weasyprint
- have python2-weasyprint with renamed binary python2-weasyprint
- have weasyprint with only a binary weasyprint which can start any of
  the previous

*or*

- have python-weasyprint only with libs, no binary
- have python2-weasyprint only with libs, no binary
- have weasyprint which can 'decide' which of the above is installed
  and run it with /usr/bin/python or /usr/bin/python2

  attached a possibility to switch to the installed version

-- 
Ike
#!/bin/bash

if [ -d /usr/lib/python2.7/site-packages/weasyprint ]; then
        PYTHON='python2'
elif [ -d /usr/lib/python3.2/site-packages/weasyprint ]; then
        PYTHON='python'
else
        echo "Weasyprint for python{,2} not found"
        exit
fi

$PYTHON <<EOD
# EASY-INSTALL-ENTRY-SCRIPT: 'WeasyPrint==0.6.1','console_scripts','weasyprint'
__requires__ = 'WeasyPrint==0.6.1'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.exit(
        load_entry_point('WeasyPrint==0.6.1', 'console_scripts', 'weasyprint')()
    )
EOD

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to