Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I specify dependency minimum and maximum version in setup.cfg?

Problem description

I would want to define the install requirement for my pip package. Let's say FooLibrary's version should be >=2 but <3.2.

Currently, I have

[options]
install_requires =
    FooLibrary >= 2

Question

How can I add a rule for maximum version of the library together with the minimum version rule?

like image 354
Viljami Avatar asked Oct 18 '25 15:10

Viljami


1 Answers

Separate version requirements with commas.

So for example, in this case, FooLibrary >=2,<3.2 works

like image 161
Viljami Avatar answered Oct 21 '25 04:10

Viljami