You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am looking for a way to use flit to create a package that would install a file into "site-packages" directory proper (i.e. not into some its sub-directory). I need this to be able to install a .pth file, as discussed here.
BTW, I wasn't able to get the recipe from that post working, but instead came up with the following:
According to this, my approach uses an undefined behavior. Moreover, it works only if installing from a wheel, so e.g. venv/bin/pip install . fails with an understandable error: could not create '/xxx1.pth': Permission denied.
I have seen this but as far as I understand, it only allows files inside package directories.
I am perfectly ok with having src/xxx1/__init__.py instead of src/xxx1.py (BTW, thanks for finally making the src layout possible) but I do need a way to install .../site-packages/xxx1.pth file.
The text was updated successfully, but these errors were encountered:
Sorry, that's not supported, and not likely to be supported. Flit is very much aimed at the 80% in the 80/20 rule, so if you want to do something unusual, you'll probably need to use another tool.
(I'm also especially disinclined to support this use case, because I think the executable .pth files are a misfeature. There are a couple of legitimate use cases - like coverage measurements in subprocesses - that can't currently be done any other way, but I still don't like them.)
Kind thanks for your prompt reply. I suppose I will stick to setup.py for this particular package. Should you be curious, this is about addition of plugin mechanism to a certain major library, authors of which I believe would not want to include the feature upstream or it would take ages to come up with exact design that would satisfy everyone.
I am looking for a way to use
flit
to create a package that would install a file into "site-packages" directory proper (i.e. not into some its sub-directory). I need this to be able to install a.pth
file, as discussed here.BTW, I wasn't able to get the recipe from that post working, but instead came up with the following:
setup.py
src/xxx1.pth
src/xxx1.py
According to this, my approach uses an undefined behavior. Moreover, it works only if installing from a wheel, so e.g.
venv/bin/pip install .
fails with an understandableerror: could not create '/xxx1.pth': Permission denied
.I have seen this but as far as I understand, it only allows files inside package directories.
I am perfectly ok with having
src/xxx1/__init__.py
instead ofsrc/xxx1.py
(BTW, thanks for finally making thesrc
layout possible) but I do need a way to install.../site-packages/xxx1.pth
file.The text was updated successfully, but these errors were encountered: