Mercurial > cpython-lru_cache-weakref
diff setup.py @ 72011:b5ccdf7c032a
Issue #12326: refactor usage of sys.platform
* Use str.startswith(tuple): I didn't know this Python feature, Python rocks!
* Replace sometimes sys.platform.startswith('linux') with
sys.platform == 'linux'
* sys.platform doesn't contain the major version on Cygwin on Mac OS X
(it's just 'cygwin' and 'darwin')
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Sun, 21 Aug 2011 00:39:18 +0200 |
| parents | 50f1922bc1d5 |
| children | 70a0c602099e |
line wrap: on
line diff
--- a/setup.py Sun Aug 21 00:16:49 2011 +0200 +++ b/setup.py Sun Aug 21 00:39:18 2011 +0200 @@ -363,9 +363,8 @@ def get_platform(self): # Get value of sys.platform - for platform in ['cygwin', 'darwin', 'osf1']: - if sys.platform.startswith(platform): - return platform + if sys.platform.startswith('osf1'): + return 'osf1' return sys.platform def add_multiarch_paths(self):
