Paramiko: [Test suite dependency] pyca/cryptography will use an rust compiler on versions>3.4

Created on 10 Feb 2021  Â·  18Comments  Â·  Source: paramiko/paramiko

This is the email from December with the roadmap for the project

The xenial release will reach eol in April and doesn't ship a recent version of rust. Thus there's the need to update the distro used by travis-ci.

Most helpful comment

https://cryptography.io/en/latest/installation.html#rust contains Rust
specific details.
https://cryptography.io/en/latest/faq.html#installing-cryptography-fails-with-error-can-not-find-rust-compiler
also contains a workaround for the 3.4.x release only.

On Fri, Feb 12, 2021 at 11:45 AM Jeff Forcier notifications@github.com
wrote:

FWIW my next step for Paramiko is migrating its CI to CircleCI and getting
the development environment working with Cryptography 3.4+ will surely be
part of that update.

I'll also update our install instructions to point to whichever part of
Crypto's docs mention the whys & hows of the Rust dependency.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/paramiko/paramiko/issues/1813#issuecomment-778307021,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAAGBCFASW3B3DMOTPEJYTS6VLLJANCNFSM4XNTT5TA
.

--
All that is necessary for evil to succeed is for good people to do nothing.

All 18 comments

It drops Python 2 support: pyca/cryptography#5533

@alex @bitprophet the info is here

@alex @bitprophet the info is here

Btw if you need some help clearing some issues let me know

This is not really a paramiko issue, and I don't think it makes sense to file here. In general you can solve this by:

  1. Updating to a newer version of pip so that you install from a wheel
  2. Set the CRYPTOGRAPHY_DONT_BUILD_RUST environment variable (3.4.x release only): https://cryptography.io/en/latest/faq.html#installing-cryptography-fails-with-error-can-not-find-rust-compiler
  3. Install rust from https://rustup.rs/

This is not really a paramiko issue, and I don't think it makes sense to file here. In general you can solve this by:

  1. Updating to a newer version of pip so that you install from a wheel
    Sure
  1. Set the CRYPTOGRAPHY_DONT_BUILD_RUST environment variable (3.4.x release only): https://cryptography.io/en/latest/faq.html#installing-cryptography-fails-with-error-can-not-find-rust-compiler

This is not really a long term option for testing the paramiko package.

  1. Install rust from https://rustup.rs/

Which is a dependency of cargo.

I'm not sure I understand what you mean abotu rustup.rs being a dependency of cargo. You can install Rust into (more or less) any environment from it and it'll get you everything you need to build pyca/cryptography from source.

I'm not sure I understand what you mean abotu rustup.rs being a dependency of cargo. You can install Rust into (more or less) any environment from it and it'll get you everything you need to build pyca/cryptography from source.

Sorry if I did confuse you :face_with_head_bandage: . I meant that cargo depends on rustc and other packages on Ubuntu.

Sure, if you install from rustup.rs you bypass your distro packages, it
gets you a recent version of rustc and cargo.

On Thu, Feb 11, 2021 at 2:49 PM João Fonseca notifications@github.com
wrote:

I'm not sure I understand what you mean abotu rustup.rs being a
dependency of cargo. You can install Rust into (more or less) any
environment from it and it'll get you everything you need to build
pyca/cryptography from source.

Sorry if I did confuse you 🤕 . I meant that cargo depends on rustc and
other packages on Ubuntu.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/paramiko/paramiko/issues/1813#issuecomment-777747039,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAAGBFLK7GDH2M5INILJO3S6QYFXANCNFSM4XNTT5TA
.

--
All that is necessary for evil to succeed is for good people to do nothing.

FWIW my next step for Paramiko is migrating its CI to CircleCI and getting the development environment working with Cryptography 3.4+ will surely be part of that update.

I'll also update our install instructions to point to whichever part of Crypto's docs mention the whys & hows of the Rust dependency.

https://cryptography.io/en/latest/installation.html#rust contains Rust
specific details.
https://cryptography.io/en/latest/faq.html#installing-cryptography-fails-with-error-can-not-find-rust-compiler
also contains a workaround for the 3.4.x release only.

On Fri, Feb 12, 2021 at 11:45 AM Jeff Forcier notifications@github.com
wrote:

FWIW my next step for Paramiko is migrating its CI to CircleCI and getting
the development environment working with Cryptography 3.4+ will surely be
part of that update.

I'll also update our install instructions to point to whichever part of
Crypto's docs mention the whys & hows of the Rust dependency.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/paramiko/paramiko/issues/1813#issuecomment-778307021,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAAGBCFASW3B3DMOTPEJYTS6VLLJANCNFSM4XNTT5TA
.

--
All that is necessary for evil to succeed is for good people to do nothing.

Thanks Alex! Updated: https://github.com/paramiko/paramiko/commit/22f44011dfce54b4c3a36621d36a6d26ee3a4f27

Ironically, now I find RTD can't build my docs for exactly the reason under discussion, so I'll have to figure out what can be fixed in that particular build env (besides temporary workarounds, of course).

@alex are y'all doing anything in particular on your RTD? I've already switched mine to using Py3 (seems to be 3.7), and the setup code Eric/etc wrote already updates to the latest pip (21.x right now), but it's not selecting the wheel (despite using wheels for other deps like PyNaCL and wheels existing on PyPI for you) and then croaks because no setuptools_rust is available.

Dunno why RTD doesn't get wheels, but
https://github.com/pyca/cryptography/blob/main/.readthedocs.yml is how we
opt in to a newer RTD build env that does have rust installed

On Fri, Feb 12, 2021 at 12:21 PM Jeff Forcier notifications@github.com
wrote:

Thanks Alex! Updated: 22f4401
https://github.com/paramiko/paramiko/commit/22f44011dfce54b4c3a36621d36a6d26ee3a4f27

Ironically, now I find RTD can't build my docs for exactly the reason
under discussion, so I'll have to figure out what can be fixed in that
particular build env (besides temporary workarounds, of course).

@alex https://github.com/alex are y'all doing anything in particular on
your RTD? I've already switched mine to using Py3 (seems to be 3.7), and
the setup code Eric/etc wrote already updates to the latest pip (21.x right
now), but it's not selecting the wheel (despite using wheels for other deps
like PyNaCL and wheels existing on PyPI for you) and then croaks because no
setuptools_rust is available.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/paramiko/paramiko/issues/1813#issuecomment-778327670,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAAGBFECRZOSLR5M4ZXZPLS6VPQBANCNFSM4XNTT5TA
.

--
All that is necessary for evil to succeed is for good people to do nothing.

Weird I even looked for a .readthedocs.yaml in your repo before asking, not sure how I missed that! Will give it a shot, thanks.

I'll add a comment to that file to make its purpose more obvious.

On Fri, Feb 12, 2021 at 12:39 PM Jeff Forcier notifications@github.com wrote:
>

Weird I even looked for a .readthedocs.yaml in your repo before asking, not sure how I missed that! Will give it a shot, thanks.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

--
All that is necessary for evil to succeed is for good people to do nothing.

Grumble, it looks like the yml file might take precedence over web settings for everything it allows you to configure. I'm gonna have to reach for the 'temporary pin' solve right now to get the above commit published, and fix my RTD setup in a branch (ideally later today but we'll see). I'll leave this ticket open as the placeholder for that work.

https://www.paramiko.org/installing.html#cryptography now has the links to Rust related Crypto docs. We'll see if I can get things truly working before RTD maint hits today :D

Cool, seems there's just some odd corner case when you have a very small rtd.yml which meant it wasn't honoring my requirements.txt setting from the web. I fleshed it out a bit more and things are building again - but, importantly, still honoring the Sphinx conf file setting from the web still (without which I get messed up re: an unversioned www site but versioned docs site...so maybe later if RTD goes full config file I'll be in trouble, but for now, seems ok).

Docs updated, RTD side of this is fixed, and as noted, I will be making sure my new CI regime also takes the Rust thing into account.

Was this page helpful?
0 / 5 - 0 ratings