heroku/base-images

python3-dev and libperl-dev on -build images?

Closed this issue · 6 comments

i8-pi commented

Hi, I would like to request the addition of python3-dev and libperl-dev to the build images. The python3 and perl packages are already in the runtime images so this would only affect the build images. Thanks

Happy to make a pull request if this makes it easier for you

tt commented

Python is available mostly as a dependency to scripts and tools.

If you want to link something against Python during the build process, you should likely use the Python buildpack. That said, I would like to learn more about your use case to know if this is a reasonable suggestion.

Yup, could you please explain the use case?

Generally, if your application relies on Python or Perl, those should be installed using a buildpack, and then the corresponding headers will usually be available.

i8-pi commented

This is probably not a use case you would be likely to support, but I'm trying to compile vim and create a tarball that I can drop into the runtime image and run. Sometimes, you just need to debug stuff on a live environment.

The python and perl headers are to make sure all the vim plugins are supported. I can download them myself, but bundling them would save me a step

The problem with including those packages is also that you won't be able to specify their version. We would be using the version provided by Ubuntu, doing security upgrades if necessary. But that wouldn't be the latest version.

The best way to achieve this is probably to install the package in your own vim buildpack. You can then have the versions you want and upgrade as you need.

i8-pi commented

Yes, but if I don't use the version in the runtime image and bundle my own, I'm going to be responsible for upgrading those packages myself. Not to mention the extra linker config I'll need to put in. I'm too lazy for that

Using a buildpack also means I have to plan ahead include it in whichever project may need it, whereas having a tarball lets me unzip and run on any project. I also don't want vim in my live environment unless I'm debugging

I probably should have mentioned this earlier, but this is what inspired me to do this https://gist.github.com/sfate/2889158

In any case, this is not a huge inconvenience and I'm happy to work with what is currently available. Thanks for looking into this

tt commented

@i8-pi, if you only need the packages (in the build image) temporarily to produce your own binaries for the runtime image, I suggest you use Docker locally to build it. Then you can easily install the headers so they're available for compilation and then the binaries should run perfectly on the platform.