Hi!
Looking at the asdf-astropy package, this is a bug in the upstream build
system.
The sequence of steps for building with pybuild's
pybuild-plugin-pyproject plugin is that the upstream build system is
asked to make a wheel, and then python3-installer unpacks the wheel;
looking at the wheels that the upstream build system is producing, they
are missing the data files and python3-installer is faithfully unpacking
these wheels. (Hence reassigning back to src:asdf-astropy.)
The bug is that the upstream build system sometimes produces wheels that
do not contain all the files. Getting data files into packages is
notoriously difficult. There are many sharp edges.
Where setuptools_scm is used, as in asdf-astropy:
- when run inside a git checkout with git installed, all the data files
that are checked into git get included in the wheel.
- when run outside of a git checkout or when git is not installed, the
other setuptools config (pyproject.toml and MANIFEST.in) is used to
find the package files.
The latter accounts for your observation that it depends on what
packages are installed, particularly on the presence of git.
Looking at the config for asdf-astropy, there is not enough config for
setuptools (outside setuptools_scm) to pick up the data files and so
they are missing when built outside of a git checkout.
There are lots of ways to fix this and one needs to figure out
precedence rules across the multiple difference places it can be
configured. In the attached patch, I push the data files into the wheel
by explicitly including it as a 'graft' in MANIFEST.in [1].
[1]
https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html#using-manifest-in
The balance of the attached patch just lets pybuild install the module
as normal.
I see in the packaging that the tests are currently suppressed in
d/rules. The tests would currently fail if the wheel does not contain
all the files because the tests are run against unpacked wheel in
.pybuild/ (not the source - the purpose is to test the packaging, not
test that upstream's CI works). I've not looked at enabling these tests
as it looks like a bit of knowledge about various pytest plugins and
asdf plugins is needed for that.
regards
Stuart