JSII Superchain Python Failure -- ModuleNotFoundError: No module named 'packaging'
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 267
- Avg merge
- 1d 25m
- Merged PRs (30d)
- 14
Description
### Describe the bug
jsii/superchain:1-buster-slim-node16 docker image
This digest is giving the following error:
```
Using docker image sha256:bbcc9e8f92fe66b766342686a1643b5721aa77b9b998d408e23b8f7fe6b7bdb8 for jsii/superchain:1-buster-slim-node16 with digest jsii/superchain@sha256:8341d66eb6d84de536b5ae0ad3abbab03b83be33473960511b6ee28e825b175e
```
```
ModuleNotFoundError: No module named 'packaging'
[jsii-pacmak] [WARN] Failed building python
[jsii-pacmak] [VERBOSE] Cleaning /tmp/npm-packEDz9Tp
[jsii-pacmak] [WARN] python failed
[jsii-pacmak] [VERBOSE] Cleaning up
Error: Command (/tmp/npm-packEDz9Tp/.env-Uan8b2/bin/python -m twine check /builds//dist/python/*) failed with status 1:
#STDERR> Traceback (most recent call last):
#STDERR> File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
#STDERR> "__main__", mod_spec)
#STDERR> File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
#STDERR> exec(code, run_globals)
#STDERR> File "/tmp/npm-packEDz9Tp/.env-Uan8b2/lib/python3.7/site-packages/twine/__main__.py", line 22, in
#STDERR> from twine import cli
#STDERR> File "/tmp/npm-packEDz9Tp/.env-Uan8b2/lib/python3.7/site-packages/twine/cli.py", line 18, in
#STDERR> from packaging import requirements
#STDERR> ModuleNotFoundError: No module named 'packaging'
#STDERR>
#STDOUT>
at ChildProcess. (/builds//node_modules/jsii-pacmak/lib/util.js:178:27)
at Object.onceWrapper (node:events:642:26)
at ChildProcess.emit (node:events:527:28)
at maybeClose (node:internal/child_process:1092:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
```
This digest did not have the problem
```
Using docker image sha256:b6a954670864556cc2df02185549cfa32099aead95ab57122234138e9709f2b0 for jsii/superchain:1-buster-slim-node16 with digest jsii/superchain@sha256:706a7cd6b2d98c6790ccfb22d8b2f9c8ead63027368d840bf00301fdd1bd074b ...
```
Was something removed from the docker image?
### Expected Behavior
Python build to be successful and publish the package with Twine.
### Current Behavior
Error message described above
### Reproduction Steps
Use digests provided
### Possible Solution
Restore packaging module to image
### Additional Information/Context
_No response_
### SDK version used
1.53.0
### Environment details (OS name and version, etc.)
N/A Docker Image
Contributor guide
Research direction
Compare the two jsii/superchain:1-buster-slim-node16 image digests and inspect how the Python environment installs Twine and its dependencies. Reproduce the failure with the newer digest, then verify that the Python build and Twine package check succeed with packaging available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100