I want to make a package to depend the particular version range e.g. >= 0.5.0, < 0.7.0
. Is it possible in install_requires
option, and if so
The notation mentioned in OP's question, >= 0.5.0, < 0.7.0
, already works.
And, since many (if not most) of the libraries would already use semantic versioning, so by definition you can define your dependency as A>=1,<2
, as explained here. And they even implemented an even simpler syntax for it, A~=X.Y, meaning it requires at least release X.Y, but also allows any later release with a matching MAJOR version.