cloudfoundry / php-buildpack

A Cloud Foundry Buildpack for PHP.
Apache License 2.0
142 stars 347 forks source link

Failed to compile a droplet with compile.py if specifying PHP Buildpack as a final buildpack of multiple buildpacks with Python buildpack #323

Closed AkihiroKitada closed 5 years ago

AkihiroKitada commented 5 years ago

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version?

What version of the buildpack you are using?

If you were attempting to accomplish a task, what was it you were attempting to do?

What did you expect to happen?

What was the actual behavior?

Please confirm where necessary:

cf-gitbot commented 5 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/168944799

The labels on this github issue will be updated when the story is started.

dmikusa commented 5 years ago

What you're saying makes sense. The use of the Python buildpack first is installing Python3. That's what's on the path. That then impacts the PHP buildpack which uses Python2. The script breaks because it's not Python3 compatible.

I think with a little work we could probably make it Python3 compatible, but we'd have to test with Python2 and 3 which complicates things a lot.

For what it's worth, the PHP Cloud Native Buildpacks are written in Golang so this issue will go away (no pun intended).

AkihiroKitada commented 5 years ago

Hi @dmikusa-pivotal

Thank you for your comment. The ideal resolution should be provided via CNB in the future, yes, I agree with you. However, in the reality, Python 2 won't be maintained no later than January, 2020. Until then, this issue should be addressed for multi-buildpack users in CNB, ideally. Otherwise, this issue should be fixed in the existing release of buildpacks.

dfreilich commented 5 years ago

@AkihiroKitada we'll keep it in mind! I don't think that the work is going to happen immediately (even if Python 2 isn't actively maintained after January 2020, people aren't going to migrate immediately, and forcing people to would cause more issues than it would solve), particularly since our priorities are now focused on CNBs. I'll close it for now, though if you want to PR an update that is compatible for both python 2 and 3, we'd be happy to see that.

Thanks for the help!