Skip to content

Conversation

@jlu5
Copy link
Member

@jlu5 jlu5 commented Oct 28, 2025

I want to move this project towards a standard Python packaging workflow, using pip install instead of the legacy setup.py install. The latter has been deprecated and no longer works out of the box on Python 3.14 (see #795). There also long-standing issues where the current approach doesn't work correctly for local installs, such as #247.

Developer workflow

This changes the workflow slightly for developers. Instead of running the bin/variety script, the standard approach is:

  • create a virtualenv
  • source the virtualenv
  • run pip install -e . to install Variety & dependencies in editable mode (i.e. you can make code changes and apply them directly without rerunning pip)
  • Run variety within the virtualenv

Note that the setup instructions I've written so far create a virtualenv that inherits from system site packages, as some of the dependencies (namely dbus-python) require development headers to compile correctly. I think this is a reasonable tradeoff for the average user.

Packaging workflow

setuptools is stricter by design in what it installs. Only data files under a code package (variety/ in this case) are installed, so I've moved all the media and ui assets one level in. In my testing, a local development installation loads the assets fine. I double checked this by removing my system wide Variety installation as well.

Packagers will need to adapt to this by manually installing the .desktop file and icon, as they are not handled by setuptools. Alternatively we could symlink the data directory to /usr/share/variety, but I'm not sure other programs would benefit from that necessarily.

Other changes

I have bumped the version to 0.9.0-alpha1, as this is a non-trivial reorganization. I've also gone ahead and removed unused media assets (mainly grep + manual verification as to whether each one is still being used)

jlu5 added 5 commits October 13, 2025 17:49
Some refactoring of the project layout is required, such as:
- Moving data/ under the variety package (it needs to be there for setuptools to pick it up)
- setuptools-gettext generates variety/locale from po/ as part of the build. Add it to gitignore
@jlu5 jlu5 requested a review from peterlevi October 28, 2025 00:56
@jlu5 jlu5 added this to the 0.9.0 milestone Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants