I have a Python package that can only run effectively on Linux. I saw in docs that there is a key platforms
in the metadata setup.py
, but as far as I can tell from the jolting in the source distutils
, this metadata is actually not used for anything.
Then I went and looked at PyObjC, the famous X-only Python package. I noticed that it fills the above platforms
key in setup.py
. However, when I try to install PyObjC on Linux, the installation is not prevented or blocked in any deliberate way. Failed failure mode: it fails when it platform.mac_ver()
returns a value that it does not expect. I tried to fix this problem manually, and distutils
it seemed to be going with my fun way of collecting dependencies, etc., So far, in the end, I could not find a specific platform file ... The bottom line distutils
does not process packages for a specific platform by any reasonable way.
Ideally, I expected the installation to complete with some message indicating that the package is not compatible with the current platform. I was a little bothered, and the "best" thing that I could think of, includes subclassing teams install
and develop
and manual test platform.
Is there a better way?
source
share