facebook / facebook/prophet

Issue with non-cross-platform wheels generated by setup.py

Open
#1,980 1 comment 3 reactions 0 assignees View on GitHub
install py
Dominant language
Python
Stars
20.4k
Forks
4.6k
Avg merge
19h 52m
Merged PRs (30d)
1

Description

Hello.

We have got an issue with the Python package building and usage in a cross-platform scenario.

Running `python setup.py bdist_wheel` generates a `prophet-1.0.1-py3-none-any.whl`, a wheel containing the package one can install and distribute.

The produced whl file is marked as "pure", i.e. platform-independent (as says "any" suffix). This implies that, once uploaded to a Python package repository, it can be installed and used on any platform (any OS/CPU).

However, as far as I understand, the wheel contains a pickle file with a compiled STAN model. The compiled model is not cross-platform by itself and so is the wheel then.

Namely, a wheel built on mac can be installed on a linux machine with `pip install`. However, when using the package, we run into an exception preceded by the following warning:
> [2021-07-30T15:13:38.400Z] WARNING pystan:model.py:438 Something went wrong while unpickling the StanModel. Consider recompiling.

This becomes a real issue, for example, when a local Python repository is used to distribute prebuilt packages across machines with different OS.

We would like `setup.py` being able to build a wheel tagged properly according to the platform it is built on, with PEP425 platform tag instead of "any", e.g.
* prophet-1.0.1-py3-none-linux_x86_64.whl
* prophet-1.0.1-py3-none-macosx_11_0_x86_64.whl
etc.

We can submit a PR to fix this. Please let me know if this is of interest.

Thanks,
Max

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.