1

Is it possible to restrict the availability of a python package to a certain Python runtime, e.g. Python>=2.7,<3

I feel like the solutions already posted elsewhere on here (setup.py: restrict the allowable version of the python interpreter and Enforcing python version in setup.py) aren't ideal because they perform a runtime version check in the setup.py file.

Isn't it possible that a package's metadata needs to be read on one computer, to determine the package's availability for another computer?

For instance, suppose a package repository wants to index the metadata for a collection of packages. It does so using Python 3, but for this particular package, the setup.py script throws an exception. A Python 2.7 client then connects to the index and can't find the package in question, because it failed to be indexed by the Python 3-based indexer.

Community
  • 1
  • 1
BillyBBone
  • 3,144
  • 3
  • 23
  • 27

0 Answers0