vapoursynth / vsrepo

A simple package repository for VapourSynth
MIT License
113 stars 29 forks source link

PermissionError on global Vapoursynth installs #201

Open RivenSkaye opened 1 year ago

RivenSkaye commented 1 year ago

I have a system-wide Python and Vapoursynth install set up on my system. Attempting to run the latest vsrepo with Vapoursynth R61 causes an error to be thrown whenever genstubs is called or updated. I've managed to trace it to two specific lines causing the issue

Running genstubs as admin does properly include plugins installed by a user. I don't know how well this holds up on systems with more than one user, and it could be a side-effect of me running cmd as admin and it inheriting part of my env.

Proposed fixes:

My preference would be copying the dist-info. This results in what python -m pip install -U pip does as well, as it leaves the system-wide pip alone, installs it for the user and in subsequent invocations of pip through either the python module or the script on the PATH it loads the user install due to Python's module loading preferences (user site-packages is preferred over system-wide)