fsfe / reuse-tool

reuse is a tool for compliance with the REUSE recommendations.
https://reuse.software
376 stars 144 forks source link

Improve source distribution #987

Closed khardix closed 2 months ago

khardix commented 3 months ago

I have recently taken maintenance of reuse in Fedora, and these are fixes for two minor issues I ran into while packaging the most current version (3.0.2).

  1. CONTRIBUTING.md is missing from the sdist archive, but is included/used by Sphinx while building docs. So currently the docs cannot be built from sdist.
  2. Our pytest invocation does some black magic with PYTHONPATH, and with the current configuration it leads to bunch of ImportMismatchErrors when the tests are being collected. Swithing to importlib mode (which should be the blessed way nowadays) fixes them and allows the tests to run (successfully on my machine).

    This change looks fine to me, but I'm fine with dropping it if it would cause any issues to anyone else.

khardix commented 3 months ago

The CI tells me that the importlib mode does indeed cause issues; I will probably drop it then. But let me know if that is something you would be interested in the future.

carmenbianca commented 2 months ago

Hi @khardix and thanks for the PR! Apologies for the lack of communication.

I have created #993 to track a switch to importlib. The reason it didn't work when you tried making that change in this repository is because the conftest.py file is imported from by some test files. It's probably worth giving that another look-over.