Re: Pynac in debian

9 views
Skip to first unread message

Burcin Erocal

unread,
Jun 24, 2012, 9:26:30 AM6/24/12
to Julien Puydt, pynac...@googlegroups.com
Hi Julien,

On Thu, 21 Jun 2012 18:43:20 +0200
Julien Puydt <julien...@laposte.net> wrote:

> -------- Message original --------
> Sujet: Pynac in debian
> Date : Thu, 21 Jun 2012 18:41:36 +0200
> De : Julien Puydt <julien...@laposte.net>
> Pour : pynac...@googlegroups.com
>
> Hi,
>
> I plan to package pynac for debian ; I have a personal draft package,

Pynac depends heavily on Sage. Some code that really belongs to Pynac
is actually in the Sage library. It is impossible to use Pynac without
that part. Are you planning to package Sage as well?

> but there are two problems already :
>
> (1) the homepage is down, so the upstream official tarball isn't
> available (debian is *very* picky about it) [I based my package on the
> tree I took in sage-5.1.beta5's pynac spkg (sic)] ;

I'll see what I can do about this.

> (2) more annoying, the way python is detected by the configure script
> is ugly, and makes pynac link against unneeded libs ; after asking on
> #debian-python, I was pointed to :
>
> http://www.gnu.org/software/autoconf-archive/ax_python_devel.html#ax_python_devel
>
> I then made the following changes :
> - put the above macro in m4/ and use AX_PYTHON_DEVEL in configure.ac ;
> - remove the other python macros in m4/ and remove their use in
> configure.ac ;
> - change $(PYTHON_LIBS) to $(PYTHON_LDFLAGS) in ginac/Makefile.am ;
> - remove the INCLUDES line in ginac/Makefile.am (what did -fPIC do
> there anyway?) ;
> - add a "libpynac_la_CPPFLAGS = $(PYTHON_CPPFLAGS)" line to
> ginac/Makefile.am
> - run autoreconf so the rest of the files get updated.


I tried these. Here's my approximation:

https://bitbucket.org/burcin/pynac-wip/src/d33822b5a822

After removing INCLUDES, it wasn't enough to add libpynac_la_CPPFLAGS.
I got errors about missing Python.h when compiling .cpp files. So I
added a line CPPFLAGS = $(PYTHON_CPPFLAGS) instead of
libpynac_la_CPPFLAGS.

Note that I am a complete auto* newbie. If you're OK with this change,
I will commit it to the main repository.


Thanks for your help.

Burcin

Burcin Erocal

unread,
Jun 24, 2012, 1:30:07 PM6/24/12
to Julien Puydt, pynac...@googlegroups.com
On Sun, 24 Jun 2012 17:12:55 +0200
Julien Puydt <julien...@laposte.net> wrote:

> Le 24/06/2012 15:26, Burcin Erocal a écrit :
> > Hi Julien,
> >
> > On Thu, 21 Jun 2012 18:43:20 +0200
> > Julien Puydt<julien...@laposte.net> wrote:
> >
> >> -------- Message original --------
> >> Sujet: Pynac in debian
> >> Date : Thu, 21 Jun 2012 18:41:36 +0200
> >> De : Julien Puydt<julien...@laposte.net>
> >> Pour : pynac...@googlegroups.com
<snip>
> >> (2) more annoying, the way python is detected by the configure
> >> script is ugly, and makes pynac link against unneeded libs ; after
> >> asking on #debian-python, I was pointed to :
> >>
> >> http://www.gnu.org/software/autoconf-archive/ax_python_devel.html#ax_python_devel
> >>
> >> I then made the following changes :
> >> - put the above macro in m4/ and use AX_PYTHON_DEVEL in
> >> configure.ac ;
> >> - remove the other python macros in m4/ and remove their use in
> >> configure.ac ;
> >> - change $(PYTHON_LIBS) to $(PYTHON_LDFLAGS) in ginac/Makefile.am ;
> >> - remove the INCLUDES line in ginac/Makefile.am (what did -fPIC do
> >> there anyway?) ;
> >> - add a "libpynac_la_CPPFLAGS = $(PYTHON_CPPFLAGS)" line to
> >> ginac/Makefile.am
> >> - run autoreconf so the rest of the files get updated.
> >
> >
> > I tried these. Here's my approximation:
> >
> > https://bitbucket.org/burcin/pynac-wip/src/d33822b5a822
> >
> > After removing INCLUDES, it wasn't enough to add
> > libpynac_la_CPPFLAGS. I got errors about missing Python.h when
> > compiling .cpp files. So I added a line CPPFLAGS =
> > $(PYTHON_CPPFLAGS) instead of libpynac_la_CPPFLAGS.
>
> Since all sources in ginac/ are for libpynac, I can't see a file
> which would be compiled without the content of
> libpynac_la_CPPFLAGS... Can I have a look at your compilation lines +
> ginac/Makefile + error message without the CPPFLAGS?
>
> In fact, I just cloned your repository, renamed CPPFLAGS to
> libpynac_la_CPPFLAGS in ginac/Makefile then:
> autoreconf -is
> mkdir build
> cd build
> ../configure
> make
> And got a perfect compilation...

Hmm.. it worked for me too. I don't know what I messed up last time.

The work-in-progress repo contains the libpynac_la_CPPFLAGS line. I
will push this to the main repo if there are no compaints.


Thanks.

Cheers,
Burcin
Reply all
Reply to author
Forward
0 new messages