Help with my Debian package for Orange

2011-06-29 Thread Mitar
Hi!

I have made a Debian package for Orange:

http://orange.biolab.si/

The idea is that we have a daily snapshot packaged as Debian package.

You can get it here (also source package):

http://orange.biolab.si/debian/

As it is mine first Debian package I would be glad to hear your comments.

I would also have a question, this Python module is also using
compiled C code, how can I make this compiled modules be available to
all Python versions installed on the user's system? Currently, it is
compiled only for 2.6 and so this module can be used only in that
Python version on the system.

Also, how could be those packages be included among official Debian
packages, probably once we release 2.5 version.


Mitar


-- 
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/BANLkTikJ5ni6+Js5cPMAP6XKMv2e=kq...@mail.gmail.com



Re: Help with my Debian package for Orange

2011-06-30 Thread Mitar
Hi!

On Thu, Jun 30, 2011 at 1:10 AM, Yaroslav Halchenko
 wrote:
> is it "lintian-free" (i.e. if you run lintian -- are there warnings/errors)?

No, but this is also something I will need help with. ;-)

> are they build against up-to-date sid?

No, against squeeze.

> as for multiple versions -- what is the Orange's build system?

Something home-brew. ;-) Mostly a makefile which compiles .so files
which are then injected among .py files and this is packaged together.

> btw -- we should list it among
> http://blends.alioth.debian.org/science/tasks/machine-learning

Sure. ;-)

> care to join the project or commit the entry for the tasks page?

I can join the project and commit the entry. Just tell me how. ;-)


Mitar


-- 
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/BANLkTi=pLwayt6TYFAKwsP5c3N3j=mGf=a...@mail.gmail.com



Re: Help with my Debian package for Orange

2011-06-30 Thread Mitar
Hi!

On Thu, Jun 30, 2011 at 10:08 AM, Mitar  wrote:
> No, but this is also something I will need help with. ;-)

And mostly I think that I have over-complicated rules file. ;-)


Mitar


-- 
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/banlktikoyhdxdv_7151shpnpun0rnvw...@mail.gmail.com



Re: Help with my Debian package for Orange

2011-06-30 Thread Mitar
Hi!

On Thu, Jun 30, 2011 at 11:01 AM, Andreas Tille  wrote:
> Have a look into rules files that are using dh and override_dh_*.  You
> might also like to use the debian/install file (see man dh_install).

I have been reading all this but I must say it does not help a
beginner in any way. I think some best-practices examples would be
most useful. To just copy/paste and adapt. Saying "look into rules
files" also does not help me much, which one? Which one is similar to
my package? I do not know that. Probably maintainers of many packages
know which one from the past is similar to the new one and can reuse
that, but for me this is hard to know.

So some more direct instructions would be better. I do not mind
reading, but I do not have any feeling what all those magical dh_*
commands do. ;-)


Mitar


--
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/BANLkTimscD_QirPTZP=vuyyzvndhrc8...@mail.gmail.com



Re: Help with my Debian package for Orange

2011-06-30 Thread Mitar
Hi!

On Thu, Jun 30, 2011 at 11:02 AM, Piotr Ożarowski  wrote:
>  - remove "-svn" from source/binary package names and move it to version
>   string, f.e. like this: 0.0.10870~svn-2 (if 0.0.10870 is not released
>   yet) or 0.0.10870+svn-2 (if 0.0.10870 is already out)

Done.

>   orange source&binary package is already available in Debian, so you
>   will have to choose another name, though

Done. I chose python-orange and orange-canvas.

>  - s/Description: D/Description: d/

Done.

> * in debian/changelog, replace "unstable" with UNRELEASED or your own
>  suit name, use unstable only for uploads to official Debian archive

Done.

> * *.install files: s/site-packages/*-packages/

Done.

> * debian/rules:
>  - is orange.pth really needed?

Yes, because orange directory is not a module, but just contains many
other files, among them orange.so which you want to import with
"import orange".

>  - bash is not really needed to run /usr/bin/orange, please use /bin/sh

Done.

>  - replace:
>   dh_python2 -p$@ /usr/lib/python$(DEFAULT_PYTHON)/site-packages/orange/
>   with:
>   dh_python2 -p$@

Package is not compiled without it. But I have changed path to dist-packages.

>  - extension is not build for all supported Python versions

This was my initial problem why I have turned to this mailing list.
And also lintian complains about me changins ld.so.conf. (What is
required because orange.so loads some other libraries from the same
dir and I do not want to use rpath.)

How can I fix this two problems?

I will not yet use "dh" as it looks too magical for me for now. I
would like to understand what is happening. And first have a working
package. Then I can play with cleaning it up. Or would it be easier to
just let dh do everything? I doubt it can be magical enough.


Mitar


--
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/BANLkTinVoGjeS7w-bN-_Sh=mtxh0hrk...@mail.gmail.com



Re: Help with my Debian package for Orange

2011-07-01 Thread Mitar
Hi!

On Fri, Jul 1, 2011 at 3:27 PM, Christian Kastner  wrote:
> I don't know how current this is, but there might be some helpful stuff
> in there. Either way, if you indeed will start to provide packaging
> upstream, then the above repo should probably be removed to avoide
> confusion.

Yes. This is quite old. ;-)

For at least some time I will be able to provide packaging.

I think once we get rules script in order, then there will not be much
work to do, just updating dependencies and so on.

I still have those two problems: how to compile for multiple
architectures and how to configure ld path (or use rpath?).


Mitar


-- 
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/banlktikm5-j-2rvgjgz+uduca05_-jo...@mail.gmail.com



Package for multiple Python versions

2011-07-22 Thread Mitar
Hi!

I now saw that my Orange package is build just for Python 2.6.

http://orange.biolab.si/debian/dists/squeeze/main/source/

How can I make it be build also for 2.7?


Mitar


-- 
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/CAKLmikMD+7qqFPoODEtBg5Q36eV5n00OorWnjKvuuQE=jnw...@mail.gmail.com



Re: Package for multiple Python versions

2011-09-10 Thread Mitar
Hi!

On Fri, Jul 22, 2011 at 11:43 PM, Christian Kastner  wrote:
> debian/rules
> 
> build:
>        # Get the supported Python versions
>        PYVERS = $(shell pyversions -r -v)
>
>        set -e -x;\
>        for py in $(PYVERS); do \
>                PYTHON=python$$py make -C source;
>        done
>
> source/*/Makefile:
> =
> Substitute python with $(PYTHON) where appropriate

Thanks! I have done this now and it creates packages with multiple versions.

What I have done is installed Python 2.7 from wheezy so that package
would be build for Python in stable (2.6) and for 2.7 (unstable,
Ubuntu).

But now I get strange dependencies which prevent installation on stable:

The following packages have unmet dependencies:
 python-orange : Depends: libpython2.7 (>= 2.7) but it is not installable
 Depends: python (>= 2.6.6-7~) but 2.6.6-3+squeeze6 is
to be installed

Where did it got  2.6.6-7~ version for Python? Is there a way to force
it to 2.6 (so not precise dependency)?

And why it depends on both libpython2.6 and libpython2.7. It should
depend on the one for which you have Python installed.

Packages are here:

http://orange.biolab.si/debian/

(I have not yet fixed all other suggestions you have send me.)

Thanks for all the help.


Mitar


--
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/caklmiknu7km_3vvlqtfnnu9ak8po+gfmthspuh7td-12t-h...@mail.gmail.com



Re: Package for multiple Python versions

2011-09-10 Thread Mitar
Hi!

On Sat, Sep 10, 2011 at 10:59 PM, Christian Kastner  wrote:
> The reason for this is that your build environment affects the resulting
> binary package in various ways, one of them being the generated
> dependencies, which is why you are seeing strange things below.

Sure. But then I cannot have one package to cover them all? Like one
.deb file people could install everywhere and things would work? So
with dependencies on major versions.

I made some tests and it seems it should be enough to have Python 2.6
as lower bound, not necessary so precise as dh_python2 helper makes
it.

I now made an ugly hack to fix this. ;-) Before dh_gencontrol I run:

# We make dependencies less strict
perl -i -p -e 's/(, )?python \(>= ([^.\)]+\.[^.)]+)\.[^)]+\)/$1python
(>= $2)/g' $(CURDIR)/debian/$@.substvars

# Require at least one version of libpython, not all of them; we move
all of them to Recommends
perl -n -e 'if (/^shlibs:Depends=.*?(libpython[^,]+(?:,
libpython[^,]+)*)/) { print "shlibs:Recommends=$1\n" }'
$(CURDIR)/debian/$@.substvars >> $(CURDIR)/debian/$@.substvars
perl -i -p -e '1 while s/^(shlibs:Depends=.*?)(libpython[^,]+),
(libpython[^,]+)/$1$2 | $3/g' $(CURDIR)/debian/$@.substvars

> I wanted to give the build a brief look but your package FTBFS in
> unstable due to a missing OpenGL-related build dependency, could you check?

Strange. I am just working on that and it compiles OK on stable? What
exactly is missing?


Mitar


-- 
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/CAKLmikM4saVi_jzruSrpHyDggTZ4Dp=vw-_66wadjodc+bm...@mail.gmail.com



Re: Package for multiple Python versions

2011-09-10 Thread Mitar
Hi!

On Sat, Sep 10, 2011 at 11:18 PM, Mitar  wrote:
> Strange. I am just working on that and it compiles OK on stable? What
> exactly is missing?

I see. libqt4-opengl-dev is recommended by libqt4-dev and I have it
installed. Will fix this.


Mitar


-- 
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/CAKLmikNY7B9UAP3ZSVYLUugL=CGWt5t7mJe2FU6=-qv27mv...@mail.gmail.com



Re: Package for multiple Python versions

2011-09-10 Thread Mitar
Hi!

I also see that we link against libpython which should not be done,
according to Debian Python Policy 2.1. But this is what cmake's
FindPythonLibrary.cmake find. Is there some generic way to change
this?


Mitar


-- 
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/CAKLmikN5DU0L6=wqnhd1t99kah_nbonsl6wdglknx_utt6e...@mail.gmail.com



Re: Package for multiple Python versions

2011-09-10 Thread Mitar
Hi!

On Sun, Sep 11, 2011 at 1:56 AM, Jakub Wilk  wrote:
> There are other problems with cmake Python support:
> http://bugs.debian.org/580503

I solved this by passing CMAKE_USE_PYTHON_VERSION parameter to cmake:

PYTHON_VERSION = $(shell $(PYTHON) -c 'import sys; print "%s.%s" %
sys.version_info[:2]')

cmake -DPYTHON_EXECUTABLE=$(PYTHON)
-DCMAKE_USE_PYTHON_VERSION=$(PYTHON_VERSION) ...


Mitar


-- 
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/CAKLmikP13apUXj_QmzJH3Up6-Eg8FdbAO=rxv1bxpr04buq...@mail.gmail.com



Re: Package for multiple Python versions

2011-09-11 Thread Mitar
Hi!

On Sun, Sep 11, 2011 at 12:59 PM, Jakub Wilk  wrote:
> That could be simplified to:
> PYTHON_VERSION = $(shell pyversions -dv)

Not really. Because I want to compile package for different versions
of Python installed on the system I am passing PYTHON variable to make
in each loop. So I have to extract Python version from there and not
just assume default Python version. By assuming default Python version
you have not done much, just decided to use default and not the one
currently in PATH. But you still predefine something.

> CMAKE_USE_PYTHON_VERSION doesn't work with cmake that's currently in
> unstable.

We have our own module for that:

http://orange.biolab.si/trac/browser/trunk/source/orangeqt/modules/FindPythonLibrary.cmake

> If you are compiling extensions modules that's not enough, you need to set
> either:
> - PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR and PYTHON_LIBRARY,
> - or Python_ADDITIONAL_VERSIONS (this one requires cmake >= 2.8.4).

No, it is enough, everything else is done by the module. (Probably I
would even not need to pass PYTHON_EXECUTABLE directly, but I do
because I already have ti there, passed to make.)


Mitar


-- 
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/caklmikmqr1ctxhek8_tghpomoetr4ar3oyzvcb2rri5xhdp...@mail.gmail.com