[Scons-users] Scons on pypy

Daniel Holth dholth at gmail.com
Sun Jun 5 14:00:16 EDT 2016


I am the guy who invented wheel (*.whl) for Python packaging, and I am
interested in advancing Python packaging generally. I feel that a
setuptools monoculture holds us back generally, it hails from the late 90's
(distutils) and very few people understand how to extend it. SCons seems
like a nice way to experiment with a more flexible build system that is
written in Python and easily installed from pypi.

Soon, pip will be able to install dependencies *before* it touches
setup.py. See
https://github.com/brettcannon/build-deps-pep/blob/master/pep-0NNN.rst. Pip
is also working on defining an interface (consisting of a few setup.py
commands) that it promises to use when invoking setup.py. That makes it
much easier to bring abstractions to setup.py and re-implement just the
parts that pip needs. So for any project that runs against the limitations
of distutils there should and can be other options.

As it happens I also have a concrete project that does benefit from SCons.
The pysdl2-cffi binding to SDL2 is not particularly exceptional, but it
needs to automatically generate some *.py code to help wrap the SDL2
library before "setup.py bdist_wheel" can be called. It does this by
parsing SDL2's headers with a little compiler that generates a friendlier
wrapper compared to using cffi raw. It also calls cffi to generate *.c and
compiles that as an extension module (here, it is especially helpful to be
running under the target Python, to ask distutils for compiler options).
SCons is great at this because there are several build steps that depend on
each other's outputs. It would be difficult to do that efficiently with
distutils or setuptools.

The other aspect I'm interested in is to implement bdist_wheel in SCons. It
should be much easier to prototype new features without having to deal with
distutils' and setuptools' baggage.

Thanks,

Daniel Holth

On Sun, Jun 5, 2016 at 12:11 PM Dirk Bächle <tshortik at gmx.de> wrote:

> Hi Daniel,
>
> On 05.06.2016 14:55, Daniel Holth wrote:
> > Simply I want to try using scons to implement setup.py. To do this I
> need to have scons run on whatever versions of Python the
> > package is compatible with, obviously. Then I need to write a task to
> generate a couple of packaging metadata and archive formats.
> >
>
> are we really talking about the setup.py from the setuptools? Do you
> really want to re-implement it, but using SCons?
> Please feel free to do so, I'm just wondering what the benefit of this
> would be. I mean, for installing SCons on my system I'd need
> to have the setuptools anyway...so what does your solution bring that
> setuptools doesn't have? Just curious...
>
> Best regards,
>
> Dirk
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160605/e6fe01fb/attachment-0001.html>


More information about the Scons-users mailing list