spotfiresoftware / spotfire-python

Package for Building Python Extensions to Spotfire®
Other
18 stars 6 forks source link

Creating packages SPK from wheels with '.data' directory results in missing files #40

Closed bbassett-tibco closed 1 year ago

bbassett-tibco commented 1 year ago

When a packages SPK is being built (using python -m spotfire.spk packages pkg.spk req.txt) using wheels that have a .data directory (for example, xgboost version 1.7.5 on Windows) results in an SPK file that does not contain the Python files from the wheel (it just contains the files from the .data directory).

bbassett-tibco commented 1 year ago

It looks like the combination of --upgrade and --target to pip install is not well supported. pypa/pip#8063 looks like the underlying issue in our case, with the exception that the directory being replaced is not bin (as in the pip issue), but xgboost's main python files being replaced by xgboost's .data directory.

Lucklily, we no longer depend on the parsing of pip output during the assembly of SPK packages to determine installed Python package versions (as a result of work done in cb55ceea93a1c7a1e2f9460921a47ab98edcf026). (The --upgrade option was specified to silence a warning from pip from appearing on the last line of the output, and confusing the SPK versioning update logic.) Removing the --upgrade option from pip calls creates the proper SPK package contents, but will expose the pip warning to the user.