Skip to content

Commit

Permalink
Migrate spyderlib/__init__.py to qtpy
Browse files Browse the repository at this point in the history
  • Loading branch information
goanpeca committed Apr 10, 2016
1 parent ab62e84 commit 9fdd69c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions spyderlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ def get_versions(reporev=True):
"""Get version information for components used by Spyder"""
import sys
import platform
import spyderlib.qt
import spyderlib.qt.QtCore

import qtpy
import qtpy.QtCore

revision = None
if reporev:
Expand All @@ -74,14 +75,14 @@ def get_versions(reporev=True):
system = platform.system()
else:
system = 'Darwin'

return {
'spyder': __version__,
'python': platform.python_version(), # "2.7.3"
'bitness': 64 if sys.maxsize > 2**32 else 32,
'qt': spyderlib.qt.QtCore.__version__,
'qt_api': spyderlib.qt.API_NAME, # PyQt5 or PyQt4
'qt_api_ver': spyderlib.qt.__version__,
'qt': qtpy.QtCore.__version__,
'qt_api': qtpy.API_NAME, # PyQt5 or PyQt4

This comment has been minimized.

Copy link
@Macer3

Macer3 Jun 10, 2016

I get an error in this line

$ python bootstrap.py
Executing Spyder from source checkout
Revision 28794ef, Branch: master

  1. Patched sys.path with D:\Documents\PythonS\trygit\spyder
  2. PyQt5 is detected, selecting
    Traceback (most recent call last):
    File "bootstrap.py", line 140, in
    versions = get_versions(reporev=False)
    File "D:\Documents\PythonS\trygit\spyder\spyderlib__init__.py", line 85, in get_versions
    'qt_api': qtpy.API_NAME, # PyQt5 or PyQt4
    AttributeError: 'module' object has no attribute 'API_NAME'

This comment has been minimized.

Copy link
@jitseniesen

jitseniesen Jun 10, 2016

Member

@Macer3 what version of qtpy do you have installed? I think you may need to upgrade qtpy.

'qt_api_ver': qtpy.__version__,
'system': system, # Linux, Windows, ...
'revision': revision, # '9fdf926eccce'
}

1 comment on commit 9fdd69c

@Macer3
Copy link

@Macer3 Macer3 commented on 9fdd69c Jun 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.1.3
I reinstall it, problem solved. Thank you!

Please sign in to comment.