CMake or SCons as build tool

327 views
Skip to first unread message

Saša Janiška

unread,
Jan 8, 2016, 2:45:12 AM1/8/16
to cython...@googlegroups.com
Hello!


I'm looking for a adequate build tool for a Py3+PyQt5.x application
which will use Cython for providing bindings to 3rd party C library.

In the Cython book which I plan to order soon, I see that both CMake and
SCons are mentioned, but would like to hear some experiences from Cython
users here?

I'm on Debian (Sid), but would like to provide app for Windows and Mac
OS.


Sincerely,
Gour

--
In the material world, one who is unaffected by whatever good
or evil he may obtain, neither praising it nor despising it,
is firmly fixed in perfect knowledge.




Jeroen Demeyer

unread,
Jan 8, 2016, 3:29:42 AM1/8/16
to cython...@googlegroups.com
On 2016-01-08 08:42, Saša Janiška wrote:
> Hello!
>
>
> I'm looking for a adequate build tool for a Py3+PyQt5.x application
> which will use Cython for providing bindings to 3rd party C library.
>
> In the Cython book which I plan to order soon, I see that both CMake and
> SCons are mentioned, but would like to hear some experiences from Cython
> users here?

Obvious question: given that it's Python, why not use distutils/setuptools?

Saša Janiška

unread,
Jan 8, 2016, 3:49:03 AM1/8/16
to cython...@googlegroups.com
On Pet, 2016-01-08 at 09:29 +0100, Jeroen Demeyer wrote:

> Obvious question: given that it's Python, why not use
> distutils/setuptools?

Well, I plan do other things like building documentation (HTML,PDF) etc.
and not sure whether such tasks are in scope of distutils?


Sincerely,
Gour

--
He who is satisfied with gain which comes of its own accord, who
is free from duality and does not envy, who is steady in both
success and failure, is never entangled, although performing actions.




Robert Bradshaw

unread,
Jan 8, 2016, 6:36:39 PM1/8/16
to cython...@googlegroups.com
Distutils/setuptools is the only well-supported way to build Cython
code. You could call distutils from SCons or vice-versa if you want to
fit this in as part of a larger build project.
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "cython-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Saša Janiška

unread,
Jan 9, 2016, 2:41:59 AM1/9/16
to cython...@googlegroups.com
On Pet, 2016-01-08 at 15:36 -0800, Robert Bradshaw wrote:

> Distutils/setuptools is the only well-supported way to build Cython
> code.

OK. That's expected and natural, but I was hoping to get some feedback
from the users who have need for more complex builds.

> You could call distutils from SCons or vice-versa if you want to
> fit this in as part of a larger build project.

The Cython book is on the way, so I'll see what the author says in
regard.


Sincerely
Gour

-- 
Whenever and wherever there is a decline in religious practice,
O descendant of Bharata, and a predominant rise of irreligion —
at that time I descend Myself.




Jeroen Demeyer

unread,
Jan 9, 2016, 3:54:27 AM1/9/16
to cython...@googlegroups.com
On 2016-01-09 08:41, Saša Janiška wrote:
> OK. That's expected and natural, but I was hoping to get some feedback
> from the users who have need for more complex builds.

A lot has been written on choices of build system and it's a very
"religious" topic: many people have an opinion and they all think that
their opinion is the only correct one.

Probably, any build system can be used for your purpose, it is really a
matter of personal preference. It also depends on what you want to do:
for example, to build shared libraries, I would strongly recommend
autotools. If you just need to build a Python application and its
documentation, I would still go for distutils/setuptools and run the
docbuilder from the setup.py file.


Jeroen.

Saša Janiška

unread,
Jan 9, 2016, 5:22:59 AM1/9/16
to cython...@googlegroups.com
On Sub, 2016-01-09 at 09:54 +0100, Jeroen Demeyer wrote:

> for example, to build shared libraries, I would strongly recommend 
> autotools.

Hmm...I'm not really convinced that autotools are suitable for non-Linux
OS-es.

> If you just need to build a Python application and its 
> documentation, I would still go for distutils/setuptools and run the 
> docbuilder from the setup.py file.

I'll explore that route since it is simpler...


Sincerely,
Gour

--
One who sees inaction in action, and action in inaction, 
is intelligent among men, and he is in the transcendental position,
although engaged in all sorts of activities.




Jeroen Demeyer

unread,
Jan 9, 2016, 6:46:44 AM1/9/16
to cython...@googlegroups.com
On 2016-01-09 11:22, Saša Janiška wrote:
> Hmm...I'm not really convinced that autotools are suitable for non-Linux
> OS-es.

Autotools does require some POSIX-like environment, so it won't work on
Windows natively (but it does work in Cygwin or similar). But apart from
that, it works essentially everywhere.

Note that I didn't claim that autotools is the right solution for what
you want to do. I just felt that I should mention it because you talked
about SCons and CMake but not autotools.


Jeroen.
Reply all
Reply to author
Forward
0 new messages