Hi all. Currently I am exploring Pants and I am en...
# general
f
Hi all. Currently I am exploring Pants and I am enjoying it so far 🙂 I am facing something that I am still not sure if it is an misconfiguration on my side or an issue. Description I have a repo where the
requirements.txt
only has one dependency listed. This dependency lives in a private repository. After configuring the
.pants.rc
to set the index URL with the creds, when I run
./pants generate-lockfiles
it returns a list of the dependency versions available (since I haven’t constraint that in the
requirements.txt
). However, I noticed it doesn’t list the most recent ones. So I constraint the version to the most recent listed in the output of pants (let’s call it
version A
) and was able to generate the lockfile. However, when tried to constrain to the version that was released after that one (let’s call it
version B
), it couldn’t find a match distribution. I was inspecting the
setup.py
files in both distributions and found this change:
Copy code
```
# version A
    'python_requires': '>=3.7.0,<3.8.0',

# version B
    'python_requires': '>=3.7.1,<3.8.0',
```
which aligns to the diff between the `pyproject.toml`s.
Copy code
```
# version A
python = "~3.7.0"

# version B
python = "~3.7.1"
```
In the
pants.toml
I found that I was able to generate the lockfile for
version A
if
[python].interpreter_constraints = ["==3.7.*"]
. But if changes to
[python].interpreter_constraints = [">=3.7,<4"]
for example it can’t find matching distributions for the dependency. Has anyone faced something similar? Thanks in advance 🙂 EDIT: I am using
pex
as the
[python].lockfile_generator
âś… 1