I am working on adding support for building and distributing (via PyPI) Python Wheels with C Extensions to the Python wheel and pip packages. The discussion on Distutils-SIG continues, but I believe it is fairly certain that some effort to correctly identify Linux distributions will need to be made. I've begun efforts to add this support to wheel.
If you have a Linux distribution or version of a listed distribution not in this gist, or one of the ones I have not directly verified, I could use the following:
- The contents of
/etc/os-release
, if it exists - Whether or not the
lsb_release
program is installed, and whether it's part of a "default" install - The output of
lsb_release -a
if installed - The contents of
/etc/lsb-release
, if it exists - The contents of any other
/etc/*-release
files - Any other reliable way to determine the flavor and version of your Linux distribution, especially if none of the above exist
And finally, you can test the platform detection on your platform by downloading and installing (e.g. in a virtualenv) lionshead and running:
% python -c 'import lionshead; print lionshead.get_specific_platform()'
e.g.:
% pip install -e 'hg+https://bitbucket.org/natefoo/wheel#egg=wheel'
% python -c 'import wheel.pep425tags; print wheel.pep425tags.get_platforms()'
['linux_x86_64_ubuntu_14_04', 'linux_x86_64', 'any']
If lsb_release
is optional on your system and especially if /etc/os-release
does not exist, it'd be even more helpful to run the above prior to installing lsb_release
, and again afterward.
Synology DSM
Synology doesn't have
/etc/*-release
orlsb_release
.info
It's a custom GNU/Linux kernel. See:
detection
Detectable by lots of
/etc/syno*
,/usr/syno/*
,/proc/syno*
, etc. files.On a Synology 1621+ NAS device, which has V1000 CPU architecture, if it's running DSM version 7.0-41890 (which has a modified Linux kernel 4.4.180), you get this (custom name and serial redacted with identical format):
/usr/bin/uname -a
Relevant extracts of files:
/etc/synoinfo.conf
/etc/avahi/services/dsminfo.service
/etc/VERSION
/proc/cpuinfo
/proc/syno_cpu_arch
/proc/syno_platform
/proc/version