Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-python-qdatamatrix for 
openSUSE:Factory checked in at 2021-02-20 22:13:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-qdatamatrix (Old)
 and      /work/SRC/openSUSE:Factory/.python-python-qdatamatrix.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-python-qdatamatrix"

Sat Feb 20 22:13:16 2021 rev:2 rq:874041 version:0.1.29

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-python-qdatamatrix/python-python-qdatamatrix.changes
      2019-03-27 16:18:59.783559860 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-python-qdatamatrix.new.28504/python-python-qdatamatrix.changes
   2021-02-20 22:13:17.607103026 +0100
@@ -1,0 +2,16 @@
+Fri Feb 19 19:04:31 UTC 2021 - Ben Greiner <[email protected]>
+
+- Update to 0.1.29
+  * Add read-only
+  * Only fix row and column count when not read-only
+  * Only update visible cells in read-only mode. Dramatically
+    speeds up viewing large datasets
+  * Optimize copy-cut-delete (still slow)
+  * Only update visible cells for writable tables
+  * Fix a visualization issue when scrolling past the last row
+  * Catch IndexError when copying
+  * Fix RuntimeError when pasting cells
+- test with rudimentary example.py
+- adjust requirements
+
+-------------------------------------------------------------------

Old:
----
  python-qdatamatrix-0.1.18.tar.gz

New:
----
  example.py
  python-qdatamatrix-0.1.29.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-python-qdatamatrix.spec ++++++
--- /var/tmp/diff_new_pack.jCWb9S/_old  2021-02-20 22:13:18.119103570 +0100
+++ /var/tmp/diff_new_pack.jCWb9S/_new  2021-02-20 22:13:18.119103570 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-python-qdatamatrix
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,26 +12,36 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
+#
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define skip_python2 1
 Name:           python-python-qdatamatrix
-Version:        0.1.18
+Version:        0.1.29
 Release:        0
-License:        GPL-3.0-or-later
 Summary:        A PyQt4/PyQt5 widget for viewing and editing a DataMatrix 
object
-Url:            https://github.com/smathot/python-qdatamatrix
+License:        GPL-3.0-or-later
 Group:          Development/Languages/Python
+URL:            https://github.com/open-cogsci/python-qdatamatrix
 Source:         
https://files.pythonhosted.org/packages/source/p/python-qdatamatrix/python-qdatamatrix-%{version}.tar.gz
-Source1:        
https://raw.githubusercontent.com/smathot/python-qdatamatrix/master/copyright
-BuildRequires:  python-rpm-macros
+Source1:        
https://raw.githubusercontent.com/open-cogsci/python-qdatamatrix/master/copyright
+Source2:        
https://raw.githubusercontent.com/open-cogsci/python-qdatamatrix/master/example.py
+BuildRequires:  %{python_module PrettyTable}
 BuildRequires:  %{python_module QtPy}
+BuildRequires:  %{python_module fastnumbers}
 BuildRequires:  %{python_module python-datamatrix}
+# QtPy has a number of possible backends, none of them mandatory, use PyQt5 
for the build
+BuildRequires:  %{python_module qt5}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
+BuildRequires:  xvfb-run
+Requires:       python-PrettyTable
 Requires:       python-QtPy
 Requires:       python-python-datamatrix
+Recommends:     python-fastnumbers
 BuildArch:      noarch
 
 %python_subpackages
@@ -43,6 +53,8 @@
 %prep
 %setup -q -n python-qdatamatrix-%{version}
 cp %{SOURCE1} .
+# don't run the event loop on the example
+sed '/app.exec_/ d' %{SOURCE2} > example.py
 
 %build
 %python_build
@@ -51,8 +63,16 @@
 %python_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
+%check
+%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
+xvfb-run $python example.py
+# wait before we start the next xvfb-run
+sleep 5
+}
+
 %files %{python_files}
 %license copyright
-%{python_sitelib}/*
+%{python_sitelib}/qdatamatrix
+%{python_sitelib}/python_qdatamatrix-%{version}*-info
 
 %changelog

++++++ example.py ++++++
#!/usr/bin/env python
#-*- coding:utf-8 -*-

"""
This file is part of qdatamatatrix.

qdatamatatrix is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

qdatamatatrix is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with qdatamatatrix.  If not, see <http://www.gnu.org/licenses/>.
"""

from datamatrix import DataMatrix
from qdatamatrix import QDataMatrix
import sys
from qtpy import QtWidgets
import qtpy

dm = DataMatrix(length=3)
dm.col1 = 1, 2, 3
dm.col2 = 'a', 'b', 'c'
print(dm)

app = QtWidgets.QApplication(sys.argv)
qdm = QDataMatrix(dm)
qdm.resize(600,400)
# qdm.refresh()
qdm.show()
sys.exit(app.exec_())
++++++ python-qdatamatrix-0.1.18.tar.gz -> python-qdatamatrix-0.1.29.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-qdatamatrix-0.1.18/PKG-INFO 
new/python-qdatamatrix-0.1.29/PKG-INFO
--- old/python-qdatamatrix-0.1.18/PKG-INFO      2018-02-06 11:44:25.000000000 
+0100
+++ new/python-qdatamatrix-0.1.29/PKG-INFO      2020-11-26 19:54:29.000000000 
+0100
@@ -1,12 +1,11 @@
 Metadata-Version: 1.1
 Name: python-qdatamatrix
-Version: 0.1.18
+Version: 0.1.29
 Summary: A PyQt4/PyQt5 widget for viewing and editing a DataMatrix object
 Home-page: https://github.com/smathot/python-qdatamatrix
 Author: Sebastiaan Mathot
 Author-email: [email protected]
 License: GNU GPL Version 3
-Description-Content-Type: UNKNOWN
 Description: UNKNOWN
 Platform: UNKNOWN
 Classifier: Development Status :: 4 - Beta
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-qdatamatrix-0.1.18/python_qdatamatrix.egg-info/PKG-INFO 
new/python-qdatamatrix-0.1.29/python_qdatamatrix.egg-info/PKG-INFO
--- old/python-qdatamatrix-0.1.18/python_qdatamatrix.egg-info/PKG-INFO  
2018-02-06 11:44:24.000000000 +0100
+++ new/python-qdatamatrix-0.1.29/python_qdatamatrix.egg-info/PKG-INFO  
2020-11-26 19:54:29.000000000 +0100
@@ -1,12 +1,11 @@
 Metadata-Version: 1.1
 Name: python-qdatamatrix
-Version: 0.1.18
+Version: 0.1.29
 Summary: A PyQt4/PyQt5 widget for viewing and editing a DataMatrix object
 Home-page: https://github.com/smathot/python-qdatamatrix
 Author: Sebastiaan Mathot
 Author-email: [email protected]
 License: GNU GPL Version 3
-Description-Content-Type: UNKNOWN
 Description: UNKNOWN
 Platform: UNKNOWN
 Classifier: Development Status :: 4 - Beta
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-qdatamatrix-0.1.18/python_qdatamatrix.egg-info/SOURCES.txt 
new/python-qdatamatrix-0.1.29/python_qdatamatrix.egg-info/SOURCES.txt
--- old/python-qdatamatrix-0.1.18/python_qdatamatrix.egg-info/SOURCES.txt       
2018-02-06 11:44:24.000000000 +0100
+++ new/python-qdatamatrix-0.1.29/python_qdatamatrix.egg-info/SOURCES.txt       
2020-11-26 19:54:29.000000000 +0100
@@ -11,5 +11,6 @@
 qdatamatrix/_qcontextmenu.py
 qdatamatrix/_qdatamatrix.py
 qdatamatrix/_qspreadsheet.py
+qdatamatrix/_version.py
 qdatamatrix/decorators.py
 qdatamatrix/translate.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-qdatamatrix-0.1.18/qdatamatrix/__init__.py 
new/python-qdatamatrix-0.1.29/qdatamatrix/__init__.py
--- old/python-qdatamatrix-0.1.18/qdatamatrix/__init__.py       2018-02-06 
11:41:44.000000000 +0100
+++ new/python-qdatamatrix-0.1.29/qdatamatrix/__init__.py       2020-04-30 
08:36:18.000000000 +0200
@@ -17,7 +17,5 @@
 along with qdatamatatrix.  If not, see <http://www.gnu.org/licenses/>.
 """
 
-__version__ = '0.1.18'
-
-from datamatrix.py3compat import *
+from qdatamatrix._version import __version__
 from qdatamatrix._qdatamatrix import QDataMatrix
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-qdatamatrix-0.1.18/qdatamatrix/_qcell.py 
new/python-qdatamatrix-0.1.29/qdatamatrix/_qcell.py
--- old/python-qdatamatrix-0.1.18/qdatamatrix/_qcell.py 2017-08-11 
10:44:36.000000000 +0200
+++ new/python-qdatamatrix-0.1.29/qdatamatrix/_qcell.py 2020-11-25 
16:16:38.000000000 +0100
@@ -71,7 +71,12 @@
 
        def update_style(self):
 
-               self.setBackground(QBrush(QColor(CELL_BACKGROUND)))
+               try:
+                       self.setBackground(QBrush(QColor(CELL_BACKGROUND)))
+               except RuntimeError:
+                       # Catch what seems to be a race conditon:
+                       # 
https://github.com/open-cogsci/python-qdatamatrix/issues/7
+                       return
                if self.style == u'numeric':
                        
self.setForeground(QBrush(QColor(CELL_NUMERIC_FOREGROUND)))
                        self.setTextAlignment(Qt.AlignRight)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-qdatamatrix-0.1.18/qdatamatrix/_qcontextmenu.py 
new/python-qdatamatrix-0.1.29/qdatamatrix/_qcontextmenu.py
--- old/python-qdatamatrix-0.1.18/qdatamatrix/_qcontextmenu.py  2016-08-17 
10:31:46.000000000 +0200
+++ new/python-qdatamatrix-0.1.29/qdatamatrix/_qcontextmenu.py  2019-11-16 
21:11:27.000000000 +0100
@@ -108,8 +108,11 @@
 
                QtWidgets.QMenu.__init__(self, parent=spreadsheet)
                self._spreadsheet = spreadsheet
-               self.addAction(QCutAction(self))
+               if not self._spreadsheet.read_only:
+                       self.addAction(QCutAction(self))
                self.addAction(QCopyAction(self))
+               if self._spreadsheet.read_only:
+                       return
                self.addAction(QPasteAction(self))
                self.addSeparator()
                if spreadsheet._selected_rows:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-qdatamatrix-0.1.18/qdatamatrix/_qdatamatrix.py 
new/python-qdatamatrix-0.1.29/qdatamatrix/_qdatamatrix.py
--- old/python-qdatamatrix-0.1.18/qdatamatrix/_qdatamatrix.py   2017-07-20 
15:46:22.000000000 +0200
+++ new/python-qdatamatrix-0.1.29/qdatamatrix/_qdatamatrix.py   2019-11-16 
21:00:48.000000000 +0100
@@ -32,7 +32,7 @@
        cellchanged = QtCore.Signal(int, int)
        changed = QtCore.Signal()
 
-       def __init__(self, dm, parent=None):
+       def __init__(self, dm, parent=None, read_only=False):
 
                """
                desc:
@@ -46,12 +46,15 @@
                        parent:
                                desc:   A parent QWidget, or None for no parent.
                                type:   [QWidget, None]
+                       read_only:
+                               desc:   Makes the matrix read-only.
+                               type:   bool
                """
 
                QtWidgets.QWidget.__init__(self, parent=parent)
                self._dm = dm
                self._dm.sorted = False
-               self._spreadsheet = QSpreadSheet(self)
+               self._spreadsheet = QSpreadSheet(self, read_only=read_only)
                self._layout = QtWidgets.QHBoxLayout(self)
                self._layout.addWidget(self._spreadsheet)
                self._layout.setContentsMargins(0,0,0,0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-qdatamatrix-0.1.18/qdatamatrix/_qspreadsheet.py 
new/python-qdatamatrix-0.1.29/qdatamatrix/_qspreadsheet.py
--- old/python-qdatamatrix-0.1.18/qdatamatrix/_qspreadsheet.py  2018-02-06 
11:40:12.000000000 +0100
+++ new/python-qdatamatrix-0.1.29/qdatamatrix/_qspreadsheet.py  2020-11-26 
17:56:47.000000000 +0100
@@ -36,7 +36,7 @@
                created automatically by QDataMatrix.
        """
 
-       def __init__(self, qdm=None):
+       def __init__(self, qdm=None, read_only=False):
 
                QtWidgets.QTableWidget.__init__(self, parent=qdm)
                self._qdm = qdm
@@ -44,6 +44,7 @@
                self._in_undo_action = False
                self._auto_update = True
                self._silent = False
+               self.read_only = read_only
                self._shortcut(u'Ctrl+Z', self._undo)
                self._shortcut(u'Ctrl+C', self._copy)
                self._shortcut(u'Ctrl+V', self._paste)
@@ -59,7 +60,8 @@
                self.setItemPrototype(QCell())
                self.horizontalHeader().hide()
                self.cellChanged.connect(self._on_cell_changed)
-
+               self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
+               self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
                # Regular expression to catch all newline varieties of various 
OS's
                self.newlines_re = re.compile(r'(\r\n|\r|\n)')
 
@@ -99,11 +101,53 @@
 
                self.clear()
                self._adjust_size()
+               self._last_visible_row = 0
                for colnr, (name, col) in enumerate(self.dm.columns):
                        self._setcell(0, colnr, name)
-                       for rownr, val in enumerate(col):
-                               self._setcell(rownr+1, colnr, val)
+               self._fill_visible_cells()
+                       
+       @silent
+       @fix_cursor
+       @disconnected
+       def verticalScrollbarValueChanged(self, pos):
+               
+               self._fill_visible_cells()
+       
+       @silent
+       @fix_cursor
+       @disconnected
+       def resizeEvent(self, event):
+               
+               self._fill_visible_cells()
+
+       @silent
+       @fix_cursor
+       @disconnected
+       def showEvent(self, event):
+               
+               self._fill_visible_cells()
+                       
+       def _fill_visible_cells(self, fill_all=False):
+
+               if self._last_visible_row == len(self.dm):
+                       return
+               # For performance reasons we don't initialize read-tables 
completely.
+               # This makes it possible to view very larges data structures.
+               last_row = len(self.dm) if fill_all else min(
+                       len(self.dm),
+                       self.rowAt(self.height())
+               )
+               # rowAt() will return -1 when there is no row at that location. 
This
+               # appears to happen when the last visible row is outside of the 
dm, and
+               # then we just fall back to showing all rows.
+               if last_row < 0:
+                       last_row = len(self.dm)
+               for colnr, (name, col) in enumerate(self.dm.columns):
+                       for rownr in range(self._last_visible_row, last_row):
+                               val = col[rownr]
+                               self._setcell(rownr + 1, colnr, val)
                        self._optimize_column_width(colnr)
+               self._last_visible_row = last_row
 
        # Overridden functions
 
@@ -121,12 +165,34 @@
                from qdatamatrix._qcontextmenu import QContextMenu
                QContextMenu(self).exec_(e.globalPos())
 
+       @silent
+       @fix_cursor
+       @disconnected
+       def selectAll(self):
+               
+               """
+               desc:
+                       Selects all existing cells.
+               """
+               
+               self._fill_visible_cells(fill_all=True)
+               self.setRangeSelected(
+                       QtWidgets.QTableWidgetSelectionRange(
+                               0, 0, len(self.dm), len(self.dm.columns) - 1
+                       ),
+                       True
+               )
+
        # Private functions
 
        def _adjust_size(self):
-
-               self.setColumnCount((1+(len(self.dm.columns)+50) // 100) * 100)
-               self.setRowCount(1 + (1+(len(self.dm)+50) // 100) * 100)
+               
+               if self.read_only:
+                       self.setColumnCount(len(self.dm.columns))
+                       self.setRowCount(len(self.dm) + 1)
+               else:
+                       self.setColumnCount((1+(len(self.dm.columns)+50) // 
100) * 100)
+                       self.setRowCount(1 + (1+(len(self.dm)+50) // 100) * 100)
                self.setVerticalHeaderLabels([u'']+ \
                        [str(i) for i in range(1, len(self.dm)+1)]+ \
                        [u'']*(self.rowCount()-len(self.dm)-1))
@@ -174,7 +240,10 @@
        @_cursor_pos.setter
        def _cursor_pos(self, pos):
 
+               selection_ranges = self.selectedRanges()
                self.setCurrentCell(pos[0], pos[1])
+               for selection_range in selection_ranges:
+                       self.setRangeSelected(selection_range, True)
 
        def _column_by_index(self, colnr):
 
@@ -273,6 +342,8 @@
                else:
                        item.setText(safe_decode(val))
                item.update_style()
+               if self.read_only:
+                       item.setFlags(item.flags() ^ QtCore.Qt.ItemIsEditable)
 
        @property
        def _unique_name(self):
@@ -366,6 +437,7 @@
 
                self._copy(clear=True, copy=False)
 
+       @silent
        def _copy(self, clear=False, copy=True):
 
                """
@@ -383,13 +455,13 @@
                """
 
                # Get the start and end of the selection
-               l = self.selectedRanges()
-               if len(l) == 0:
+               selection = self.selectedRanges()
+               if not selection:
                        return
-               firstrow = min([r.topRow() for r in l])
-               firstcolnr = min([r.leftColumn() for r in l])
-               lastrow = max([r.bottomRow() for r in l])
-               lastcolnr = max([r.rightColumn() for r in l])
+               firstrow = min([r.topRow() for r in selection])
+               firstcolnr = min([r.leftColumn() for r in selection])
+               lastrow = max([r.bottomRow() for r in selection])
+               lastcolnr = max([r.rightColumn() for r in selection])
                colspan = lastcolnr - firstcolnr + 1
                rowspan = lastrow - firstrow + 1
                # Create an empty list of lists, where the value __empty__ 
indicates
@@ -399,16 +471,27 @@
                for col in range(rowspan):
                        matrix.append([EMPTY_STR]*colspan)
                # Add all selected cells.
+               columns_to_optimize = set()
                for item in self.selectedItems():
-                       row = self.row(item)-firstrow
-                       colnr = self.column(item)-firstcolnr
-                       matrix[row][colnr] = item.text()
+                       rownr = self.row(item) - firstrow
+                       if rownr > self._last_visible_row:
+                               for colnr, (name, col) in 
enumerate(self.dm.columns):
+                                       try:
+                                               self._setcell(rownr + 1, colnr, 
col[rownr])
+                                       except IndexError:
+                                               pass  # Appears to happen in 
rare conditions
+                                       columns_to_optimize.add(colnr)
+                       colnr = self.column(item) - firstcolnr
+                       matrix[rownr][colnr] = item.text()
                        if clear:
                                self._setcell(self.row(item), self.column(item))
+               for colnr in columns_to_optimize:
+                       self._optimize_column_width(colnr)
+               if not copy:
+                       return
                # Convert the selection to text and put it on the clipboard
                txt = u'\n'.join([u'\t'.join(_col) for _col in matrix])
-               if copy:
-                       self._clipboard.setText(txt)
+               self._clipboard.setText(txt)
 
        @silent
        @undoable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-qdatamatrix-0.1.18/qdatamatrix/_version.py 
new/python-qdatamatrix-0.1.29/qdatamatrix/_version.py
--- old/python-qdatamatrix-0.1.18/qdatamatrix/_version.py       1970-01-01 
01:00:00.000000000 +0100
+++ new/python-qdatamatrix-0.1.29/qdatamatrix/_version.py       2020-11-25 
16:16:56.000000000 +0100
@@ -0,0 +1,20 @@
+#-*- coding:utf-8 -*-
+
+"""
+This file is part of qdatamatatrix.
+
+qdatamatatrix is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+qdatamatatrix is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with qdatamatatrix.  If not, see <http://www.gnu.org/licenses/>.
+"""
+
+__version__ = '0.1.29'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-qdatamatrix-0.1.18/setup.cfg 
new/python-qdatamatrix-0.1.29/setup.cfg
--- old/python-qdatamatrix-0.1.18/setup.cfg     2018-02-06 11:44:25.000000000 
+0100
+++ new/python-qdatamatrix-0.1.29/setup.cfg     2020-11-26 19:54:29.000000000 
+0100
@@ -1,6 +1,10 @@
 [bdist_wheel]
 universal = 1
 
+[sdist_dsc]
+with-python2 = false
+with-python3 = true
+
 [egg_info]
 tag_build = 
 tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-qdatamatrix-0.1.18/setup.py 
new/python-qdatamatrix-0.1.29/setup.py
--- old/python-qdatamatrix-0.1.18/setup.py      2017-01-11 09:48:59.000000000 
+0100
+++ new/python-qdatamatrix-0.1.29/setup.py      2020-04-30 08:20:14.000000000 
+0200
@@ -18,11 +18,16 @@
 along with qdatamatrix.  If not, see <http://www.gnu.org/licenses/>.
 """
 
-from qdatamatrix import __version__
+import sys
+import os
+from qdatamatrix._version import __version__
 from setuptools import setup, find_packages
 
+# Increment to force a change in the source tarball.
+DUMMY=1
+
 setup(
-       name=u'python-qdatamatrix',
+       name=u'qdatamatrix' if u'bdist_deb' in sys.argv else 
u'python-qdatamatrix',
        version=__version__,
        description= u'A PyQt4/PyQt5 widget for viewing and editing a 
DataMatrix object',
        author=u'Sebastiaan Mathot',

Reply via email to