Missing header files for Python

43 views
Skip to first unread message

Michal Jemala

unread,
Jun 19, 2013, 2:00:43 PM6/19/13
to vcap...@cloudfoundry.org
Hi Team,

I tried to port existing Heroku buildpack for Go and hit a wall. The actual stack (Ubuntu v10.04), is missing Python (v2.6.5) header files necessary to build some native bindings for Mercurial and Bazaar. The header files comes with the python-dev package. Is there any way to add this into the stack? It could be useful for people wanting to create a custom buildpack for Python as well.

NOTE: For both, Mercurial and Bazaar as well, there is a workaround in enabling pure Python installation (without building the native extensions), but as this is not quite recommended approach, I was curious if there is at least a slightest chance of modifying the stack;-)

Thanks,
Michal

Dan Higham

unread,
Jun 19, 2013, 3:01:38 PM6/19/13
to vcap...@cloudfoundry.org
As an interim measure you could just have the buildpack download the files from the python-dev package and install them manually.

Mary Shaldibina

unread,
Jun 19, 2013, 4:33:52 PM6/19/13
to vcap...@cloudfoundry.org, vcap...@cloudfoundry.org
Hi Michael,

We were able to use python buildpack at some point, we had added missing packages to rootfs, may be the buildpack was updated and now requires new version.. As a temporary solution you can bundle missing libraries with your app and extend library path to see them.

Maria

James Bayer

unread,
Jun 20, 2013, 4:41:05 AM6/20/13
to vcap...@cloudfoundry.org
Also, here is a go buildpack that has been verified to work on v2
--
Thank you,

James Bayer

Michal Jemala

unread,
Jun 20, 2013, 6:09:44 AM6/20/13
to vcap...@cloudfoundry.org
Hey James, the buildpack you have mentioned will definitely not work should you have some Mercurial and/or Bazaar dependencies in your Go app. It is basically a stripped down clone of the https://github.com/kr/heroku-buildpack-go.

James Bayer

unread,
Jun 20, 2013, 11:37:17 AM6/20/13
to vcap...@cloudfoundry.org
Oh, I see that now in your original posting on that. Maria's response is accurate. We hope to put up either an AMI or a native dependencies buildpack up soon for situations like this.

Whether or not add the right python-dev packages (and versions) to the warden root-fs will probably take more time to sort out how that process will work. We've had some ideas about supporting different "stacks", but for now having the buildpack pull in the native dependencies needed might be the smoothest path for you.

Michal Jemala

unread,
Jun 20, 2013, 12:11:58 PM6/20/13
to vcap...@cloudfoundry.org
Thank James, it sounds reasonable to me.

Anyway, I modified the https://github.com/michaljemala/cloudfoundry-buildpack-go to implement the mentioned workaround - building the Mercurial and Bazaar binaries without any C bindings - it works as expected. To give it a try just follow the sample posted on my Github.
Reply all
Reply to author
Forward
0 new messages