Include data files only in source distribution

Make Poetry include data files only in the source distribution, and not
on our wheels. This mainly makes RPM packaging a bit easier, but does
not solve the problem of how to install files to
`/usr/share/dangerzone`.

Also, include files using globs, which is the way Poetry prefers.

Fixes #678
Refs #677
This commit is contained in:
Alex Pyrgiotis 2024-01-18 19:21:11 +02:00
parent 067e787a3d
commit d854657883
No known key found for this signature in database
GPG key ID: B6C15EBA0357C9AA
2 changed files with 5 additions and 11 deletions

View file

@ -254,13 +254,6 @@ install -m 755 -d %{buildroot}/etc/qubes-rpc
install -m 755 qubes/* %{buildroot}/etc/qubes-rpc install -m 755 qubes/* %{buildroot}/etc/qubes-rpc
%endif %endif
# The following files are included in the top level of the Python source
# distribution, but they are moved in other places in the final RPM package.
# They are considered stale, so remove them to appease the RPM check that
# ensures there are no unhandled files.
rm %{buildroot}/%{python3_sitelib}/README.md
rm -r %{buildroot}%{python3_sitelib}/install
%files -f %{pyproject_files} %files -f %{pyproject_files}
/usr/bin/dangerzone /usr/bin/dangerzone
/usr/bin/dangerzone-cli /usr/bin/dangerzone-cli

View file

@ -4,11 +4,12 @@ version = "0.5.1"
description = "Take potentially dangerous PDFs, office documents, or images and convert them to safe PDFs" description = "Take potentially dangerous PDFs, office documents, or images and convert them to safe PDFs"
authors = ["Freedom of the Press Foundation <info@freedom.press>", "Micah Lee <micah.lee@theintercept.com>"] authors = ["Freedom of the Press Foundation <info@freedom.press>", "Micah Lee <micah.lee@theintercept.com>"]
license = "AGPL-3.0" license = "AGPL-3.0"
# NOTE: See also https://github.com/freedomofpress/dangerzone/issues/677
include = [ include = [
"share/", { path = "share/*", format = "sdist" },
"qubes/", { path = "qubes/*", format = "sdist" },
"install/linux/press.freedom.dangerzone.*", { path = "install/linux/press.freedom.dangerzone.*", format = "sdist" },
"README.md" { path = "README.md", format = "sdist" },
] ]
[tool.poetry.dependencies] [tool.poetry.dependencies]