I've got a weird situation. I have moved the scie-...
# general
c
I've got a weird situation. I have moved the scie-pants binary to my repo and commited it, and it works fine for me. One of my coworkers tried to get it running, though, but she gets errors when accessing our internal pypi repo due to bad credentials. From what I can see, her configuration is identical, we have the pypi server in .netrc with the right credentials, and we also added PANTS_PYTHON_REPOS_INDEXES just to be sure. The installer fails when setting up the virtual env. Any ideas what I might be missing?
1
c
just an aside. I don’t think it makes as much sense to check in the scie-pants binary as it did the pants launcher script, as the former is platform specific. Also as it is meant to be installed on your PATH and used as a regular cli tool. What you can checkin though is the https://github.com/pantsbuild/setup/blob/gh-pages/get-pants.sh if you want to make it easier to on-board new devs. https://www.pantsbuild.org/docs/installation
c
Yes, but I don't want to be needing to download the binary every time in CI. Accessing the internet from CI is also a no-no.
👍 1
w
Just as the most sanity of sanities - your machines are the same, correct? Same OS, same hardware architecture? Otherwise, did you get an error log that you can post?
c
Yes, the machines and environments should be the same. Of course, they aren't, otherewise it would have worked. I would need a hint as to where to look - is the installer just setting up and running a normal venv, with the normal venv tools?
Copy code
~/Workspace/ci/ci/hp_ci$ ./pants roots 
Bootstrapping Pants 2.16.0rc0 using cpython 3.9.15 
Installing pantsbuild.pants==2.16.0rc0 into a virtual environment at ~/.cache/nce/6621291ed4120fa45607b367abf7786ce496f389f27240712a63c31f1c438c21/bindings/venvs/2.16.0rc0 WARNING: 401 Error, Credentials not correct for https://<server>:443/artifactory/api/pypi/PYPI/simple/pip/
w
Hmmm… I wonder if there is an env path “thing” going on. As far as I know, for the end user, it shouldn’t functionally run any different to the
./pants
script
Oh wait, it works on your machine
c
If there are no magic things happening, then maybe we can reproduce directly with pip. I'll see if that helps finding the issue.
w
I’d assume the only substantial difference between yours and your colleague’s machine is the home directory name - BUT, I don’t see why that should cause a problem - if the only new thing you’re doing is committing the raw pants binary.
As another sanity, if your colleague pulls the pants binary via the installation instructions, does it work?
c
Ha! Ok, silly mistake. She had a configuration file that we others didn't (found it with "pip config -v list"). Thanks for the help!
w
😁