Git Product home page Git Product logo

Comments (3)

sschuberth avatar sschuberth commented on May 23, 2024

Note that the environment markers in requirements.txt files are per-dependency markers, to allow for installing different dependencies depending on the Python version. While we could misuse that, it's not quite what we need.

To reiterate, what we need is a machine-readable way for a project to say "I require Python 3" (or Python 2).

Looks like another option is to use a python_requires directive in a setup.cfg file (not setup.py file, but there seems to be no consensus about that).

Yet another upcoming standard seems to be the pyproject.toml file which may contain a requires-python directive. Did I mention that Python dependency management is a mess?

from ort.

adambhere avatar adambhere commented on May 23, 2024

Here's advice on how to detect if Python 3 vs Python 2 is needed: https://stackoverflow.com/questions/40886456/how-to-detect-if-code-is-python-3-compatible. If this works, no manually maintained metadata is required – and such metadata might not be correct anyway. Instead, the required information could be determined automatically as and when required. This would also eliminate any waiting for a standard or a standard that is most widely adopted.

from ort.

sschuberth avatar sschuberth commented on May 23, 2024

Implemented by #1146.

from ort.

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.