Better handle package data for conda build #467
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current conda-forge build is missing a critical "package data" file. This PR explicitly calls out
*.yml
and*.yaml
files insidesrc/RAiDER
as package data so they are included in the archive.NOTE: while a
MANIFEST.in
works forpip
andsetuptools
everywhere outside of conda, conda-build would still not include the package data in the conda build. This is the only method that I could get to work.Explicitely calling out the package data, or including a
MANIFEST.in
, isn't supposed to be needed because everything is included viasetuptools_scm
. Importantly, when building the RAiDER distributionsetuptools_scm
uses thegit
history (tags, tracked files) to define the package version and included files and produces a built src or binary distribution, which pip uses to install the package.when building the conda package, we're not actually cloning the repo, but instead downloading a git archive with does not include the
git
history. For the package version, we explicitly tellsetuptools_scm
which version to use:https://github.com/conda-forge/raider-feedstock/blob/main/recipe/meta.yaml#L14
But we also need to explicitly tell it what files to include, which is what this PR does.
Alternatively we could switch to building the conda package from distribution published to PyPI, which will include metadata describing the version package files to include, but
pip
installs from PyPI won't work (easily at least) as we have dependencies that are conda-forge only (e.g., ISCE3) and compiled extensions (we'd need to build binary distributions for a variety of architectures). This is not a good user experience so we shouldn't do this unless we do the work to make installing from PyPI relatively easy.