diff --git a/conda-recipe/bld.bat b/conda-recipe/bld.bat new file mode 100644 index 0000000..6021130 --- /dev/null +++ b/conda-recipe/bld.bat @@ -0,0 +1,2 @@ +"%PYTHON%" setup.py install +if errorlevel 1 exit 1 \ No newline at end of file diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh new file mode 100644 index 0000000..8e25a14 --- /dev/null +++ b/conda-recipe/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +$PYTHON setup.py install diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml new file mode 100644 index 0000000..5957a3c --- /dev/null +++ b/conda-recipe/meta.yaml @@ -0,0 +1,42 @@ +package: + name: pyqtconfig + version: "0.8.21" + +source: +# this is used for build from git hub + git_rev: 0.8.21 + git_url: https://github.com/mjirik/pyqtconfig.git + + # build: + # noarch_python: True +# ignore_prefix_files: +# - devel +# - examples + +requirements: + build: + - python + - setuptools + - numpy + - scipy + - pyqt + run: + - python + - numpy + - scipy + - pyqt + +test: + imports: + - pyqtconfig +about: + home: https://github.com/mfitzp/pyqtconfig + license: BSD License + summary: 'An API for keeping PyQT widgets in sync with a config dictionary or QSettings objects' +#about: +# home: https://github.com/mfitzp/pyqtconfig +# license: BSD License +# summary: 'An API for keeping PyQt widgets in sync with a config dictionary or QSettings object.' +# See +# http://docs.continuum.io/conda/build.html for +# more information about meta.yaml diff --git a/pyqtconfig/__init__.py b/pyqtconfig/__init__.py index 27c9ec6..029e198 100644 --- a/pyqtconfig/__init__.py +++ b/pyqtconfig/__init__.py @@ -1 +1,2 @@ from .config import * +__version__ = "0.8.21" diff --git a/pyqtconfig/qt.py b/pyqtconfig/qt.py index 243a715..460b25c 100644 --- a/pyqtconfig/qt.py +++ b/pyqtconfig/qt.py @@ -41,10 +41,17 @@ if USE_QT_PY == PYQT5: from PyQt5.QtGui import * from PyQt5.QtCore import * - from PyQt5.QtWebKit import * + try: + from PyQt5.QtWebKit import * + except: + from PyQt5.QtWebEngine import * + from PyQt5.QtNetwork import * from PyQt5.QtWidgets import * - from PyQt5.QtWebKitWidgets import * + try: + from PyQt5.QtWebKitWidgets import * + except: + pass elif USE_QT_PY == PYSIDE: from PySide.QtGui import * @@ -56,8 +63,12 @@ elif USE_QT_PY == PYQT4: import sip - sip.setapi('QString', 2) - sip.setapi('QVariant', 2) + try: + sip.setapi('QString', 2) + sip.setapi('QVariant', 2) + except: + print("Using QVariant and QString version 1") + pass from PyQt4.QtGui import * from PyQt4.QtCore import * from PyQt4.QtWebKit import * diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..321af72 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,10 @@ +[bumpversion] +current_version = 0.8.21 +files = setup.py conda-recipe/meta.yaml pyqtconfig/__init__.py +commit = True +tag = True +tag_name = {new_version} + +[nosetests] +attr = !interactive,!slow,!LAR + diff --git a/setup.py b/setup.py index 148d8fe..cdb5faf 100755 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='pyqtconfig', - version="0.8.6", + version="0.8.21", author='Martin Fitzpatrick', author_email='martin.fitzpatrick@gmail.com', url='https://github.com/mfitzp/pyqtconfig',