Skip to content

Commit

Permalink
mock PySide6 on RTD, add __version_info__ and remove extra_requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
jborbely committed Jun 2, 2021
1 parent e94da0e commit 96016b1
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@ python:
install:
- method: pip
path: .
extra_requirements:
- PySide6
system_packages: false
87 changes: 87 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,93 @@
on_rtd = os.getenv('READTHEDOCS') == 'True'
if on_rtd:
html_theme = 'default'

class QtWidgets(object):

class QWidget(object):
pass

class QAbstractButton(object):
pass

class QToolButton(object):
pass

class QDialog(object):
exec_ = None

class QTableWidget(object):
pass

class QTreeWidget(object):
pass

class QMainWindow(object):
pass

class QMenu(object):
pass

class QLineEdit(object):
Normal = 0

class QDoubleSpinBox(object):
pass

class QSpinBox(object):
pass

class QApplication(object):
exec_ = None

class QtCore(object):

__version__ = ''
__version_info__ = tuple()

class Qt(object):
KeepAspectRatio = 1

class QThread(object):
pass

class QObject(object):
pass

@staticmethod
def pyqtSignal(*args, **kwargs):
pass

@staticmethod
def pyqtSlot(*args, **kwargs):
pass

@staticmethod
def Signal(*args, **kwargs):
pass

@staticmethod
def Slot(*args, **kwargs):
pass

class QtGui(object):

class QValidator(object):
pass

class QtSvg(object):
pass

class PySide6(object):
__version__ = ''
__version_info__ = tuple()

sys.modules['PySide6'] = PySide6
sys.modules['PySide6.QtGui'] = QtGui
sys.modules['PySide6.QtCore'] = QtCore
sys.modules['PySide6.QtWidgets'] = QtWidgets
sys.modules['PySide6.QtSvg'] = QtSvg

else:
html_theme = 'sphinx_rtd_theme'

Expand Down

0 comments on commit 96016b1

Please sign in to comment.