Skip to content

Add www/* and sql/* to package-data#90

Merged
jodal merged 1 commit intomopidy:mainfrom
rnestler:patch-1
Mar 26, 2026
Merged

Add www/* and sql/* to package-data#90
jodal merged 1 commit intomopidy:mainfrom
rnestler:patch-1

Conversation

@rnestler
Copy link
Copy Markdown
Contributor

Otherwise it won't be packaged with python -m build from https://github.com/pypa/build

Otherwise it won't be packaged with `python -m build` from https://github.com/pypa/build
@jodal
Copy link
Copy Markdown
Member

jodal commented Mar 26, 2026

Building with build seems to work correctly for me:

$ uv pip install build
$ uv run python -m build
...
adding 'mopidy_local/__init__.py'
adding 'mopidy_local/actor.py'
adding 'mopidy_local/commands.py'
adding 'mopidy_local/ext.conf'
adding 'mopidy_local/library.py'
adding 'mopidy_local/mtimes.py'
adding 'mopidy_local/playback.py'
adding 'mopidy_local/schema.py'
adding 'mopidy_local/storage.py'
adding 'mopidy_local/translator.py'
adding 'mopidy_local/web.py'
adding 'mopidy_local/sql/schema.sql'
adding 'mopidy_local/sql/upgrade-v1.sql'
adding 'mopidy_local/sql/upgrade-v2.sql'
adding 'mopidy_local/sql/upgrade-v3.sql'
adding 'mopidy_local/sql/upgrade-v4.sql'
adding 'mopidy_local/sql/upgrade-v5.sql'
adding 'mopidy_local/sql/upgrade-v6.sql'
adding 'mopidy_local/www/index.html'
adding 'mopidy_local-4.0.0a5.dist-info/licenses/LICENSE'
adding 'mopidy_local-4.0.0a5.dist-info/METADATA'
adding 'mopidy_local-4.0.0a5.dist-info/WHEEL'
adding 'mopidy_local-4.0.0a5.dist-info/entry_points.txt'
adding 'mopidy_local-4.0.0a5.dist-info/top_level.txt'
adding 'mopidy_local-4.0.0a5.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built mopidy_local-4.0.0a5.tar.gz and mopidy_local-4.0.0a5-py3-none-any.whl

Reading https://setuptools.pypa.io/en/latest/userguide/datafiles.html, I assume the difference between your setup and mine isn't the use of build or not, but that you're building from a directory that doesn't have the Git metadata, so setuptools-scm doesn't know which files are tracked by Git, and thus needs the files to be explicitly included.

@jodal jodal merged commit 9ac042b into mopidy:main Mar 26, 2026
6 checks passed
@rnestler
Copy link
Copy Markdown
Contributor Author

Reading https://setuptools.pypa.io/en/latest/userguide/datafiles.html, I assume the difference between your setup and mine isn't the use of build or not, but that you're building from a directory that doesn't have the Git metadata, so setuptools-scm doesn't know which files are tracked by Git, and thus needs the files to be explicitly included.

Yes, that was exactly the case. I was updating the https://aur.archlinux.org/packages/mopidy-local package while noticing this.

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