Skip to content

publish fails due to rust compiler not found #56

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

Closed
virtuald opened this issue Feb 8, 2021 · 13 comments
Closed

publish fails due to rust compiler not found #56

virtuald opened this issue Feb 8, 2021 · 13 comments
Labels
bug Something isn't working

Comments

@virtuald
Copy link
Contributor

virtuald commented Feb 8, 2021

Oh yes.

https://github.com/robotpy/robotpy-navx/runs/1856441423?check_suite_focus=true

...
Step 7/12 : RUN pip install --upgrade --no-cache-dir twine
   ---> Running in ce26efd674e3
...
Building wheels for collected packages: cryptography
    Building wheel for cryptography (PEP 517): started
    Building wheel for cryptography (PEP 517): finished with status 'error'
    ERROR: Command errored out with exit status 1:
...
        =============================DEBUG ASSISTANCE=============================
        If you are seeing a compilation error please try the following steps to
        successfully install cryptography:
        1) Upgrade to the latest pip and try again. This will fix errors for most
           users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
        2) Read https://cryptography.io/en/latest/installation.html for specific
           instructions for your platform.
        3) Check our frequently asked questions for more information:
           https://cryptography.io/en/latest/faq.html
        4) Ensure you have a recent Rust toolchain installed:
           https://cryptography.io/en/latest/installation.html#rust
        5) If you are experiencing issues with Rust for *this release only* you may
           set the environment variable `CRYPTOGRAPHY_DONT_BUILD_RUST=1`.
        =============================DEBUG ASSISTANCE=============================
...
error: Can not find Rust compiler

Seems like the crptography project messed something up when publishing their wheel? But maybe you need to set that environment variable mentioned?

@virtuald
Copy link
Contributor Author

virtuald commented Feb 8, 2021

It looks like they upgraded the manylinux tag on their wheel, so would need to install an upgraded version of pip before installing twine.

https://pypi.org/project/cryptography/3.4.2/#files

@webknjaz
Copy link
Member

webknjaz commented Feb 8, 2021

Yes, they've dropped manylinux1 as a pre-requisite for starting to use the Rust toolchain (pyca/cryptography#5410 (comment) / pyca/cryptography#5776). And yes, you may be onto something: if pip is too old, it wouldn't know about the manylinux2010/manylinux2014 tags. Good catch! Let me verify this locally.

@webknjaz webknjaz added the bug Something isn't working label Feb 8, 2021
@virtuald
Copy link
Contributor Author

virtuald commented Feb 8, 2021

Actually, looking again, it seems like they did an incomplete push, there's only python 3.6 wheels present.

@virtuald
Copy link
Contributor Author

virtuald commented Feb 8, 2021

Filed bug at pyca/cryptography#5787

@webknjaz
Copy link
Member

webknjaz commented Feb 8, 2021

Ah, you are right! They've been uploaded 7-12 minutes ago from concurrent jobs in different systems. So it's a race condition: the rest of the jobs are likely still running and will publish more dists soon. It's a duplicate of #50.

I think we can patch it in this repo by adding --prefer-binary to pip install. But it's good that you've filed a bug there as well. I'm just not sure how hard it'd be for them to synchronize all of their publishes as they are happening from different CI systems.

@virtuald
Copy link
Contributor Author

virtuald commented Feb 8, 2021

It looks like their prior two releases only published 3.6 wheels as well.

@webknjaz
Copy link
Member

webknjaz commented Feb 8, 2021

Oh wow! You're right!

@virtuald
Copy link
Contributor Author

virtuald commented Feb 8, 2021

These issues are explained in the FAQ and issue template:

https://cryptography.io/en/latest/faq.html#why-are-there-no-wheels-for-my-python3-x-version
https://cryptography.io/en/latest/faq.html#installing-cryptography-fails-with-error-can-not-find-rust-compiler

... so maybe it just needs an upgraded pip?

@webknjaz
Copy link
Member

webknjaz commented Feb 8, 2021

Yes, looks like it.

@webknjaz
Copy link
Member

webknjaz commented Feb 8, 2021

@virtuald could you verify that uses: pypa/gh-action-pypi-publish@27b3170 works now? When you confirm, I'll cut the tag.

@RhinosF1
Copy link

RhinosF1 commented Feb 8, 2021

@virtuald could you verify that uses: pypa/gh-action-pypi-publish@27b3170 works now? When you confirm, I'll cut the tag.

Works here. See https://github.com/MirahezeBots/MirahezeBots/pull/391/checks?check_run_id=1856702005

@virtuald
Copy link
Contributor Author

virtuald commented Feb 8, 2021

Works for me, thanks!

@webknjaz
Copy link
Member

webknjaz commented Feb 8, 2021

FTR I've pushed a tag v1.4.2 but can't publish it to the marketplace until @pradyunsg re-accepts the marketplace dev agreement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants