Giter VIP home page Giter VIP logo

Comments (5)

jsirois avatar jsirois commented on August 13, 2024 1

Please try adding --pip-version latest to your Pex command line. I can explain what's going on later.

from pex.

Github-dm-CDE avatar Github-dm-CDE commented on August 13, 2024

Hi @jsirois, thank you for the quick feedback and the suggested solution!
In fact, adding the --pip-version latest argument fixed the problem. 😊

We were also wondering whether there is a way to use the pip version already available in the venv.

We are very much looking forward to your explanation 😉

from pex.

jsirois avatar jsirois commented on August 13, 2024

But we cannot explain why it is called during the pex build process.

It's called during any Python build or resolve process because methodtools 0.4.7 is a source distribution: https://pypi.org/project/methodtools/0.4.7/#files. In order for Pip to resolve methodtools dependencies or Pex to build a wheel from it (Pex requires wheels), the sdist must be ~built. Building the sdist requires evaluating its setup.py.

So that's the why. The reason this is a problem in Pex (with default settings) and not Pip is Pex's default settings are backwards compatible to Pex 2.0.0 which used a patched version of Pip 20.3.4, and - more to the point, a patched version of setuptools. That patched version of setuptools is here: https://github.com/pex-tool/pex/tree/main/pex/vendor/_vendored/setuptools/setuptools-44.0.0+3acb925dd708430aeaf197ea53ac8a752f7c1863.dist-info and the version is 44.0.0+3acb925dd708430aeaf197ea53ac8a752f7c1863. The methodtools setup.py code assume a version of the form X.Y.Z with X, Y and Z all being integers. Here, the Pex vendored patched version of setuptools has a +3ac... local version identifier suffix that defeats the methodtools setup.py assumption.

The fix --pip-version latest could in fact be --pip-version <any version except the default>, see pex --help for all the supported values of --pip-version. All versions of Pip except the default use a production release of setuptools with a version in the standard X.Y.Z form; thus the fix.

You probably want to read more of the Pex CLI --help since features and options are added frequently to improve performance and compatibility, but they are never defaulted to since Pex never wants to break existing users.

from pex.

jsirois avatar jsirois commented on August 13, 2024

@Github-dm-CDE I'm going to close this as an answered question, but please speak up if this is still confusing.

from pex.

Github-dm-CDE avatar Github-dm-CDE commented on August 13, 2024

Hi @jsirois , thank you very much for your explanation!

from pex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.