Open kloczek opened 2 years ago
The tests are all failing with
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/home/tkloczko/.local/lib/python3.8/site-packages'
Check the permissions.
This seems to be a problem with your system and not a problem with the tests.
Yep .. and question ios why test wiote is truing to install something?
The test filename is:
tests/test_install.py
That should provide a hint for why its trying to install something. Flit has a flit install
command, which is what is being tested in those tests.
Closing this since this is an environment configuration issue.
Actually, I think there is a genuine issue with the tests here that we hadn't spotted.
The tests do some monkeypatching to redirect installation to temporary directories:
But this doesn't affect the _auto_user
method, which looks to see if it should do a user install or not:
https://github.com/pypa/flit/blob/f5704ea31f0fcc579b8518ea85d641651cba4f71/flit/install.py#L152-L154
And of course the monkeypatching also won't affect pip when the install code runs that as a subprocess.
So I'm going to reopen this :wink: . I'm not sure yet exactly what's the best way to properly isolate those tests - maybe we have to set up a venv for each test, even if that's slower - but I think they do need some work.
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulesHere is pytest output:
Here is list of installed modules in build env