File: devenv.rst

package info (click to toggle)
quodlibet 4.6.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 18,016 kB
  • sloc: python: 85,817; sh: 385; xml: 110; makefile: 91
file content (112 lines) | stat: -rw-r--r-- 3,997 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
.. include:: ../icons.rst

.. _DevEnv:

Creating a Development Environment
==================================

This will show you how to get the latest and freshest Quod Libet running on
your machine and allow you to change it as you wish. The main task here is to
install all the software which Quod Libet uses and depends on.


|linux-logo| Linux
------------------

The easiest and recommended way to get all the dependencies needed for the
development version is to install one of our unstable repositories. By doing
so all the needed dependencies are automatically installed along the way. See
the :ref:`download section <Downloads>` for a list of available repositories.

In case your distribution is not supported you have to find/install the
dependencies yourself. See the :ref:`PackagingGuide` for a list of
dependencies.

Now clone the Git repository and start Quod Libet::

    $ git clone https://github.com/quodlibet/quodlibet.git
    $ ./quodlibet/quodlibet/quodlibet.py


|macosx-logo| MacOS
-------------------

On MacOS (formerly OS X) all the needed dependencies are included in the provided bundle
itself.
Download the latest bundle, which is guaranteed to work with current
Git ``main``: `QuodLibet-latest.dmg
<https://github.com/quodlibet/quodlibet/releases/download/ci/QuodLibet-latest.dmg>`__.
It contains a ``run`` script which passes all arguments to the included Python with
the right environment set up.

::

    $ git clone https://github.com/quodlibet/quodlibet.git
    $ ./QuodLibet.app/Contents/MacOS/run <path_to_git_repo>/quodlibet/quodlibet.py

On recent MacOS releases, the OS Gatekeeper will complain about the application not being recognised.
It is easiest to just clear the `com.apple.quarantine` extended attribute from all files in the bundle
rather than try and open each and every component that MacOS will refuse to open:

::

    $ xattr -rd com.apple.quarantine ./QuodLibet.app/Contents

The bundle includes `pip`, so you can always install additional packages (such as `flake8`, `pytest` and
`flaky`, which would let you run the test suite):

::

    $ ./QuodLibet.app/Contents/MacOS/run -m pip install flake8 pytest flaky
    $ ./QuodLibet.app/Contents/MacOS/run <path_to_git_repo>/setup.py test

If you want to run the tests with your own Python command, you'll need to install some additonal software
and packages:

::

    $ brew install cairo dbus gst-libav gst-plugins-bad gst-plugins-good gst-plugins-ugly \
        gstreamer gtk-mac-integration gtk+3 libsoup pkg-config pygobject3
    $ poetry install
    $ poetry run pip install pyobjc


.. |quodlibet.modules ref| replace:: ``quodlibet.modules`` moduleset file 
.. _quodlibet.modules ref: https://github.com/quodlibet/quodlibet/tree/main/dev-utils/osx_bundle/modulesets/quodlibet.modules

This will *almost* cover all the dependencies that the bundle will contain; at the time of writing the brew
gstreamer plugins do not include the wavpack (``gst-plugins-good``) or game-music-emu (gme, in ``gst-plugins-bad``)
plugins. The above list may be out of date, check the ``quodlibet`` metamodule section of the |quodlibet.modules ref|_
for a more up-to-date list of dependencies.

If you want to build a bundle yourself or change/add dependencies,
see the `osx_bundle directory
<https://github.com/quodlibet/quodlibet/tree/main/dev-utils/osx_bundle>`__
in the Git repo for further instructions.


|windows-logo| Windows
----------------------

On Windows we use the `msys2 <http://www.msys2.org/>`__ environment for
development.

Check out the `win_installer
<https://github.com/quodlibet/quodlibet/tree/main/dev-utils/win_installer>`__
directory in the Git repo for further instructions.


Poetry
------

Across all environments, we now support Virtualenvs with Pip dependencies,
managed by `Poetry <https://python-poetry.org/>`__.

Installation, once cloned is just::

    $ poetry install


If you want all the *optional* dependencies for various plugins::

    $ poetry install -E plugins