1

I have a GUI Python app that I'm trying to distribute a desktop entry with. Normally, one would write a setup.py with setuptools that has this in it:

from setuptools import setup

setup(
    name       = 'myapp',
    version    = '0.0.1',
    packages   = ['myapp'],
    data_files = [
        ('share/applications', ['myapp.desktop']),
    ],
)

This is deprecated, however, and my goal is to use only pyproject.toml in my repo with no setup.py or setup.cfg needed. I have been unable to find any information on how I would go about doing this.

  • 1
    `data_files` are deprecated and strongly recommended against, in Python packaging eco-system in general and not just with setuptools. Data files are now out of scope for Python packaging. -- Python is "operating system agnostic" so to say. Those `*.desktop` files are specific to desktop Linux OSes, or actually they are specific to some "desktop environments" (KDE, Gnome, etc.) aren't they? I recommend you use a higher layer of packaging tools, something like deb/apt, rpm/yum, pacman, flatpak, etc. – sinoroc Oct 27 '22 at 08:39

0 Answers0