Hello community,

here is the log from the commit of package python-python-editor for 
openSUSE:Factory checked in at 2017-08-23 11:54:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-editor (Old)
 and      /work/SRC/openSUSE:Factory/.python-python-editor.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-python-editor"

Wed Aug 23 11:54:52 2017 rev:4 rq:518131 version:1.0.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-python-editor/python-python-editor.changes    
    2016-09-27 13:44:55.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-python-editor.new/python-python-editor.changes
   2017-08-23 11:54:54.424929620 +0200
@@ -1,0 +2,11 @@
+Tue Aug 22 12:49:38 UTC 2017 - tbecht...@suse.com
+
+- update to 1.0.3:
+  * don't re-split arguments
+  * Version bump (1.0.2)
+  * Version bump to 1.0.3
+  * remove un-needed function
+  * update README
+- convert to singlespec
+
+-------------------------------------------------------------------

Old:
----
  python-editor-1.0.1.tar.gz

New:
----
  python-editor-1.0.3.tar.gz

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

Other differences:
------------------
++++++ python-python-editor.spec ++++++
--- /var/tmp/diff_new_pack.OvXJfN/_old  2017-08-23 11:54:56.312663883 +0200
+++ /var/tmp/diff_new_pack.OvXJfN/_new  2017-08-23 11:54:56.320662758 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-python-editor
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,25 +16,25 @@
 #
 
 
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-python-editor
-Version:        1.0.1
+Version:        1.0.3
 Release:        0
 Summary:        Programmatically open an editor, capture the result
 License:        Apache-2.0
 Group:          Development/Languages/Python
 Url:            https://github.com/fmoo/python-editor
 Source:         
https://files.pythonhosted.org/packages/source/p/python-editor/python-editor-%{version}.tar.gz
-BuildRequires:  python-devel
-BuildRequires:  python-setuptools
+BuildRequires:  %{python_module devel}
+BuildRequires:  %{python_module setuptools}
+BuildRequires:  python-rpm-macros
 %if 0%{?is_opensuse}
 BuildRequires:  nano
 %endif
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-%{!?python_sitelib: %global python_sitelib %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%else
 BuildArch:      noarch
-%endif
+
+%python_subpackages
 
 %description
 python-editor is a library that provides the editor module for
@@ -44,18 +44,19 @@
 %setup -q -n python-editor-%{version}
 
 %build
-python setup.py build
+%python_build
 
 %install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%python_install
 
 %if 0%{?is_opensuse}
-%check
-export EDITOR='nano'
-python test.py
+# do not run tests for now (https://github.com/fmoo/python-editor/issues/14)
+# %check
+# export EDITOR='nano'
+# Xpython_exec test.py
 %endif
 
-%files
+%files %{python_files}
 %defattr(-,root,root,-)
 %doc LICENSE README.md
 %{python_sitelib}/*

++++++ python-editor-1.0.1.tar.gz -> python-editor-1.0.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-editor-1.0.1/PKG-INFO 
new/python-editor-1.0.3/PKG-INFO
--- old/python-editor-1.0.1/PKG-INFO    2016-06-14 21:28:03.000000000 +0200
+++ new/python-editor-1.0.3/PKG-INFO    2016-11-27 20:02:18.000000000 +0100
@@ -1,52 +1,12 @@
 Metadata-Version: 1.1
 Name: python-editor
-Version: 1.0.1
+Version: 1.0.3
 Summary: Programmatically open an editor, capture the result.
 Home-page: https://github.com/fmoo/python-editor
 Author: Peter Ruibal
 Author-email: ruib...@gmail.com
 License: Apache
-Description: ``python-editor`` is a library that provides the ``editor`` 
module for
-        programmatically interfacing with your system's $EDITOR.
-        
-        Examples
-        --------
-        
-        .. code:: python
-        
-            import editor
-            commit_msg = editor.edit(contents="# Enter commit message here")
-        
-        Opens an editor, prefilled with the contents,
-        ``# Enter commit message here``. When the editor is closed, returns the
-        contents in variable ``commit_msg``.
-        
-        .. code:: python
-        
-            import editor
-            editor.edit(file="README.txt")
-        
-        Opens README.txt in an editor. Changes are saved in place.
-        
-        How it Works
-        ------------
-        
-        ``editor`` first looks for the ${EDITOR} environment variable. If set,
-        it uses the value as-is, without fallbacks.
-        
-        If no $EDITOR is set, editor will search through a list of known
-        editors, and use the first one that exists on the system.
-        
-        For example, on Linux, ``editor`` will look for the following editors 
in
-        order:
-        
-        -  vim
-        -  emacs
-        -  nano
-        
-        When calling the ``edit()`` function, ``editor`` will open the editor 
in
-        a subprocess, inheriting the parent process's stdin, stdout
-        
+Description: UNKNOWN
 Keywords: editor library vim emacs
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-editor-1.0.1/README.md 
new/python-editor-1.0.3/README.md
--- old/python-editor-1.0.1/README.md   2016-06-14 18:31:14.000000000 +0200
+++ new/python-editor-1.0.3/README.md   2016-11-16 18:53:10.000000000 +0100
@@ -6,21 +6,33 @@
 
 ```python
 import editor
-commit_msg = editor.edit(contents="# Enter commit message here")
+commit_msg = editor.edit(contents=b"# Enter commit message here")
 ```
+
 Opens an editor, prefilled with the contents, `# Enter commit message here`.
-When the editor is closed, returns the contents in variable `commit_msg`.
+When the editor is closed, returns the contents (bytes) in variable 
`commit_msg`.
+Note that the argument to `contents` needs to be a bytes object on Python 3.
 
 
 ```python
-import editor
 editor.edit(file="README.txt")
 ```
-Opens README.txt in an editor.  Changes are saved in place.
+
+Opens README.txt in an editor.  Changes are saved in place.  If there is
+a `contents` argument then the file contents will be overwritten.
+
+```python
+editor.edit(..., use_tty=True)
+```
+
+Opens the editor in a TTY.  This is usually done in programs which output is
+piped to other programs.  In this case the TTY is used as the editor's stdout,
+allowing interactive usage.
 
 
 How it Works
 ------------
+
 `editor` first looks for the ${EDITOR} environment variable.  If set, it uses
 the value as-is, without fallbacks.
 
@@ -33,5 +45,5 @@
 * emacs
 * nano
 
-When calling the `edit()` function, `editor` will open the editor in a 
subprocess,
-inheriting the parent process's stdin, stdout
+When calling `editor.edit`, an editor will be opened in a subprocess, 
inheriting
+the parent process's stdin, stdout.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-editor-1.0.1/editor.py 
new/python-editor-1.0.3/editor.py
--- old/python-editor-1.0.1/editor.py   2016-06-14 18:31:14.000000000 +0200
+++ new/python-editor-1.0.3/editor.py   2016-11-27 19:54:48.000000000 +0100
@@ -17,7 +17,7 @@
     'EditorError',
 ]
 
-__version__ = '0.4'
+__version__ = '1.0.3'
 
 
 class EditorError(RuntimeError):
@@ -36,24 +36,19 @@
 
 def get_editor_args(editor):
     if editor in ['vim', 'gvim', 'vim.basic', 'vim.tiny']:
-        return '-f -o'
+        return ['-f', '-o']
 
     elif editor == 'emacs':
-        return '-nw'
+        return ['-nw']
 
     elif editor == 'gedit':
-        return '-w --new-window'
+        return ['-w', '--new-window']
 
     elif editor == 'nano':
-        return '-R'
+        return ['-R']
 
     else:
-        return ''
-
-
-def get_platform_editor_var():
-    # TODO: Make platform specific
-    return "$EDITOR"
+        return []
 
 
 def get_editor():
@@ -69,7 +64,7 @@
             return path
 
     raise EditorError("Unable to find a viable editor on this system."
-        "Please consider setting your %s variable" % get_platform_editor_var())
+        "Please consider setting your $EDITOR variable")
 
 
 def get_tty_filename():
@@ -80,8 +75,7 @@
 
 def edit(filename=None, contents=None, use_tty=None):
     editor = get_editor()
-    args = get_editor_args(os.path.basename(os.path.realpath(editor)))
-    args = [editor] + args.split(' ')
+    args = [editor] + 
get_editor_args(os.path.basename(os.path.realpath(editor)))
 
     if use_tty is None:
         use_tty = sys.stdin.isatty() and not sys.stdout.isatty()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-editor-1.0.1/python_editor.egg-info/PKG-INFO 
new/python-editor-1.0.3/python_editor.egg-info/PKG-INFO
--- old/python-editor-1.0.1/python_editor.egg-info/PKG-INFO     2016-06-14 
21:28:03.000000000 +0200
+++ new/python-editor-1.0.3/python_editor.egg-info/PKG-INFO     2016-11-27 
20:02:18.000000000 +0100
@@ -1,52 +1,12 @@
 Metadata-Version: 1.1
 Name: python-editor
-Version: 1.0.1
+Version: 1.0.3
 Summary: Programmatically open an editor, capture the result.
 Home-page: https://github.com/fmoo/python-editor
 Author: Peter Ruibal
 Author-email: ruib...@gmail.com
 License: Apache
-Description: ``python-editor`` is a library that provides the ``editor`` 
module for
-        programmatically interfacing with your system's $EDITOR.
-        
-        Examples
-        --------
-        
-        .. code:: python
-        
-            import editor
-            commit_msg = editor.edit(contents="# Enter commit message here")
-        
-        Opens an editor, prefilled with the contents,
-        ``# Enter commit message here``. When the editor is closed, returns the
-        contents in variable ``commit_msg``.
-        
-        .. code:: python
-        
-            import editor
-            editor.edit(file="README.txt")
-        
-        Opens README.txt in an editor. Changes are saved in place.
-        
-        How it Works
-        ------------
-        
-        ``editor`` first looks for the ${EDITOR} environment variable. If set,
-        it uses the value as-is, without fallbacks.
-        
-        If no $EDITOR is set, editor will search through a list of known
-        editors, and use the first one that exists on the system.
-        
-        For example, on Linux, ``editor`` will look for the following editors 
in
-        order:
-        
-        -  vim
-        -  emacs
-        -  nano
-        
-        When calling the ``edit()`` function, ``editor`` will open the editor 
in
-        a subprocess, inheriting the parent process's stdin, stdout
-        
+Description: UNKNOWN
 Keywords: editor library vim emacs
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-editor-1.0.1/setup.py 
new/python-editor-1.0.3/setup.py
--- old/python-editor-1.0.1/setup.py    2016-06-14 18:45:56.000000000 +0200
+++ new/python-editor-1.0.3/setup.py    2016-11-27 19:54:51.000000000 +0100
@@ -1,4 +1,4 @@
-__VERSION__ = '1.0.1'
+__VERSION__ = '1.0.3'
 
 from setuptools import setup
 try:


Reply via email to