Re: E: dh_python2:146: you most probably have to build extension for python2.5.

2011-03-11 Thread Michal Čihař
Hi

Dne Thu, 10 Mar 2011 17:08:41 -0500
Barry Warsaw  napsal(a):

> On Mar 10, 2011, at 10:53 PM, Jakub Wilk wrote:
> >The upstream tarball contains both setup.py and Makefile. In such a case dh
> >uses Makefile-based build system. And then, it cannot possibly know that the
> >Makefile has anything to do with Python.  Passing
> >--buildsystem=python_distutils to dh might do the trick.
> 
> I think it does.  I'd like to change that so that it preferred the setup.py
> instead of the Makefile (by default), but don't know how controversial that
> would be.

I had same issue in pas and it was resolved with the --buildsystem, see:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=481900

-- 
Michal Čihař | http://cihar.com | http://blog.cihar.com


signature.asc
Description: PGP signature


Re: E: dh_python2:146: you most probably have to build extension for python2.5.

2011-03-11 Thread Piotr Ożarowski
[Ludovic Rousseau, 2011-03-10]
> But I now get a warning and an error (complete log attached):
> [...]
>dh_python2
> W: dh_python2:94: Python 2.6 should install files in
> /usr/lib/python2.6/dist-packages/. Did you forget
> "--install-layout=deb"?
> E: dh_python2:146: you most probably have to build extension for python2.5.
> make: *** [binary] Error 12

if you install public modules for one Python version only, but
X-Python-Version suggests this module supports at least one more
currently supported Python version, dh_python2 tries to use installed
files for other Python versions. If it's not possible, f.e. because
all installed modules contain extensions (which cannot be shared and I
don't know if given extension is optional or not), dh_python2 will fail
with this error message.

I consider this an improvement over dh_pycentral/dh_pysupport because I
think it's better to FTBFS rather than detect such problems at runtime.

BTW: dh_python2 from experimental, when invoked with verbose option
(DH_VERBOSE=1 or --verbose/-v) will print this message:

| possible solutions are: building for all supported Python versions
| (`pyversions -vr`); adjusting X-Python-Version field; passing
| --no-guessing-versions to dh_python2

please propose a better one if it's not clear
-- 
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl  www.griffith.cc   www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110311091532.gi30...@piotro.eu



Re: E: dh_python2:146: you most probably have to build extension for python2.5.

2011-03-11 Thread Stefano Rivera
Hi Piotr (2011.03.11_11:15:33_+0200)
> BTW: dh_python2 from experimental, when invoked with verbose option
> (DH_VERBOSE=1 or --verbose/-v) will print this message:
> 
> | possible solutions are: building for all supported Python versions
> | (`pyversions -vr`); adjusting X-Python-Version field; passing
> | --no-guessing-versions to dh_python2

I'm not convinced about requiring a verbosity flag for that, why not
just print the longer error message by default?

Would anyone else rebuild with DH_VERBOSE if they didn't understand an
error message? I probably wouldn't. I build with DH_VERBOSE when I want
to see what arguments are being passed around, that's about it.

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  H: +27 21 465 6908 C: +27 72 419 8559  UCT: x3127


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110311124407.gs24...@bach.rivera.co.za



Re: E: dh_python2:146: you most probably have to build extension for python2.5.

2011-03-11 Thread Jakub Wilk

* Piotr Ożarowski , 2011-03-11, 10:15:

But I now get a warning and an error (complete log attached):
[...]
  dh_python2
W: dh_python2:94: Python 2.6 should install files in
/usr/lib/python2.6/dist-packages/. Did you forget
"--install-layout=deb"?
E: dh_python2:146: you most probably have to build extension for python2.5.
make: *** [binary] Error 12


if you install public modules for one Python version only, but
X-Python-Version suggests this module supports at least one more
currently supported Python version, dh_python2 tries to use installed
files for other Python versions. If it's not possible, f.e. because
all installed modules contain extensions (which cannot be shared and I
don't know if given extension is optional or not), dh_python2 will fail
with this error message.


The trouble with this error message is that it tells you how to fix the 
problem, but it doesn't explain what the actual problem _is_. As such, 
it is not very helpful.



I consider this an improvement over dh_pycentral/dh_pysupport because I
think it's better to FTBFS rather than detect such problems at runtime.


Agreed. Wow, that'd the first nice feature of dh_python2. :P

Shouldn't "python-$anything to dh_python2"[0][1] guides mention this 
behavioral difference? IIRC there are loads of packages in the archive 
that build extensions only for a single Python version.


[0] http://wiki.debian.org/Python/PythonSupportToDHPython2
[1] http://wiki.debian.org/Python/PyCentral2DhPython2

--
Jakub Wilk


--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110311162846.ga9...@jwilk.net