freedomofpress / dangerzone

Take potentially dangerous PDFs, office documents, or images and convert them to safe PDFs
https://dangerzone.rocks/
GNU Affero General Public License v3.0
3.39k stars 155 forks source link

Fix failing RPM builds due to files ignored by Git #679

Closed apyrgio closed 5 months ago

apyrgio commented 6 months ago

Fix failing RPM builds by doing the following:

  1. Remove .gitignore from a dir where Poetry would ultimately build our Python wheel.
  2. Include data files only on sdist, and in a way that Poetry understands.

Fixes #678 Refs #677

deeplow commented 5 months ago

On another discussion you also mentioned:

Turns out that Poetry will silently ignore everything and create an empty wheel, without any indication in the logs. If you don't have git installed, or do this from any other path in your system, Poetry will create a functional wheel. See https://github.com/python-poetry/poetry/issues/2809.

Do you want to add an assert that git exists? It'll be kind of an edge-case but might be worth referencing somewhere since you came across it.

apyrgio commented 5 months ago

We can't assert that Git exists, because it's not a requirement for build our RPM packages. Actually, some of our CI runners don't have Git installed, which is why we could build RPM packages all this time.