Skip to content

Commit

Permalink
Fix #311 (#316)
Browse files Browse the repository at this point in the history
* Fix #311

Add check for sys.platform == 'cli' and set os to 'Windows'.

* Remove workaround
  • Loading branch information
slide committed Feb 7, 2018
1 parent 45087eb commit 50ad7fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@ dist: trusty

osx_image: xcode9.1

dotnet: 2.0.0
dotnet: 2.1.4

script:
# remove this workaround when https://bugzilla.xamarin.com/show_bug.cgi?id=60340 is fixed and released
- if [[ "$TRAVIS_OS_NAME" != "osx" ]] ; then (cd /usr/lib/mono/msbuild/15.0/bin/Roslyn ; sudo ln -s ../../../../4.5/csc.exe . ; sudo ln -s ../../../../4.5/csc.exe.config . ; sudo ln -s ../../../../4.5/csc.rsp .) ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then (cd /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/Roslyn/ ; sudo ln -s ../../../../4.5/csc.exe . ; sudo ln -s ../../../../4.5/csc.exe.config . ; sudo ln -s ../../../../4.5/csc.rsp .) ; fi
- dotnet restore IronPython.sln --packages ./packages
- if [[ "$TRAVIS_OS_NAME" != "osx" ]] ; then make ; fi
- if [[ "$TRAVIS_OS_NAME" != "osx" ]] ; then docker run -v /home/travis/build/IronLanguages/ironpython2:/home/travis/build/IronLanguages/ironpython2 mono:4.8 /bin/sh -c "apt-get update ; apt-get install make ; cd /home/travis/build/IronLanguages/ironpython2 && make test-all" ; fi
Expand Down
4 changes: 4 additions & 0 deletions Src/StdLib/Lib/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -1210,6 +1210,10 @@ def uname():
if not version:
version = vendor

elif system == 'cli':
# we know this is Windows, because uname exists on Linux and macOS
system = 'Windows'

# System specific extensions
if system == 'OpenVMS':
# OpenVMS seems to have release and version mixed up
Expand Down

0 comments on commit 50ad7fd

Please sign in to comment.