[guidata] 01/03: Imported Upstream version 1.7.1

Frédéric-Emmanuel Picca picca at moszumanska.debian.org
Thu Nov 12 20:39:39 UTC 2015


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

picca pushed a commit to annotated tag debian/1.7.1-1_exp1
in repository guidata.

commit 1f3f019ad246b0b4bbbffa80def38761cef71309
Author: Picca Frédéric-Emmanuel <picca at debian.org>
Date:   Thu Nov 12 19:20:18 2015 +0100

    Imported Upstream version 1.7.1
---
 MANIFEST.in                       |  1 -
 PKG-INFO                          |  2 +-
 guidata.egg-info/PKG-INFO         |  2 +-
 guidata.egg-info/SOURCES.txt      |  7 ++-----
 guidata.egg-info/entry_points.txt |  3 +++
 guidata/__init__.py               |  2 +-
 guidata/dataset/qtitemwidgets.py  |  5 +++++
 guidata/tests/disthelpers.py      |  5 ++++-
 guidata/userconfig.py             |  2 +-
 guidata/userconfigio.py           | 11 +++++++++--
 scripts/guidata-tests-py2         |  3 ---
 scripts/guidata-tests-py2.bat     |  2 --
 scripts/guidata-tests-py3         |  3 ---
 scripts/guidata-tests-py3.bat     |  2 --
 setup.py                          | 15 +++------------
 15 files changed, 30 insertions(+), 35 deletions(-)

diff --git a/MANIFEST.in b/MANIFEST.in
index b70847b..7466fd9 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,4 +1,3 @@
-recursive-include scripts * *.bat
 recursive-include guidata *.inc *.png *.svg *.pot *.po *.mo
 recursive-include doc *.py *.rst *.png *.ico
 include MANIFEST.in
diff --git a/PKG-INFO b/PKG-INFO
index 9152765..963388c 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: guidata
-Version: 1.7.0
+Version: 1.7.1
 Summary: Automatic graphical user interfaces generation for easy dataset editing and display
 Home-page: https://github.com/PierreRaybaut/guidata
 Author: Pierre Raybaut
diff --git a/guidata.egg-info/PKG-INFO b/guidata.egg-info/PKG-INFO
index 9152765..963388c 100644
--- a/guidata.egg-info/PKG-INFO
+++ b/guidata.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: guidata
-Version: 1.7.0
+Version: 1.7.1
 Summary: Automatic graphical user interfaces generation for easy dataset editing and display
 Home-page: https://github.com/PierreRaybaut/guidata
 Author: Pierre Raybaut
diff --git a/guidata.egg-info/SOURCES.txt b/guidata.egg-info/SOURCES.txt
index a220387..2430e1e 100644
--- a/guidata.egg-info/SOURCES.txt
+++ b/guidata.egg-info/SOURCES.txt
@@ -43,6 +43,7 @@ guidata/utils.py
 guidata.egg-info/PKG-INFO
 guidata.egg-info/SOURCES.txt
 guidata.egg-info/dependency_links.txt
+guidata.egg-info/entry_points.txt
 guidata.egg-info/requires.txt
 guidata.egg-info/top_level.txt
 guidata/dataset/__init__.py
@@ -133,8 +134,4 @@ guidata/tests/inheritance.py
 guidata/tests/rotatedlabel.py
 guidata/tests/text.py
 guidata/tests/translations.py
-guidata/tests/userconfig_app.py
-scripts/guidata-tests-py2
-scripts/guidata-tests-py2.bat
-scripts/guidata-tests-py3
-scripts/guidata-tests-py3.bat
\ No newline at end of file
+guidata/tests/userconfig_app.py
\ No newline at end of file
diff --git a/guidata.egg-info/entry_points.txt b/guidata.egg-info/entry_points.txt
new file mode 100644
index 0000000..5a8a896
--- /dev/null
+++ b/guidata.egg-info/entry_points.txt
@@ -0,0 +1,3 @@
+[gui_scripts]
+guidata-tests-py2 = guidata.tests:run
+
diff --git a/guidata/__init__.py b/guidata/__init__.py
index ceab489..981b2e9 100644
--- a/guidata/__init__.py
+++ b/guidata/__init__.py
@@ -16,7 +16,7 @@ External resources:
 .. _GoogleGroup: http://groups.google.fr/group/guidata_guiqwt
 """
 
-__version__ = '1.7.0'
+__version__ = '1.7.1'
 
 # Dear (Debian, RPM, ...) package makers, please feel free to customize the
 # following path to module's data (images) and translations:
diff --git a/guidata/dataset/qtitemwidgets.py b/guidata/dataset/qtitemwidgets.py
index 0a32232..5177b5e 100644
--- a/guidata/dataset/qtitemwidgets.py
+++ b/guidata/dataset/qtitemwidgets.py
@@ -24,6 +24,7 @@ import os.path as osp
 import sys
 import numpy
 import collections
+import datetime
 
 try:
     # PyQt4 4.3.3 on Windows (static DLLs) with py2exe installed:
@@ -393,6 +394,8 @@ class DateWidget(AbstractDataSetWidget):
         """Override AbstractDataSetWidget method"""
         value = self.item.get()
         if value:
+            if not isinstance(value, datetime.date):
+                value = datetime.date.fromordinal(value)
             self.dateedit.setDate(value)
     
     def set(self):
@@ -417,6 +420,8 @@ class DateTimeWidget(AbstractDataSetWidget):
         """Override AbstractDataSetWidget method"""
         value = self.item.get()
         if value:
+            if not isinstance(value, datetime.datetime):
+                value = datetime.datetime.fromtimestamp(value)
             self.dateedit.setDateTime(value)
     
     def set(self):
diff --git a/guidata/tests/disthelpers.py b/guidata/tests/disthelpers.py
index f76592c..32601b9 100644
--- a/guidata/tests/disthelpers.py
+++ b/guidata/tests/disthelpers.py
@@ -14,13 +14,16 @@ writing a complete setup script.
 
 SHOW = True # Show test in GUI-based test launcher
 
+import os.path as osp
+
 from guidata.disthelpers import Distribution
 
 if __name__ == '__main__':
     dist = Distribution()
     dist.setup(name="Application demo", version='1.0.0',
                description="Application demo based on editgroupbox.py",
-               script="editgroupbox.py", target_name="demo.exe")
+               script=osp.join(osp.dirname(__file__), "editgroupbox.py"),
+               target_name="demo.exe")
     dist.add_modules('guidata')
     dist.build('cx_Freeze')
 
diff --git a/guidata/userconfig.py b/guidata/userconfig.py
index f59a081..fd74e70 100644
--- a/guidata/userconfig.py
+++ b/guidata/userconfig.py
@@ -288,7 +288,7 @@ class UserConfig(cp.ConfigParser):
         options = self.defaults.get(section, {})
         return options.get(option, NoDefault)
                 
-    def get(self, section, option, default=NoDefault):
+    def get(self, section, option, default=NoDefault, **kwargs):
         """
         Get an option
         section=None: attribute a default section name
diff --git a/guidata/userconfigio.py b/guidata/userconfigio.py
index 3c28477..89a156e 100644
--- a/guidata/userconfigio.py
+++ b/guidata/userconfigio.py
@@ -14,6 +14,7 @@ UserConfig reader/writer objects
 """
 
 import collections
+import datetime
 
 from guidata.py3compat import is_unicode, PY3
 
@@ -74,7 +75,7 @@ class WriterMixin(object):
         """Write value using the appropriate routine depending on value type
         
         group_name: if None, writing the value in current group"""
-        from numpy import ndarray
+        import numpy as np
         if group_name:
             self.begin(group_name)
         if isinstance(val, bool):
@@ -87,12 +88,18 @@ class WriterMixin(object):
             self.write_unicode(val)
         elif isinstance(val, str):
             self.write_any(val)
-        elif isinstance(val, ndarray):
+        elif isinstance(val, np.ndarray):
             self.write_array(val)
+        elif np.isscalar(val):
+            self.write_any(val)
         elif val is None:
             self.write_none()
         elif isinstance(val, (list, tuple)):
             self.write_sequence(val)
+        elif isinstance(val, datetime.datetime):
+            self.write_float(val.timestamp())
+        elif isinstance(val, datetime.date):
+            self.write_int(val.toordinal())
         elif hasattr(val, 'serialize') and isinstance(val.serialize,
                                                       collections.Callable):
             # The object has a DataSet-like `serialize` method
diff --git a/scripts/guidata-tests-py2 b/scripts/guidata-tests-py2
deleted file mode 100644
index edeca12..0000000
--- a/scripts/guidata-tests-py2
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env python
-from guidata import tests
-tests.run()
\ No newline at end of file
diff --git a/scripts/guidata-tests-py2.bat b/scripts/guidata-tests-py2.bat
deleted file mode 100644
index ddced2d..0000000
--- a/scripts/guidata-tests-py2.bat
+++ /dev/null
@@ -1,2 +0,0 @@
- at echo off
-python "%~dpn0" %*
\ No newline at end of file
diff --git a/scripts/guidata-tests-py3 b/scripts/guidata-tests-py3
deleted file mode 100644
index edeca12..0000000
--- a/scripts/guidata-tests-py3
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env python
-from guidata import tests
-tests.run()
\ No newline at end of file
diff --git a/scripts/guidata-tests-py3.bat b/scripts/guidata-tests-py3.bat
deleted file mode 100644
index ddced2d..0000000
--- a/scripts/guidata-tests-py3.bat
+++ /dev/null
@@ -1,2 +0,0 @@
- at echo off
-python "%~dpn0" %*
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 0f48b29..13d0c56 100644
--- a/setup.py
+++ b/setup.py
@@ -25,8 +25,6 @@ from __future__ import print_function
 import setuptools  # analysis:ignore
 from distutils.core import setup
 import sys
-import os
-import os.path as osp
 
 from guidata.utils import get_subpackages, get_package_data
 
@@ -47,21 +45,14 @@ else:
     CLASSIFIERS += ['Development Status :: 5 - Production/Stable']
 
 
-def _create_script_list(basename):
-    scripts = ['%s-py%d' % (basename, sys.version_info.major)]
-    if os.name == 'nt':
-        scripts.append('%s.bat' % scripts[0])
-    return [osp.join('scripts', name) for name in scripts]
-
-SCRIPTS = _create_script_list('guidata-tests')
-
-
 setup(name=LIBNAME, version=version,
       description=DESCRIPTION, long_description=LONG_DESCRIPTION,
       packages=get_subpackages(LIBNAME),
       package_data={LIBNAME:
                     get_package_data(LIBNAME, ('.png', '.svg', '.mo'))},
-      scripts=SCRIPTS,
+      entry_points={'gui_scripts':
+                    ['guidata-tests-py%d = guidata.tests:run'\
+                     % sys.version_info.major,]},
       extras_require = {
                         'Doc':  ["Sphinx>=1.1"],
                         },

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/guidata.git



More information about the debian-science-commits mailing list