Closed band-a-prend closed 1 year ago
I think for listing data explicitly, there are a few options:
MANIFEST.in
[tool.setuptools.package-data]
in pyproject.toml
setuptools_scm
We already use setuptools_scm
to get the version number, so using it to find tracked files would be great. I'm not sure how to do this exactly.
I've also just come across importlib_resources
, which looks like we should be using that too
It seems it's sufficient to do what warning asks: list mentioned items in packages
, i.e.
[tools.setuptools]
packages = ["ford", "ford.css", "ford.fonts", "ford.js", "ford.templates", "ford.tipuesearch", "ford.tipuesearch.img"]
[tool.setuptools.package-data]
ford = "config.json", "favicon.png"]
I will recheck it and then will rebase the commit.
Are you able to investigate using setuptools_scm
to do this, at all? I suspect that would be the nicest option, as if we ever change the package structure, we wouldn't need to also update pyproject.toml
Are you able to investigate using
setuptools_scm
to do this, at all? I suspect that would be the nicest option, as if we ever change the package structure, we wouldn't need to also updatepyproject.toml
I tried handle problem with setuptools_scm
but without success - as didn't understand how to handle it's file finders.
For Gentoo Linux I package FORD
using PyPi's FORD-6.2.5.tar.gz
(from this page) etc. tarballs.
Maybe to use setuptools_scm
the FORD git source tree is required while PyPi's tarball doesn't contain it.
The presented in tarball MANIFEST.in
seems could be removed. At least I don't see that README.md
and output-example.png
are installed for me by setuptools even without patch. And the other part of it just duplicate the explicit list of additional package data. But if some exclusion is planning later then it could be useful again.
Ah yes, setuptools_scm
would require the git source tree. We might be able to do something fancy like make our own tarball and upload it as an artefact on release, but that seems a lot more complicated than this fix.
If you're happy this works for your use case, let's just go with this
Thanks!
The offered patch is similar to that was early in https://github.com/Fortran-FOSS-Programmers/ford/pull/474 but for
pyproject.toml
.Introduced changes fix setuptools warnings:
The following parts aren't used due to it are applied by default:
P.S. Maybe there is another way to list
data
explicitly instead of