Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build 1.19.0 version from sources in Docker #161

Closed
tterletskyy opened this issue Jan 6, 2025 · 7 comments
Closed

Cannot build 1.19.0 version from sources in Docker #161

tterletskyy opened this issue Jan 6, 2025 · 7 comments

Comments

@tterletskyy
Copy link

tterletskyy commented Jan 6, 2025

Hello, right now it's not possible to build the streaming-form-data==1.19.0 in the Docker on MacOS ARM, something got broken. Linux aarch64: Linux 4e460891d430 6.10.14-linuxkit #1 SMP Fri Nov 29 17:22:03 UTC 2024 aarch64 GNU/Linux

Please also create a wheel for aarch64.

Dockerfile

FROM python:3.12-slim

WORKDIR /app

RUN apt update && \
    apt install -y build-essential && \
    pip install pip wheel setuptools streaming-form-data -U --no-cache-dir && \
    apt remove -y build-essential && \
    apt autoremove -y && \
    rm /var/lib/apt/lists/*

Error from docker compose build --progress plain

#8 12.39 Collecting streaming-form-data
#8 12.57   Downloading streaming_form_data-1.19.0.tar.gz (133 kB)
#8 12.65   Installing build dependencies: started
#8 14.39   Installing build dependencies: finished with status 'done'
#8 14.39   Getting requirements to build wheel: started
#8 14.44   Getting requirements to build wheel: finished with status 'done'
#8 14.44   Preparing metadata (pyproject.toml): started
#8 14.53   Preparing metadata (pyproject.toml): finished with status 'error'
#8 14.53   error: subprocess-exited-with-error
#8 14.53   
#8 14.53   × Preparing metadata (pyproject.toml) did not run successfully.
#8 14.53   │ exit code: 1
#8 14.53   ╰─> [21 lines of output]
#8 14.53       Traceback (most recent call last):
#8 14.53         File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
#8 14.53           main()
#8 14.53         File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
#8 14.53           json_out['return_val'] = hook(**hook_input['kwargs'])
#8 14.53                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#8 14.53         File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
#8 14.53           return hook(metadata_directory, config_settings)
#8 14.53                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#8 14.53         File "/tmp/pip-build-env-s_3p78z8/overlay/lib/python3.12/site-packages/poetry/core/masonry/api.py", line 43, in prepare_metadata_for_build_wheel
#8 14.53           builder = WheelBuilder(poetry)
#8 14.53                     ^^^^^^^^^^^^^^^^^^^^
#8 14.53         File "/tmp/pip-build-env-s_3p78z8/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 65, in __init__
#8 14.53           super().__init__(poetry, executable=executable)
#8 14.53         File "/tmp/pip-build-env-s_3p78z8/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/builder.py", line 43, in __init__
#8 14.53           self._meta = Metadata.from_package(self._package)
#8 14.53                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#8 14.53         File "/tmp/pip-build-env-s_3p78z8/overlay/lib/python3.12/site-packages/poetry/core/masonry/metadata.py", line 112, in from_package
#8 14.53           if name == "repository" and url == package.urls["Repository"]:
#8 14.53                                              ~~~~~~~~~~~~^^^^^^^^^^^^^^
#8 14.53       KeyError: 'Repository'
#8 14.53       [end of output]
#8 14.53   
#8 14.53   note: This error originates from a subprocess, and is likely not a problem with pip.
#8 14.72 error: metadata-generation-failed
#8 14.72 
#8 14.72 × Encountered error while generating package metadata.
#8 14.72 ╰─> See above for output.
#8 14.72 
#8 14.72 note: This is an issue with the package mentioned above, not pip.
#8 14.72 hint: See above for details.
@siddhantgoel
Copy link
Owner

I think this error might be the same as the one that #160 fixes.

@minh-dai
Copy link

minh-dai commented Jan 7, 2025

+1, i have the issue, Have any solution or work around it?

@siddhantgoel
Copy link
Owner

Could you pin Poetry version to 1.8.5 and try installing again? Poetry released a 2.0.0 version 2 days ago and my feeling is that it could be related, as 2.0.0 is a breaking change.

@hongyiweiwu01
Copy link

hongyiweiwu01 commented Jan 7, 2025

@siddhantgoel I tried to install it using poetry == 1.8.5 but is still failing. I think it's trying to pull in the latest version of poetry-core but I'm not sure how to constrain poetry-core to 1.9.1.

@siddhantgoel
Copy link
Owner

As far as I understand, this is something to be fixed on Poetry's end. v1.19.0 has been on PyPI since November. It might be worth to either wait for Poetry's next release or try to pin poetry-core to an older version to see whether that helps. Otherwise I'm open to suggestions.

@minh-dai
Copy link

i used the fork in this library by @gantoine While waiting for the final release. You can try this to work around.

streaming-form-data = { git = "https://github.com/gantoine/streaming-form-data.git", branch = "main" }

@siddhantgoel
Copy link
Owner

I just published v1.19.1 which should fix the installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants