Skip to content

Conversation

@fedelibre
Copy link
Member

Fixes #1898

tox -e mo-generate can be called from pyproject.toml?

I've built the wheel with python -m build and then installed it. Languages and user manuals are available.
Please review as I don't know Python packaging best practices.

@ionenwks
Copy link

ionenwks commented Apr 1, 2025

tox -e mo-generate can be called from pyproject.toml?

On that note, it'd be nice if we could have the same that the 3.3.0 release had, aka a release tarball with pre-generated files rather than rely on github's auto-generated archives without them. Most people would likely use that unless they're doing development making it a non-issue for them.

Edit: also, tox is a unusual build requirement compared to make -- so would rather not have to use it if possible (esp. on Gentoo where we build from sources and I wouldn't want to make users install tox just to run a .py script for .mo and two msgfmt commands for the .desktop/metainfo), and a tarball would allow that

@fedelibre
Copy link
Member Author

On that note, it'd be nice if we could have the same that the 3.3.0 release had, aka a release tarball with pre-generated files rather than rely on github's auto-generated archives without them

Ok, I will try this option and add a tarball to the 4.0.0 release.

I'm having problems also with the flatpak package for the same reason, see here.

@fedelibre
Copy link
Member Author

@ionenwks
Copy link

ionenwks commented Apr 1, 2025

Please try this tarball: https://github.com/frescobaldi/frescobaldi/releases/download/v4.0.0/Frescobaldi-4.0.0.tar.gz

Thanks, it's usable but it seems a bit messy. The tarball contains another broken .tar.gz and unpacks without a subdirectory which isn't typical of source tarballs (typically would have frescobaldi-4.0.0/ subdir or so named the same as the tarball itself)

@fedelibre
Copy link
Member Author

Ok, this one should be ok:
https://github.com/frescobaldi/frescobaldi/releases/download/v4.0.0/frescobaldi-4.0.0.tar.gz

Here's how I created it:

git clone -b v4.0.0 [email protected]:frescobaldi/frescobaldi.git frescobaldi-4.0.0
cd frescobaldi-4.0.0
tox -e mo-generate
tox -e linux-generate
cd ..
tar --exclude='.git*' --exclude='.tox' --exclude='i18n/__pycache__' -czvf frescobaldi-4.0.0.tar.gz frescobaldi-4.0.0

@ionenwks
Copy link

ionenwks commented Apr 2, 2025

Ok, this one should be ok:

Thanks, looks fine to me now.

@fedelibre
Copy link
Member Author

I think you still need the patches in this PR to make pip install work.
I'm about to push here another commit I've verified on the tarball.

@fedelibre fedelibre changed the title Use setuptools-scm plugin to add non .py files in wheel Add package data files to be included or excluded Apr 2, 2025
pyproject.toml Outdated
Comment on lines 77 to 79
"frescobaldi.1", "LICENSE", "THANKS", "TODO",
"linux/org.frescobaldi.Frescobaldi.desktop",
"linux/org.frescobaldi.Frescobaldi.metainfo.xml"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly works for me now, but can skip these 3 lines, no-op given it doesn't find these files if not under frescobaldi/ subdir, and besides it's not meant to be installed under site-packages (that can be handled by distros to install in the doc/mandir and similar, and are otherwise not needed for runtime).

But believe still missing background.html (referenced by svgview/view.py) and maybe need index.theme for tango?

For the record here's the list of files that were not installed (things like README/Makefile wouldn't be needed, xcf is a gimp file so not that either, imagine .ico/icns isn't directly used but haven't checked).

-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_cs_CZ.txt
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_da_DK.txt
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_de_DE.txt
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_el_GR.txt
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_en_CA.txt
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_en_GB.txt
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_es_ES.txt.gz
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_fi_FI.txt
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_ga_IE.txt
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_hu_HU.txt
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_id_ID.txt.gz
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_is_IS.txt
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_nl_NL.txt
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_nn_NO.txt
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_pl_PL.txt
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_pt_BR.txt
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_pt_PT.txt
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_ru_RU.txt
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_sk_SK.txt
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_sv_SE.txt.gz
-usr/lib/python3.12/site-packages/frescobaldi/hyphdicts/README_hyph_uk_UA.txt
-usr/lib/python3.12/site-packages/frescobaldi/icons/Tango/README
-usr/lib/python3.12/site-packages/frescobaldi/icons/Tango/index.theme
-usr/lib/python3.12/site-packages/frescobaldi/icons/TangoExt/README
-usr/lib/python3.12/site-packages/frescobaldi/icons/TangoExt/index.theme
-usr/lib/python3.12/site-packages/frescobaldi/icons/org.frescobaldi.Frescobaldi.icns
-usr/lib/python3.12/site-packages/frescobaldi/icons/org.frescobaldi.Frescobaldi.ico
-usr/lib/python3.12/site-packages/frescobaldi/scorewiz/Makefile
-usr/lib/python3.12/site-packages/frescobaldi/splashscreen/splash.xcf
-usr/lib/python3.12/site-packages/frescobaldi/svgview/background.html
-usr/lib/python3.12/site-packages/frescobaldi/symbols/Makefile
-usr/lib/python3.12/site-packages/frescobaldi/userguide/README

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, thanks for catching it.
.ico and .icns are needed for Windows and macOS packaging.

Please let me know if the last commit is Ok.

We cannot rely on setuptools-scm to include the package
data files, because Linux distributions build from
tarballs (no git).
The list of files was previously handled by MANIFEST.in
but we can use pyproject.toml.

Use a SPDX license identifier.

Fixes #1898
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.

Installing 4.0.0 from source misses installing several files

3 participants