[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFR: cairosvg -- SVG converter based on Cairo



* Michael Fladischer <michael@fladi.at>, 2012-06-11, 11:23:
No, it's not really correct. /usr/bin/cairosvg has currently #!/usr/bin/python2.7 (sic!) shebang, so it won't work out-of-the box if only python-ciarosvg is installed.

I would recommend you to get rid of the -common package and use alternatives to manage /usr/bin/cairosvg symlink, that would point either to #!/usr/bin/python or #!/usr/bin/python3 script.

I switched to alternatives. setuptools seem to be responsible for changing the shebang line in bin/cairosvg.

s/setuptools/distutils/. This package doesn't use setuptools AFAICS (which makes me wonder why it build-depends on it...).

I'm tempted to change it to "#!/usr/bin/python" instead of "#!/usr/bin/python2.7" but this would require meddling with the dependencies.

The dependencies are generated by dh_python{2,3}, so it's a matter of fixing shebangs before they are called, isn't it?

This may help:
https://lists.debian.org/debian-python/2011/03/msg00077.html

Re fix_setup.patch, what was wrong with the original code?
Running setup.py clean with python3.2 fails:

Traceback (most recent call last):
 File "setup.py", line 24, in <module>
   VERSION = re.search("VERSION = '([^']+)'", fd.read().strip()).group(1)
 File "/usr/lib/python3.2/encodings/ascii.py", line 26, in decode
   return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position
68: ordinal not in range(128)

Fair enough. It would be nice if the patch header explained that.

One more thing: Vcs-* fields are broken:

$ svn ls -v $(grep-dctrl -ns Vcs-Svn '' < debian/control)
svn: URL 'svn://svn.debian.org/python-modules/packages/cairosvg/trunk' non-existent in that revision

--
Jakub Wilk


Reply to: