[Python-modules-commits] [python-qtpy] 01/08: Imported Upstream version 1.0

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Mar 24 18:43:02 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository python-qtpy.

commit 99b1c37f36bb989a331ddfe9688244bf48a59889
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Thu Mar 24 09:45:25 2016 +0000

    Imported Upstream version 1.0
---
 .travis.yml                   |  2 +-
 CHANGELOG.md                  |  5 +++++
 CHANGELOG.rst                 |  0
 CONTRIBUTING.rst              |  0
 README.md                     | 44 ++++++++++++++++++++++++-------------------
 RELEASE.md                    | 30 ++++++++++++-----------------
 conda.recipe/meta.yaml        |  3 ++-
 docs/index.md                 |  0
 qtpy/QtWebEngineWidgets.py    | 40 +++++++++++++++++++++++++++++++++++++++
 qtpy/QtWebKit.py              | 30 -----------------------------
 qtpy/QtWidgets.py             | 10 ++++++++++
 qtpy/_version.py              |  2 +-
 qtpy/widgets/__init__.py      |  0
 tests/README.md               |  0
 tests/{travis.py => tests.py} |  3 ++-
 15 files changed, 98 insertions(+), 71 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 915b93a..90acd7e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -68,4 +68,4 @@ install:
 before_script:
   - cd tests
 script:
-  - python travis.py
+  - python tests.py
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..139fac6
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,5 @@
+# History of changes
+
+## Version 1.0
+
+First stable release
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
deleted file mode 100644
index e69de29..0000000
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
deleted file mode 100644
index e69de29..0000000
diff --git a/README.md b/README.md
index 1422c27..ddb6126 100644
--- a/README.md
+++ b/README.md
@@ -1,38 +1,44 @@
-QtPy: Abtraction layer for PySide/PyQt4/PyQt5
----------------------------------------------
+## QtPy: Abtraction layer for PySide/PyQt4/PyQt5
 
 **QtPy** (pronounced *'cutie pie'*) is a small abstraction layer that lets you
-write applications using a single api call to either PyQt or PySide. **QtPy**
-also provides a set of additional QWidgets.
+write applications using a single API call to either PyQt or PySide.
 
 It provides support for PyQt5, PyQt4 and PySide using the PyQt5 layout (where
 the QtGui module has been split into QtGui and QtWidgets).
 
-Basically, you write your code as if you were using PyQt5 but import qt from
-``qtpy`` instead of ``PyQt5``.
+Basically, you write your code as if you were using PyQt5 but import Qt modules
+from `qtpy` instead of `PyQt5`.
 
-Attribution and acknowledgements
---------------------------------
 
-This project is based on the **[pyqode.qt](https://github.com/pyQode/pyqode.qt)** project and the *[spyderlib.qt](https://github.com/spyder-ide/spyder/tree/master/spyderlib/qt)*
-module from the **[spyder](https://github.com/spyder-ide/spyder)** project.
+### Attribution and acknowledgements
 
-Unlike **pyqode.qt** this is not a namespace package so it is not *tied*
-to a particular project, or namespace.
+This project is based on the [pyqode.qt](https://github.com/pyQode/pyqode.qt)
+project and the [spyderlib.qt](https://github.com/spyder-ide/spyder/tree/2.3/spyderlib/qt)
+module from the [Spyder](https://github.com/spyder-ide/spyder) project.
 
-License
--------
+Unlike `pyqode.qt` this is not a namespace package so it is not tied
+to a particular project or namespace.
+
+
+### License
 
 This project is licensed under the MIT license.
 
-Requirements
-------------
-You need *PyQt5* or *PyQt4* or *PySide* installed on your system to make use
+
+### Requirements
+
+You need PyQt5 or PyQt4 or PySide installed on your system to make use
 of QtPy.
 
-Installation
-------------
+
+### Installation
 
 ```bash
 pip install qtpy
 ```
+
+or
+
+```bash
+conda install -c spyder-ide qtpy
+```
diff --git a/RELEASE.md b/RELEASE.md
index 6274c93..a9b261f 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -1,25 +1,19 @@
 To release a new version of qtpy on PyPI:
 
-* Install `twine`
+* Update `_version.py` (set release version, remove 'dev0')
 
-```python
-pip install twine
-```
+* git add and git commit
 
-* Update `_version.py` (set release version, remove 'dev')
+* python setup.py sdist upload
 
-```python
-git add .
-git commit -m 'comment'
-twine upload dist/*
-git tag -a vX.X.X -m 'comment'
-```
+* python setup.py bdist_wheel upload
 
-* Update `_version.py` (add 'dev' and increment minor)
+* git tag -a vX.X.X -m 'comment'
 
-```python
-git add .
-git commit -m 'comment'
-git push
-git push --tags
-```
+* Update `_version.py` (add 'dev0' and increment minor)
+
+* git add and git commit
+
+* git push
+
+* git push --tags
diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml
index e48641b..4fa640a 100644
--- a/conda.recipe/meta.yaml
+++ b/conda.recipe/meta.yaml
@@ -4,10 +4,11 @@ package:
 
 source:
   git_url: ../
-  git_tag: {{ environ.get('GIT_DESCRIBE_TAG') }}
+  git_tag: {% if environ.get('PRERELEASE') == 'True' %} master {% else %} {{ environ.get('GIT_DESCRIBE_TAG') }} {% endif %}
 
 build:
   noarch_python: True
+  number: {% if environ.get('PRERELEASE') == 'True' %} {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} {% else %} 0 {% endif %}
 
 requirements:
   build:
diff --git a/docs/index.md b/docs/index.md
deleted file mode 100644
index e69de29..0000000
diff --git a/qtpy/QtWebEngineWidgets.py b/qtpy/QtWebEngineWidgets.py
new file mode 100644
index 0000000..5aee4bc
--- /dev/null
+++ b/qtpy/QtWebEngineWidgets.py
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright © 2014-2015 Colin Duquesnoy
+# Copyright © 2009- The Spyder development Team
+#
+# Licensed under the terms of the MIT License
+# (see LICENSE.txt for details)
+
+"""
+Provides QtWebEngineWidgets classes and functions.
+"""
+
+import os
+
+from qtpy import QT_API
+from qtpy import PYQT5_API
+from qtpy import PYQT4_API
+from qtpy import PYSIDE_API
+from qtpy import PythonQtError
+
+
+if os.environ[QT_API] in PYQT5_API:
+    try:
+        from PyQt5.QtWebEngineWidgets import QWebEnginePage
+        from PyQt5.QtWebEngineWidgets import QWebEngineView
+        from PyQt5.QtWebEngineWidgets import QWebEngineSettings
+    except ImportError:
+        from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
+        from PyQt5.QtWebKitWidgets import QWebView as QWebEngineView
+        from PyQt5.QtWebKit import QWebSettings as QWebEngineSettings 
+elif os.environ[QT_API] in PYQT4_API:
+    from PyQt4.QtWebKit import QWebPage as QWebEnginePage
+    from PyQt4.QtWebKit import QWebView as QWebEngineView
+    from PyQt4.QtWebKit import QWebSettings as QWebEngineSettings
+elif os.environ[QT_API] in PYSIDE_API:
+    from PySide.QtWebKit import QWebPage as QWebEnginePage
+    from PySide.QtWebKit import QWebView as QWebEngineView
+    from PySide.QtWebKit import QWebSettings as QWebEngineSettings
+else:
+    raise PythonQtError('No Qt bindings could be found')
diff --git a/qtpy/QtWebKit.py b/qtpy/QtWebKit.py
deleted file mode 100644
index c2c0363..0000000
--- a/qtpy/QtWebKit.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright © 2014-2015 Colin Duquesnoy
-# Copyright © 2009- The Spyder development Team
-#
-# Licensed under the terms of the MIT License
-# (see LICENSE.txt for details)
-
-"""
-Provides QtWebkit classes and functions.
-"""
-
-import os
-
-from qtpy import QT_API
-from qtpy import PYQT5_API
-from qtpy import PYQT4_API
-from qtpy import PYSIDE_API
-from qtpy import PythonQtError
-
-
-if os.environ[QT_API] in PYQT5_API:
-    from PyQt5.QtWebKitWidgets import QWebPage, QWebView
-    from PyQt5.QtWebKit import QWebSettings
-elif os.environ[QT_API] in PYQT4_API:
-    from PyQt4.QtWebKit import QWebPage, QWebView, QWebSettings
-elif os.environ[QT_API] in PYSIDE_API:
-    from PySide.QtWebKit import *
-else:
-    raise PythonQtError('No Qt bindings could be found')
diff --git a/qtpy/QtWidgets.py b/qtpy/QtWidgets.py
index 9a9de3a..6693793 100644
--- a/qtpy/QtWidgets.py
+++ b/qtpy/QtWidgets.py
@@ -28,6 +28,7 @@ elif os.environ[QT_API] in PYQT4_API:
     from PyQt4.QtGui import *
     QStyleOptionViewItem = QStyleOptionViewItemV4
 
+    # These objects belong to QtGui
     del (QAbstractTextDocumentLayout, QActionEvent, QBitmap, QBrush, QClipboard,
          QCloseEvent, QColor, QConicalGradient, QContextMenuEvent, QCursor,
          QDesktopServices, QDoubleValidator, QDrag, QDragEnterEvent,
@@ -57,12 +58,17 @@ elif os.environ[QT_API] in PYQT4_API:
          QWheelEvent, QWindowStateChangeEvent, qAlpha, qBlue, qFuzzyCompare,
          qGray, qGreen, qIsGray, qRed, qRgb, qRgba)
 
+    # These objects belong to QtPrintSupport
     del (QAbstractPrintDialog, QPageSetupDialog, QPrintDialog, QPrintEngine,
          QPrintPreviewDialog, QPrintPreviewWidget, QPrinter, QPrinterInfo)
+
+    # These objects belong to QtCore
+    del (QItemSelection, QItemSelectionRange, QSortFilterProxyModel)
 elif os.environ[QT_API] in PYSIDE_API:
     from PySide.QtGui import *
     QStyleOptionViewItem = QStyleOptionViewItemV4
 
+    # These objects belong to QtGui
     del (QAbstractTextDocumentLayout, QActionEvent, QBitmap, QBrush, QClipboard,
          QCloseEvent, QColor, QConicalGradient, QContextMenuEvent, QCursor,
          QDesktopServices, QDoubleValidator, QDrag, QDragEnterEvent,
@@ -92,7 +98,11 @@ elif os.environ[QT_API] in PYSIDE_API:
          QWheelEvent, QWindowStateChangeEvent, qAlpha, qBlue, qGray, qGreen,
          qIsGray, qRed, qRgb, qRgba)
 
+    # These objects belong to QtPrintSupport
     del (QAbstractPrintDialog, QPageSetupDialog, QPrintDialog, QPrintEngine,
          QPrintPreviewDialog, QPrintPreviewWidget, QPrinter, QPrinterInfo)
+
+    # These objects belong to QtCore
+    del (QItemSelection, QItemSelectionRange, QSortFilterProxyModel)
 else:
     raise PythonQtError('No Qt bindings could be found')
diff --git a/qtpy/_version.py b/qtpy/_version.py
index 4f208eb..dcbb50e 100644
--- a/qtpy/_version.py
+++ b/qtpy/_version.py
@@ -1,2 +1,2 @@
-version_info = (1, 0, 'b1')
+version_info = (1, 0)
 __version__ = '.'.join(map(str, version_info))
diff --git a/qtpy/widgets/__init__.py b/qtpy/widgets/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/README.md b/tests/README.md
deleted file mode 100644
index e69de29..0000000
diff --git a/tests/travis.py b/tests/tests.py
similarity index 63%
rename from tests/travis.py
rename to tests/tests.py
index 127528e..a45cae9 100644
--- a/tests/travis.py
+++ b/tests/tests.py
@@ -2,9 +2,10 @@ import os
 
 os.environ['QT_API'] = os.environ['USE_QT_API'].lower()
 
-from qtpy import QtCore, QtGui, QtWidgets
+from qtpy import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
 
 print('Qt version:%s' % QtCore.__version__)
 print(QtCore.QEvent)
 print(QtGui.QPainter)
 print(QtWidgets.QWidget)
+print(QtWebEngineWidgets.QWebEnginePage)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-qtpy.git



More information about the Python-modules-commits mailing list