python icon indicating copy to clipboard operation
python copied to clipboard

Add support for Python apps with Javascript assets

Open robdimsdale opened this issue 3 years ago • 5 comments

We had a conversation in slack where a user was trying to build a python app that also had Javascript assets.

There is no built-in order group to support this, and even with custom order groups (i.e. pack build --buildpack=...) it still requires the buildplan buildpack to satisfy the various provides/requires.

This is a use-case that we should support - similar to how the Ruby buildpack allows for Javascript assets.

robdimsdale avatar May 25 '22 18:05 robdimsdale

Hmm. I did the following and it appears to build successfully:

pack build excalidraw \
  --builder paketobuildpacks/builder-jammy-base:latest \
  --env BP_WEB_SERVER=nginx \
  --env BP_WEB_SERVER_ROOT=build

@voor Is there something I'm missing that would cause this to fail?

ryanmoran avatar Dec 05 '22 18:12 ryanmoran

@voor maybe I'm missing something, but the app you linked to doesn't seem to have any python code - it seems mostly typescript/JS with a bit of HTML.

Do you have a link to a different Python app that wraps this app? If not, maybe we could move this issue to the https://github.com/paketo-buildpacks/web-servers repo?

robdimsdale avatar Dec 05 '22 20:12 robdimsdale

I think moving the issue makes sense. My understanding was that this was a JavaScript web app that had a dependency that required Python to build.

ryanmoran avatar Dec 05 '22 21:12 ryanmoran

(Referring to deleted comments) Yes, it was because SASS was being built with Python involved, turns out that is not the case, apologies for adding confusion to this issue. Deleted those comments, and will mention that Python apps needing JavaScript dependencies is something fairly common.

voor avatar Dec 05 '22 21:12 voor

@voor no problem - thanks for clarifying 😄

This issue is probably best to stay where it is as a placeholder for Python apps with Javascript. I would suggest you open an issue at https://github.com/paketo-buildpacks/web-servers/issues (or https://github.com/paketo-buildpacks/nodejs) but given you've deleted your comments I'm going to assume you've got things working.

robdimsdale avatar Dec 06 '22 01:12 robdimsdale