Skip to content

Switch to a Python/YAML based build system for wheels#27

Merged
bgruening merged 16 commits intogalaxyproject:masterfrom
natefoo:wheel-yml-build
Sep 7, 2015
Merged

Switch to a Python/YAML based build system for wheels#27
bgruening merged 16 commits intogalaxyproject:masterfrom
natefoo:wheel-yml-build

Conversation

@natefoo
Copy link
Member

@natefoo natefoo commented Jul 16, 2015

Many things accomplished in this PR:

  1. I switched to using "official" Docker Hub images wherever possible, so that we don't have to maintain them (plus they're smaller, not sure what the magic is because generating that initial OS tarball is a dark art). Previously I was thinking it'd be better to have all the base images built in exactly the same way (and building a few base images is necessary for 32-bit support) but I don't think that's so important.
  2. Debian 8+ and Ubuntu 14.04+ use the native multiarch support to avoid having to create base 32-bit images for these.
  3. Added openSUSE 13, Fedora 21, and 22.
  4. There are now two classes of images on which to build. The first is generic (default) which will build on Debian 6 (squeeze). The idea is that these wheels should be compatible with any other reasonable platform (sorry RHEL/CentOS 5). The second class is full, which will build on every reasonable platform I could get a docker image for. This is currently used by psycopg2 and may be used for a few others where linking to the system versions of libraries (e.g. libpq.so) would be preferred over a potentially outdated/buggy/insecure version statically linked into the wheel. As of now I am not planning to provide a "generic" version of psycopg2
  5. Whatever images are tagged as natefoo/base-wheel and natefoo/base32-wheel will be used to build generic images.

CentOS 7 does not have a 32-bit image because it is not present in RHEL/CentOS 7. I kept 32-bit support for current versions of Debian and Ubuntu just because I figure them (or derivatives) the most likely for being installed on laptops, which is probably the only likely case where you'll find 32-bit Linux anymore. Nothing else has 32-bit support other than the generic wheels.

Use setarch/linux32 to fool Python into thinking the system is 32 bit
(rather than modifying the source).

Improvements to the YAML-based wheel build system to (hopefully) allow
building on RHEL-based distros.
1. Base OS images (32- and 64-bit) for Debian 6-9, Ubuntu 12.04 and
   14.04, and CentOS 6 and 7 (RHEL 7 is 64-bit only).
2. Wheel build images (Python 2.6 and 2.7, UCS2 and UCS4) on all those
   base OS images. Wheel build images include the evolving modification
   to the Python wheel package that I'm working on.

What this will now do:

- Build "generic" wheels that'll run on platforms at least as old as
  Debian Squeeze (so everything listed above).
- Build "targeted" wheels of things with complex/important system
  dependencies. The case for this is psycopg2, which will use the system
  libpq and have SSL support, neither of which we would then be
  responsible for keeping up to date.
@natefoo
Copy link
Member Author

natefoo commented Aug 21, 2015

The discussion on Distutils-SIG continues so this may need to change later, but this should hopefully be enough to get us out the door for now. I'd like to add openSUSE images (which I assume would build wheels compatible with SLES) since SLES is a moderately popular distro in Europe.

I'll try to get the images uploaded to docker hub at some point, but I want to take a moment to figure out why the wheel images seem to be so big (natefoo/centos-7 is only 650 MB whereas natefoo/centos7-wheel is 1.6GB).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems a bit off to me, but I don't have a better solution. I tried to write a response using makefile variables (e.g. make -f Makefile.template DIST=debian BITS=64 ...) but that wasn't any better than this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny, this is a replacement of what I'd originally wrote, which used Makefile variables...

I was originally trying to have make generate the Makefiles, but that proved to be pretty difficult to get make to cooperate with. But I am no make expert.

they've been built, don't continue if they fail to build.
build.py) so that it can use the improved platform detection.
1. Standardize tagging scheme to mirror the official images.
2. Switch to the "official" base images for the OSes. Originally I
   wanted to have 32- and 64- bit base images be as close to identical
   as possible, but I think that's kind of pointless, and using official
   images is nice for both myself and anyone else who's going to build
   wheels.
2. Use Debian multiarch support to avoid having to build 32-bit base
   images on Debian >= 8, Ubuntu >= 14.04.
install openssl-devel for reasons that I don't really want to figure out
because honestly who is using Fedora 20? Nobody, that's who.
@natefoo natefoo changed the title [WIP] Switch to a Python/YAML based build system for wheels Switch to a Python/YAML based build system for wheels Aug 26, 2015
@natefoo
Copy link
Member Author

natefoo commented Aug 26, 2015

Now with 100% less WIP tag!

@hexylena
Copy link
Member

LGTM/+1, but untested. Glad to see wheels are finally happening!

@natefoo
Copy link
Member Author

natefoo commented Aug 26, 2015

@erasche The images are currently uploading to Docker Hub in case you actually wanted to test the wheel building. If you wanted to test the image building, glwt. If you didn't want to test anything I'll just click the 'ole merge button there after I've done a few more wheel builds of my own.

@hexylena
Copy link
Member

@natefoo go for it

@bgruening
Copy link
Member

Awesome! Great work @natefoo and @erasche!

bgruening added a commit that referenced this pull request Sep 7, 2015
Switch to a Python/YAML based build system for wheels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants