Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

could you add this platform 'gnukfreebsd9' #51

Closed
picca opened this issue Sep 5, 2016 · 4 comments
Closed

could you add this platform 'gnukfreebsd9' #51

picca opened this issue Sep 5, 2016 · 4 comments

Comments

@picca
Copy link

picca commented Sep 5, 2016

This is in order to build pytango on the kfreebsd port of debian.

sys.platform
'gnukfreebsd9'

Usually for each new version of the kfreebsd kenel the number is increased, so maybe the best solution is to check only for gnukfreebsd.

thanks

@picca
Copy link
Author

picca commented Sep 5, 2016

another platform is hurd.

import sys
sys.platform
'gnu0'

@vxgmichel
Copy link
Contributor

vxgmichel commented Sep 5, 2016

For the record, here's the list of the tests we perform in setup.py:

posix = 'posix' in os.name
linux = 'linux' in sys.platform
dist_name = platform.linux_distribution()[0].lower()
debian = 'debian' in dist_name or 'ubuntu' in dist_name or 'mint' in dist_name
gentoo ='gentoo' in dist_name
redhat = 'fedora' in dist_name or 'centos' in dist_name

I suggest we replace all linux occurrences with posix and use platform.platform() instead of platform.linux_distribution() since it will be deprecated in python 3.6:

posix = 'posix' in os.name
windows = 'nt' in os.name
platform_name = platform.platform().lower()
debian = any(x in platform_name for x in ['debian', 'ubuntu', 'mint'])
redhat = any(x in platform_name for x in ['redhat', 'fedora', 'centos'])
gentoo = any(x in platform_name for x in ['gentoo'])

What do you think @tiagocoutinho ?

@tiagocoutinho
Copy link
Contributor

tiagocoutinho commented Sep 6, 2016

Ok with me. Thanks for the cleanup @vxgmichel.

@picca, can you make a PR or would you prefer one of us adds the gnukfreebsd and gnu0 support?

@picca
Copy link
Author

picca commented Sep 6, 2016

Hello, no thanks I prefer to let @vxgmichel do the job. I am more confident that he would do the right thing ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants