Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #7793 > unrolled thread

Installing python modules in a non-standard way

Started byOnur Aslan <onur@onur.im>
First post2015-10-25 09:40 +0100
Last post2015-10-25 16:30 +0100
Articles 6 — 4 participants

Back to article view | Back to linux.debian.maint.python


Contents

  Installing python modules in a non-standard way Onur Aslan <onur@onur.im> - 2015-10-25 09:40 +0100
    Re: Installing python modules in a non-standard way Ben Finney <ben+debian@benfinney.id.au> - 2015-10-25 09:50 +0100
    Re: Installing python modules in a non-standard way Andrey Rahmatullin <wrar@debian.org> - 2015-10-25 10:20 +0100
      Re: Installing python modules in a non-standard way Onur Aslan <onur@onur.im> - 2015-10-25 11:50 +0100
        Re: Installing python modules in a non-standard way Andrey Rahmatullin <wrar@debian.org> - 2015-10-25 12:50 +0100
          Re: Installing python modules in a non-standard way Dmitry Shachnev <mitya57@debian.org> - 2015-10-25 16:30 +0100

#7793 — Installing python modules in a non-standard way

FromOnur Aslan <onur@onur.im>
Date2015-10-25 09:40 +0100
SubjectInstalling python modules in a non-standard way
Message-ID<qnp0l-8fj-3@gated-at.bofh.it>
Hi. I asked this in IRC channel but didn't get a clear answer.

I have a library package written in C and it's also providing
python wrappers.

You can see the package in here:
https://anonscm.debian.org/cgit/collab-maint/gumbo-parser.git/

I can't use --buildsystem=pybuild to install python wrappers,
this package is not providing a configure script or Makefile. pybuild
is not invoking autoreconf to generate a configure script. I have
to build C library manually if I use pybuild buildsystem
for this package.

I've been using $(py3versions -rv debian/control) in
override_dh_auto_install to install python3 package. But since
python3-all became depended on python3.4 and python3.5,
py3versions started to return two python versions and my override
is no longer working.

I decided to use $(py3versions -d) but I am not sure this is good
idea. It's skipping X-Python3-Version defined in d/control.

Piotr suggested me to make a loop to install python3.4 and python3.5
versions of package. But is it really necessary?

I am wondering what is proper way to install python modules in this
package?

[toc] | [next] | [standalone]


#7794

FromBen Finney <ben+debian@benfinney.id.au>
Date2015-10-25 09:50 +0100
Message-ID<qnpa2-8lF-7@gated-at.bofh.it>
In reply to#7793
Onur Aslan <onur@onur.im> writes:

> I can't use --buildsystem=pybuild to install python wrappers, this
> package is not providing a configure script or Makefile. pybuild is
> not invoking autoreconf to generate a configure script.

Can you add a target to ‘debian/rules’ that will invoke ‘autoreconf’, as
a pre-requisite for the ‘override_dh_build’ target?

> Piotr suggested me to make a loop to install python3.4 and python3.5
> versions of package.

I don't use a loop, but rather a pattern-matching target and a Makefile
substitution variable to generate targets for all the supported Python
versions. It amounts to the same result, but is not “a loop”.

> But is it really necessary?

In the absence of Pybuild, yes I've found that explicitly making
separate targets for each supported Python version is necessary. This is
one of the main benefits of migrating to Pybuild.

> I am wondering what is proper way to install python modules in this
> package?

My suggestion: work hard to get the package to provide what Pybuild
needs, and let Pybuild do its job from there.

-- 
 \          “Our products just aren't engineered for security.” —Brian |
  `\             Valentine, senior vice-president of Microsoft Windows |
_o__)                                                development, 2002 |
Ben Finney

[toc] | [prev] | [next] | [standalone]


#7796

FromAndrey Rahmatullin <wrar@debian.org>
Date2015-10-25 10:20 +0100
Message-ID<qnpD4-t9-15@gated-at.bofh.it>
In reply to#7793

[Multipart message — attachments visible in raw view] — view raw

On Sun, Oct 25, 2015 at 10:37:13AM +0200, Onur Aslan wrote:
> I can't use --buildsystem=pybuild to install python wrappers,
> this package is not providing a configure script or Makefile. pybuild
> is not invoking autoreconf to generate a configure script. I have
> to build C library manually if I use pybuild buildsystem
> for this package.
Nothing is invoking autoreconf unless you use --with autoreconf. Are you
saying that with pybuild this option has no effect?

> Piotr suggested me to make a loop to install python3.4 and python3.5
> versions of package. But is it really necessary?
If you want to install modules for all supported versions then yes.

-- 
WBR, wRAR

[toc] | [prev] | [next] | [standalone]


#7800

FromOnur Aslan <onur@onur.im>
Date2015-10-25 11:50 +0100
Message-ID<qnr29-1Dl-13@gated-at.bofh.it>
In reply to#7796

[Multipart message — attachments visible in raw view] — view raw

On 2015-10-05,  Andrey Rahmatullin wrote:
> Nothing is invoking autoreconf unless you use --with autoreconf. Are you
> saying that with pybuild this option has no effect?

I am already using --with autoreconf but when I use:

    dh $@ --with autoreconf,python2,python3 --buildsystem=pybuild

It's running autoreconf to generate configure script and thats all.
It's not running ./configure or make to build library.

'dh_auto_configure -O--buildsystem=pybuild' is skipping ./configure
and only configuring python modules. I believe if I use
--buildsystem=pybuild I have to configure and build C library
manually. That is the reason I want to avoid pybuild in this package.

You can see full build log in attached file.

[toc] | [prev] | [next] | [standalone]


#7801

FromAndrey Rahmatullin <wrar@debian.org>
Date2015-10-25 12:50 +0100
Message-ID<qnrYd-2u7-5@gated-at.bofh.it>
In reply to#7800

[Multipart message — attachments visible in raw view] — view raw

On Sun, Oct 25, 2015 at 12:39:44PM +0200, Onur Aslan wrote:
> > Nothing is invoking autoreconf unless you use --with autoreconf. Are you
> > saying that with pybuild this option has no effect?
> 
> I am already using --with autoreconf but when I use:
> 
>     dh $@ --with autoreconf,python2,python3 --buildsystem=pybuild
> 
> It's running autoreconf to generate configure script and thats all.
> It's not running ./configure or make to build library.
Indeed.
In this case I'd use the usual autotools buildsystem and do everything
else manually, without using pybuild. But maybe there are better options.

-- 
WBR, wRAR

[toc] | [prev] | [next] | [standalone]


#7802

FromDmitry Shachnev <mitya57@debian.org>
Date2015-10-25 16:30 +0100
Message-ID<qnvp8-4EN-11@gated-at.bofh.it>
In reply to#7801
On Sun, Oct 25, 2015 at 04:45:17PM +0500, Andrey Rahmatullin wrote:
> Indeed.
> In this case I'd use the usual autotools buildsystem and do everything
> else manually, without using pybuild. But maybe there are better options.

Or maybe try to use both build systems, something like this:

  override_dh_auto_build:
          dh_auto_build
          dh_auto_build -O--buildsystem=pybuild

(and the same for install/clean/etc).

--
Dmitry Shachnev

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web