data_files removal: pip / setuptools is going to be not nice with GTK applications #860
Replies: 6 comments 9 replies
-
I'll take care of the Fedora package. Thanks for taking care of this, it sounds a bit like a mess and I haven't read the details but I trust you doing the right thing here. |
Beta Was this translation helpful? Give feedback.
-
Regarding uninstall: Do I understand correctly that each pip install will leave some files behind that can't be uninstalled? That wouldn't sound ideal to me, at least we'd need to document this behavior IMO. Better would be fixing it. I'm worried this could lead to hard to track bugs in case we ever move, delete or rename files or in cases where you pip uninstall to switch to an rpm install for example. Left over files may hide others and/or become outdated. |
Beta Was this translation helpful? Give feedback.
-
I've been using venvs recently and it seems to work quite well with PDF Arranger, might be recommendable for development and translation:
Everything should be contained inside the venv. There is of course no Desktop integration (Nautilus "Open With", Application Menus etc.). For that it's probably the best to always build a system packge (RPM, DEB or whatever) and install it as such. Unfortunately |
Beta Was this translation helpful? Give feedback.
-
I think at the moment you can use setuptools + wheel with Also you could include more files inside the package directory to reduce the impact of the |
Beta Was this translation helpful? Give feedback.
-
That is not my understanding. I understand that restricting the install directory and preventing PyPI packages from installing files anywhere they want in the
Wow, indeed Pympress setup.py is really polished. I'll have a look in deep. https://github.com/Cimbali/pympress/blob/master/setup.py#L279-L282 <-- I did not managed to make that work. For me setuptools Yes we could move translations used directly in python and |
Beta Was this translation helpful? Give feedback.
-
For the record, Meld has dropped pip support. |
Beta Was this translation helpful? Give feedback.
-
There is a long discussion about that here.
Some key points:
data_files
is a distutils/setuptools feature we use to install icons, translations, and freedesktop files.wheel
is a standard for python packageswheel
files are designed to install files only in the pythonsite-packages
(i.e. not in<prefix>/share
)distutils
is deprecated. It will be removed from python 3.12 but still be available for while (how long ?) in thesetuptools
packageI managed to create custom
setuptools
commands to havepip install
installing our data files at the right location (<prefix>/share
). But aswheel
ignore those filespip uninstall
ignore them too.I'm sure that supporting old and new python packaging tooling at the same time going to be a nightmare.
@dreua Would it be possible to stop using wheel in the Fedora package ? It worked so far because we use
distutils
commands. If I switch tosetuptools
commands therpm
would no longer include translation.3 related goods news:
data_files
issue switching PDF Arranger topyproject.toml
does work on Linux (I checked it).cx_Freeze
has started its migration to adapt to modern python packagingpython-distutils-extra
still relies ondistutils
but we'll soon no longer use it.Beta Was this translation helpful? Give feedback.
All reactions