Hello community,

here is the log from the commit of package python-appdirs for openSUSE:Factory 
checked in at 2017-02-27 18:30:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-appdirs (Old)
 and      /work/SRC/openSUSE:Factory/.python-appdirs.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-appdirs"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-appdirs/python-appdirs.changes    
2015-08-27 08:54:43.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-appdirs.new/python-appdirs.changes       
2017-02-27 18:30:08.515789761 +0100
@@ -1,0 +2,10 @@
+Thu Feb 23 11:45:52 UTC 2017 - [email protected]
+
+- update for single-spec
+- desetuptoolize.patch : switch from setuptools to distutils.core
+  for installation, as this is now a setuptools dependency
+- ensure egg-info is a directory (distutils would install it as file)
+- update to 1.4.1
+  * [issue 55] make appname optional
+
+-------------------------------------------------------------------

Old:
----
  appdirs-1.4.0.tar.gz

New:
----
  appdirs-1.4.1.tar.gz
  desetuptoolize.patch

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

Other differences:
------------------
++++++ python-appdirs.spec ++++++
--- /var/tmp/diff_new_pack.zHsZui/_old  2017-02-27 18:30:09.267683821 +0100
+++ /var/tmp/diff_new_pack.zHsZui/_new  2017-02-27 18:30:09.271683258 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-appdirs
 #
-# Copyright (c) 2015 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,22 +16,21 @@
 #
 
 
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-appdirs
-Version:        1.4.0
+Version:        1.4.1
 Release:        0
 Summary:        A small Python module for determining platform-specific dirs
 License:        MIT
 Group:          Development/Languages/Python
 Url:            http://github.com/ActiveState/appdirs
-Source:         
https://pypi.python.org/packages/source/a/appdirs/appdirs-%{version}.tar.gz
-BuildRequires:  python-devel
-BuildRequires:  python-setuptools
+Source:         
https://files.pythonhosted.org/packages/source/a/appdirs/appdirs-%{version}.tar.gz
+Patch0:         desetuptoolize.patch
+BuildRequires:  %{python_module base}
+BuildRequires:  python-rpm-macros
 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
 ``appdirs`` will
@@ -42,21 +41,28 @@
 - site data dir (``site_data_dir``)
 - user log dir (``user_log_dir``)
 
-
 %prep
 %setup -q -n appdirs-%{version}
+%patch0 -p1
+
+# strip shebang
+sed -r -i '1s/^#!.*$//' appdirs.py
 
 %build
-python setup.py build
+%python_build
 
 %install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
-chmod a+x %{buildroot}%{python_sitelib}/appdirs.py
+%python_install
+# fix up egg-info because distutils is bad and should feel bad
+%{python_expand rm %{buildroot}%{$python_sitelib}/*.egg-info
+cp -r appdirs.egg-info 
%{buildroot}%{$python_sitelib}/appdirs-%{version}-py%{$python_version}.egg-info
+}
 
-%files
+%files %{python_files}
 %defattr(-,root,root,-)
 %doc CHANGES.rst LICENSE.txt README.rst
+%pycache_only %{python_sitelib}/__pycache__/*
 %{python_sitelib}/appdirs.py*
-%{python_sitelib}/appdirs-%{version}-py*.egg-info/
+%{python_sitelib}/appdirs-%{version}-py%{python_version}.egg-info
 
 %changelog

++++++ appdirs-1.4.0.tar.gz -> appdirs-1.4.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/appdirs-1.4.0/CHANGES.rst 
new/appdirs-1.4.1/CHANGES.rst
--- old/appdirs-1.4.0/CHANGES.rst       2014-08-17 19:31:26.000000000 +0200
+++ new/appdirs-1.4.1/CHANGES.rst       2017-02-02 09:17:41.000000000 +0100
@@ -1,6 +1,12 @@
 appdirs Changelog
 =================
 
+appdirs 1.4.1
+-------------
+
+- [issue #38] Fix _winreg import on Windows Py3
+- [issue #55] Make appname optional
+
 appdirs 1.4.0
 -------------
 - [PR #42] AppAuthor is now optional on Windows
@@ -14,7 +20,7 @@
   everybody
 - [Unix] Removes gratuitous case mangling of the case, since \*nix-es are
   usually case sensitive, so mangling is not wise
-- [Unix] Fixes the uterly wrong behaviour in ``site_data_dir``, return result
+- [Unix] Fixes the utterly wrong behaviour in ``site_data_dir``, return result
   based on XDG_DATA_DIRS and make room for respecting the standard which
   specifies XDG_DATA_DIRS is a multiple-value variable
 - [Issue 6] Add ``*_config_dir`` which are distinct on nix-es, according to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/appdirs-1.4.0/Makefile.py 
new/appdirs-1.4.1/Makefile.py
--- old/appdirs-1.4.0/Makefile.py       2014-08-17 19:27:12.000000000 +0200
+++ new/appdirs-1.4.1/Makefile.py       1970-01-01 01:00:00.000000000 +0100
@@ -1,304 +0,0 @@
-# This is a Makefile for the `mk` tool. Install it using,
-#
-#    pip install which mk
-
-
-import sys
-import os
-from os.path import join, dirname, normpath, abspath, exists, basename, 
expanduser
-import re
-from glob import glob
-import codecs
-import webbrowser
-
-import mklib
-assert mklib.__version_info__ >= (0,7,2)  # for `mklib.mk`
-from mklib.common import MkError
-from mklib import Task, mk
-from mklib import sh
-
-
-class bugs(Task):
-    """open bug/issues page"""
-    def make(self):
-        webbrowser.open("http://github.com/ActiveState/appdirs/issues";)
-
-class site(Task):
-    """open project page"""
-    def make(self):
-        webbrowser.open("http://github.com/ActiveState/appdirs";)
-
-class pypi(Task):
-    """open project page"""
-    def make(self):
-        webbrowser.open("http://pypi.python.org/pypi/appdirs/";)
-
-class cut_a_release(Task):
-    """automate the steps for cutting a release
-
-    See <http://github.com/trentm/eol/blob/master/docs/devguide.md>
-    for details.
-    """
-    proj_name = "appdirs"
-    version_py_path = "appdirs.py"
-    version_module = "appdirs"
-
-    # XXX: this needs to be changed from .md to .rst format
-    _changes_parser = re.compile(r'^## %s (?P<ver>[\d\.abc]+)'
-        r'(?P<nyr>\s+\(not yet released\))?'
-        r'(?P<body>.*?)(?=^##|\Z)' % proj_name, re.M | re.S)
-
-    def make(self):
-        DRY_RUN = False
-        version = self._get_version()
-
-        # Confirm
-        if not DRY_RUN:
-            answer = query_yes_no("* * *\n"
-                "Are you sure you want cut a %s release?\n"
-                "This will involved commits and a release to pypi." % version,
-                default="no")
-            if answer != "yes":
-                self.log.info("user abort")
-                return
-            print "* * *"
-        self.log.info("cutting a %s release", version)
-
-        # Checks: Ensure there is a section in changes for this version.
-        changes_path = join(self.dir, "CHANGES.rst")
-        changes_txt = changes_txt_before = codecs.open(changes_path, 'r', 
'utf-8').read()
-        raise NotImplementedError('_changes_parser: change me to .rst')
-        changes_sections = self._changes_parser.findall(changes_txt)
-        top_ver = changes_sections[0][0]
-        if top_ver != version:
-            raise MkError("top section in `CHANGES.rst' is for "
-                "version %r, expected version %r: aborting"
-                % (top_ver, version))
-        top_nyr = changes_sections[0][1]
-        if not top_nyr:
-            answer = query_yes_no("\n* * *\n"
-                "The top section in `CHANGES.rst' doesn't have the expected\n"
-                "'(not yet released)' marker. Has this been released already?",
-                default="yes")
-            if answer != "no":
-                self.log.info("abort")
-                return
-            print "* * *"
-        top_body = changes_sections[0][2]
-        if top_body.strip() == "(nothing yet)":
-            raise MkError("top section body is `(nothing yet)': it looks like "
-                "nothing has been added to this release")
-
-        # Commits to prepare release.
-        changes_txt = changes_txt.replace(" (not yet released)", "", 1)
-        if not DRY_RUN and changes_txt != changes_txt_before:
-            self.log.info("prepare `CHANGES.rst' for release")
-            f = codecs.open(changes_path, 'w', 'utf-8')
-            f.write(changes_txt)
-            f.close()
-            sh.run('git commit %s -m "prepare for %s release"'
-                % (changes_path, version), self.log.debug)
-
-        # Tag version and push.
-        curr_tags = set(t for t in _capture_stdout(["git", "tag", 
"-l"]).split('\n') if t)
-        if not DRY_RUN and version not in curr_tags:
-            self.log.info("tag the release")
-            sh.run('git tag -a "%s" -m "version %s"' % (version, version),
-                self.log.debug)
-            sh.run('git push --tags', self.log.debug)
-
-        # Release to PyPI.
-        self.log.info("release to pypi")
-        if not DRY_RUN:
-            mk("pypi_upload")
-
-        # Commits to prepare for future dev and push.
-        next_version = self._get_next_version(version)
-        self.log.info("prepare for future dev (version %s)", next_version)
-        marker = "## %s %s\n" % (self.proj_name, version)
-        if marker not in changes_txt:
-            raise MkError("couldn't find `%s' marker in `%s' "
-                "content: can't prep for subsequent dev" % (marker, 
changes_path))
-        changes_txt = changes_txt.replace("## %s %s\n" % (self.proj_name, 
version),
-            "## %s %s (not yet released)\n\n(nothing yet)\n\n## %s %s\n" % (
-                self.proj_name, next_version, self.proj_name, version))
-        if not DRY_RUN:
-            f = codecs.open(changes_path, 'w', 'utf-8')
-            f.write(changes_txt)
-            f.close()
-
-        ver_path = join(self.dir, normpath(self.version_py_path))
-        ver_content = codecs.open(ver_path, 'r', 'utf-8').read()
-        version_tuple = self._tuple_from_version(version)
-        next_version_tuple = self._tuple_from_version(next_version)
-        marker = "__version_info__ = %r" % (version_tuple,)
-        if marker not in ver_content:
-            raise MkError("couldn't find `%s' version marker in `%s' "
-                "content: can't prep for subsequent dev" % (marker, ver_path))
-        ver_content = ver_content.replace(marker,
-            "__version_info__ = %r" % (next_version_tuple,))
-        if not DRY_RUN:
-            f = codecs.open(ver_path, 'w', 'utf-8')
-            f.write(ver_content)
-            f.close()
-
-        if not DRY_RUN:
-            sh.run('git commit %s %s -m "prep for future dev"' % (
-                changes_path, ver_path))
-            sh.run('git push')
-
-    def _tuple_from_version(self, version):
-        def _intify(s):
-            try:
-                return int(s)
-            except ValueError:
-                return s
-        return tuple(_intify(b) for b in version.split('.'))
-
-    def _get_next_version(self, version):
-        last_bit = version.rsplit('.', 1)[-1]
-        try:
-            last_bit = int(last_bit)
-        except ValueError: # e.g. "1a2"
-            last_bit = int(re.split('[abc]', last_bit, 1)[-1])
-        return version[:-len(str(last_bit))] + str(last_bit + 1)
-
-    def _get_version(self):
-        try:
-            mod = __import__(self.version_module)
-            return mod.__version__
-        finally:
-            del sys.path[0]
-
-
-class clean(Task):
-    """Clean generated files and dirs."""
-    def make(self):
-        patterns = [
-            "dist",
-            "build",
-            "MANIFEST",
-            "*.pyc",
-        ]
-        for pattern in patterns:
-            p = join(self.dir, pattern)
-            for path in glob(p):
-                sh.rm(path, log=self.log)
-
-class sdist(Task):
-    """python setup.py sdist"""
-    def make(self):
-        sh.run_in_dir("%spython setup.py sdist --formats zip"
-                        % _setup_command_prefix(),
-                      self.dir, self.log.debug)
-
-class pypi_upload(Task):
-    """Upload release to pypi."""
-    def make(self):
-        sh.run_in_dir("%spython setup.py sdist --formats zip upload"
-                % _setup_command_prefix(),
-            self.dir, self.log.debug)
-
-        url = "http://pypi.python.org/pypi/appdirs/";
-        import webbrowser
-        webbrowser.open_new(url)
-
-class tox(Task):
-    """Test on all available Python versions using tox"""
-    def make(self):
-        sh.run("python toxbootstrap.py")
-
-class test(Task):
-    """Run all tests (except known failures)."""
-    def make(self):
-        for ver, python in self._gen_pythons():
-            if ver < (2,3):
-                # Don't support Python < 2.3.
-                continue
-            #elif ver >= (3, 0):
-            #    # Don't yet support Python 3.
-            #    continue
-            ver_str = "%s.%s" % ver
-            print "-- test with Python %s (%s)" % (ver_str, python)
-            assert ' ' not in python
-            sh.run("%s setup.py test" % python)
-
-    def _python_ver_from_python(self, python):
-        assert ' ' not in python
-        o = os.popen('''%s -c "import sys; print(sys.version)"''' % python)
-        ver_str = o.read().strip()
-        ver_bits = re.split("\.|[^\d]", ver_str, 2)[:2]
-        ver = tuple(map(int, ver_bits))
-        return ver
-
-    def _gen_python_names(self):
-        yield "python"
-        for ver in [(2,4), (2,5), (2,6), (2,7), (3,0), (3,1)]:
-            yield "python%d.%d" % ver
-            if sys.platform == "win32":
-                yield "python%d%d" % ver
-
-    def _gen_pythons(self):
-        import which  # `pypm|pip install which`
-        python_from_ver = {}
-        for name in self._gen_python_names():
-            for python in which.whichall(name):
-                ver = self._python_ver_from_python(python)
-                if ver not in python_from_ver:
-                    python_from_ver[ver] = python
-        for ver, python in sorted(python_from_ver.items()):
-            yield ver, python
-
-
-
-
-#---- internal support stuff
-
-## {{{ http://code.activestate.com/recipes/577058/ (r2)
-def query_yes_no(question, default="yes"):
-    """Ask a yes/no question via raw_input() and return their answer.
-
-    "question" is a string that is presented to the user.
-    "default" is the presumed answer if the user just hits <Enter>.
-        It must be "yes" (the default), "no" or None (meaning
-        an answer is required of the user).
-
-    The "answer" return value is one of "yes" or "no".
-    """
-    valid = {"yes":"yes",   "y":"yes",  "ye":"yes",
-             "no":"no",     "n":"no"}
-    if default == None:
-        prompt = " [y/n] "
-    elif default == "yes":
-        prompt = " [Y/n] "
-    elif default == "no":
-        prompt = " [y/N] "
-    else:
-        raise ValueError("invalid default answer: '%s'" % default)
-
-    while 1:
-        sys.stdout.write(question + prompt)
-        choice = raw_input().lower()
-        if default is not None and choice == '':
-            return default
-        elif choice in valid.keys():
-            return valid[choice]
-        else:
-            sys.stdout.write("Please respond with 'yes' or 'no' "\
-                             "(or 'y' or 'n').\n")
-## end of http://code.activestate.com/recipes/577058/ }}}
-
-
-def _setup_command_prefix():
-    prefix = ""
-    if sys.platform == "darwin":
-        # http://forums.macosxhints.com/archive/index.php/t-43243.html
-        # This is an Apple customization to `tar` to avoid creating
-        # '._foo' files for extended-attributes for archived files.
-        prefix = "COPY_EXTENDED_ATTRIBUTES_DISABLE=1 "
-    return prefix
-
-def _capture_stdout(argv):
-    import subprocess
-    p = subprocess.Popen(argv, stdout=subprocess.PIPE)
-    return p.communicate()[0]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/appdirs-1.4.0/PKG-INFO new/appdirs-1.4.1/PKG-INFO
--- old/appdirs-1.4.0/PKG-INFO  2014-08-17 19:33:51.000000000 +0200
+++ new/appdirs-1.4.1/PKG-INFO  2017-02-06 02:32:41.000000000 +0100
@@ -1,10 +1,10 @@
 Metadata-Version: 1.1
 Name: appdirs
-Version: 1.4.0
+Version: 1.4.1
 Summary: A small Python module for determining appropriate " +         
"platform-specific dirs, e.g. a "user data dir".
 Home-page: http://github.com/ActiveState/appdirs
-Author: Trent Mick; Sridhar Ratnakumar
-Author-email: [email protected]; [email protected]
+Author: Trent Mick; Sridhar Ratnakumar; Jeff Rouse
+Author-email: [email protected]; [email protected]; [email protected]
 License: MIT
 Description: 
         .. image:: https://secure.travis-ci.org/ActiveState/appdirs.png
@@ -150,6 +150,12 @@
         appdirs Changelog
         =================
         
+        appdirs 1.4.1
+        -------------
+        
+        - [issue #38] Fix _winreg import on Windows Py3
+        - [issue #55] Make appname optional
+        
         appdirs 1.4.0
         -------------
         - [PR #42] AppAuthor is now optional on Windows
@@ -163,7 +169,7 @@
           everybody
         - [Unix] Removes gratuitous case mangling of the case, since \*nix-es 
are
           usually case sensitive, so mangling is not wise
-        - [Unix] Fixes the uterly wrong behaviour in ``site_data_dir``, return 
result
+        - [Unix] Fixes the utterly wrong behaviour in ``site_data_dir``, 
return result
           based on XDG_DATA_DIRS and make room for respecting the standard 
which
           specifies XDG_DATA_DIRS is a multiple-value variable
         - [Issue 6] Add ``*_config_dir`` which are distinct on nix-es, 
according to
@@ -223,11 +229,13 @@
 Classifier: License :: OSI Approved :: MIT License
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.4
-Classifier: Programming Language :: Python :: 2.5
 Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.1
 Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/appdirs-1.4.0/appdirs.egg-info/PKG-INFO 
new/appdirs-1.4.1/appdirs.egg-info/PKG-INFO
--- old/appdirs-1.4.0/appdirs.egg-info/PKG-INFO 2014-08-17 19:33:51.000000000 
+0200
+++ new/appdirs-1.4.1/appdirs.egg-info/PKG-INFO 2017-02-06 02:32:41.000000000 
+0100
@@ -1,10 +1,10 @@
 Metadata-Version: 1.1
 Name: appdirs
-Version: 1.4.0
+Version: 1.4.1
 Summary: A small Python module for determining appropriate " +         
"platform-specific dirs, e.g. a "user data dir".
 Home-page: http://github.com/ActiveState/appdirs
-Author: Trent Mick; Sridhar Ratnakumar
-Author-email: [email protected]; [email protected]
+Author: Trent Mick; Sridhar Ratnakumar; Jeff Rouse
+Author-email: [email protected]; [email protected]; [email protected]
 License: MIT
 Description: 
         .. image:: https://secure.travis-ci.org/ActiveState/appdirs.png
@@ -150,6 +150,12 @@
         appdirs Changelog
         =================
         
+        appdirs 1.4.1
+        -------------
+        
+        - [issue #38] Fix _winreg import on Windows Py3
+        - [issue #55] Make appname optional
+        
         appdirs 1.4.0
         -------------
         - [PR #42] AppAuthor is now optional on Windows
@@ -163,7 +169,7 @@
           everybody
         - [Unix] Removes gratuitous case mangling of the case, since \*nix-es 
are
           usually case sensitive, so mangling is not wise
-        - [Unix] Fixes the uterly wrong behaviour in ``site_data_dir``, return 
result
+        - [Unix] Fixes the utterly wrong behaviour in ``site_data_dir``, 
return result
           based on XDG_DATA_DIRS and make room for respecting the standard 
which
           specifies XDG_DATA_DIRS is a multiple-value variable
         - [Issue 6] Add ``*_config_dir`` which are distinct on nix-es, 
according to
@@ -223,11 +229,13 @@
 Classifier: License :: OSI Approved :: MIT License
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.4
-Classifier: Programming Language :: Python :: 2.5
 Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.1
 Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/appdirs-1.4.0/appdirs.egg-info/SOURCES.txt 
new/appdirs-1.4.1/appdirs.egg-info/SOURCES.txt
--- old/appdirs-1.4.0/appdirs.egg-info/SOURCES.txt      2014-08-17 
19:33:51.000000000 +0200
+++ new/appdirs-1.4.1/appdirs.egg-info/SOURCES.txt      2017-02-06 
02:32:41.000000000 +0100
@@ -1,7 +1,6 @@
 CHANGES.rst
 LICENSE.txt
 MANIFEST.in
-Makefile.py
 README.rst
 appdirs.py
 setup.cfg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/appdirs-1.4.0/appdirs.py new/appdirs-1.4.1/appdirs.py
--- old/appdirs-1.4.0/appdirs.py        2014-08-17 19:31:33.000000000 +0200
+++ new/appdirs-1.4.1/appdirs.py        2017-02-02 08:00:59.000000000 +0100
@@ -13,7 +13,7 @@
 # - Mac OS X: 
http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/index.html
 # - XDG spec for Un*x: 
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
 
-__version_info__ = (1, 4, 0)
+__version_info__ = (1, 4, 1)
 __version__ = '.'.join(map(str, __version_info__))
 
 
@@ -117,7 +117,7 @@
             returned, or '/usr/local/share/<AppName>',
             if XDG_DATA_DIRS is not set
 
-    Typical user data directories are:
+    Typical site data directories are:
         Mac OS X:   /Library/Application Support/<AppName>
         Unix:       /usr/local/share/<AppName> or /usr/share/<AppName>
         Win XP:     C:\Documents and Settings\All Users\Application 
Data\<AppAuthor>\<AppName>
@@ -184,13 +184,13 @@
             <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx>
             for a discussion of issues.
 
-    Typical user data directories are:
+    Typical user config directories are:
         Mac OS X:               same as user_data_dir
         Unix:                   ~/.config/<AppName>     # or in 
$XDG_CONFIG_HOME, if defined
         Win *:                  same as user_data_dir
 
     For Unix, we follow the XDG spec and support $XDG_CONFIG_HOME.
-    That means, by deafult "~/.config/<AppName>".
+    That means, by default "~/.config/<AppName>".
     """
     if system in ["win32", "darwin"]:
         path = user_data_dir(appname, appauthor, None, roaming)
@@ -222,7 +222,7 @@
             returned. By default, the first item from XDG_CONFIG_DIRS is
             returned, or '/etc/xdg/<AppName>', if XDG_CONFIG_DIRS is not set
 
-    Typical user data directories are:
+    Typical site config directories are:
         Mac OS X:   same as site_data_dir
         Unix:       /etc/xdg/<AppName> or $XDG_CONFIG_DIRS[i]/<AppName> for 
each value in
                     $XDG_CONFIG_DIRS
@@ -311,6 +311,48 @@
     return path
 
 
+def user_state_dir(appname=None, appauthor=None, version=None, roaming=False):
+    r"""Return full path to the user-specific state dir for this application.
+
+        "appname" is the name of application.
+            If None, just the system directory is returned.
+        "appauthor" (only used on Windows) is the name of the
+            appauthor or distributing body for this application. Typically
+            it is the owning company name. This falls back to appname. You may
+            pass False to disable it.
+        "version" is an optional version path element to append to the
+            path. You might want to use this if you want multiple versions
+            of your app to be able to run independently. If used, this
+            would typically be "<major>.<minor>".
+            Only applied when appname is present.
+        "roaming" (boolean, default False) can be set True to use the Windows
+            roaming appdata directory. That means that for users on a Windows
+            network setup for roaming profiles, this user data will be
+            sync'd on login. See
+            <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx>
+            for a discussion of issues.
+
+    Typical user state directories are:
+        Mac OS X:  same as user_data_dir
+        Unix:      ~/.local/state/<AppName>   # or in $XDG_STATE_HOME, if 
defined
+        Win *:     same as user_data_dir
+
+    For Unix, we follow this Debian proposal 
<https://wiki.debian.org/XDGBaseDirectorySpecification#state>
+    to extend the XDG spec and support $XDG_STATE_HOME.
+
+    That means, by default "~/.local/state/<AppName>".
+    """
+    if system in ["win32", "darwin"]:
+        path = user_data_dir(appname, appauthor, None, roaming)
+    else:
+        path = os.getenv('XDG_STATE_HOME', 
os.path.expanduser("~/.local/state"))
+        if appname:
+            path = os.path.join(path, appname)
+    if appname and version:
+        path = os.path.join(path, version)
+    return path
+
+
 def user_log_dir(appname=None, appauthor=None, version=None, opinion=True):
     r"""Return full path to the user-specific log dir for this application.
 
@@ -329,7 +371,7 @@
             "Logs" to the base app data dir for Windows, and "log" to the
             base cache dir for Unix. See discussion below.
 
-    Typical user cache directories are:
+    Typical user log directories are:
         Mac OS X:   ~/Library/Logs/<AppName>
         Unix:       ~/.cache/<AppName>/log  # or under $XDG_CACHE_HOME if 
defined
         Win XP:     C:\Documents and Settings\<username>\Local 
Settings\Application Data\<AppAuthor>\<AppName>\Logs
@@ -364,8 +406,8 @@
 
 class AppDirs(object):
     """Convenience wrapper for getting application dirs."""
-    def __init__(self, appname, appauthor=None, version=None, roaming=False,
-                 multipath=False):
+    def __init__(self, appname=None, appauthor=None, version=None,
+            roaming=False, multipath=False):
         self.appname = appname
         self.appauthor = appauthor
         self.version = version
@@ -398,6 +440,11 @@
                               version=self.version)
 
     @property
+    def user_state_dir(self):
+        return user_state_dir(self.appname, self.appauthor,
+                              version=self.version)
+
+    @property
     def user_log_dir(self):
         return user_log_dir(self.appname, self.appauthor,
                             version=self.version)
@@ -410,7 +457,10 @@
     registry for this guarantees us the correct answer for all CSIDL_*
     names.
     """
-    import _winreg
+    if PY3:
+      import winreg as _winreg
+    else:
+      import _winreg
 
     shell_folder_name = {
         "CSIDL_APPDATA": "AppData",
@@ -500,7 +550,7 @@
     if has_high_char:
         buf = array.zeros('c', buf_size)
         kernel = win32.Kernel32.INSTANCE
-        if kernal.GetShortPathName(dir, buf, buf_size):
+        if kernel.GetShortPathName(dir, buf, buf_size):
             dir = jna.Native.toString(buf.tostring()).rstrip("\0")
 
     return dir
@@ -527,9 +577,15 @@
     appname = "MyApp"
     appauthor = "MyCompany"
 
-    props = ("user_data_dir", "site_data_dir",
-             "user_config_dir", "site_config_dir",
-             "user_cache_dir", "user_log_dir")
+    props = ("user_data_dir",
+             "user_config_dir",
+             "user_cache_dir",
+             "user_state_dir",
+             "user_log_dir",
+             "site_data_dir",
+             "site_config_dir")
+
+    print("-- app dirs %s --" % __version__)
 
     print("-- app dirs (with optional 'version')")
     dirs = AppDirs(appname, appauthor, version="1.0")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/appdirs-1.4.0/setup.cfg new/appdirs-1.4.1/setup.cfg
--- old/appdirs-1.4.0/setup.cfg 2014-08-17 19:33:51.000000000 +0200
+++ new/appdirs-1.4.1/setup.cfg 2017-02-06 02:32:41.000000000 +0100
@@ -4,5 +4,4 @@
 [egg_info]
 tag_build = 
 tag_date = 0
-tag_svn_revision = 0
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/appdirs-1.4.0/setup.py new/appdirs-1.4.1/setup.py
--- old/appdirs-1.4.0/setup.py  2014-08-17 19:27:12.000000000 +0200
+++ new/appdirs-1.4.1/setup.py  2017-02-02 09:17:41.000000000 +0100
@@ -29,13 +29,15 @@
         License :: OSI Approved :: MIT License
         Operating System :: OS Independent
         Programming Language :: Python :: 2
-        Programming Language :: Python :: 2.4
-        Programming Language :: Python :: 2.5
         Programming Language :: Python :: 2.6
         Programming Language :: Python :: 2.7
         Programming Language :: Python :: 3
-        Programming Language :: Python :: 3.1
         Programming Language :: Python :: 3.2
+        Programming Language :: Python :: 3.3
+        Programming Language :: Python :: 3.4
+        Programming Language :: Python :: 3.5
+        Programming Language :: Python :: Implementation :: PyPy
+        Programming Language :: Python :: Implementation :: CPython
         Topic :: Software Development :: Libraries :: Python Modules
         """.split('\n') if c.strip()],
     test_suite='test.test_api',
@@ -43,8 +45,8 @@
     keywords='application directory log cache user',
     author='Trent Mick',
     author_email='[email protected]',
-    maintainer='Trent Mick; Sridhar Ratnakumar',
-    maintainer_email='[email protected]; [email protected]',
+    maintainer='Trent Mick; Sridhar Ratnakumar; Jeff Rouse',
+    maintainer_email='[email protected]; [email protected]; [email protected]',
     url='http://github.com/ActiveState/appdirs',
     license='MIT',
     py_modules=["appdirs"],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/appdirs-1.4.0/test/test_api.py 
new/appdirs-1.4.1/test/test_api.py
--- old/appdirs-1.4.0/test/test_api.py  2014-08-17 19:27:12.000000000 +0200
+++ new/appdirs-1.4.1/test/test_api.py  2017-02-02 08:00:59.000000000 +0100
@@ -25,6 +25,8 @@
         self.assertIsInstance(
             appdirs.user_cache_dir('MyApp', 'MyCompany'), STRING_TYPE)
         self.assertIsInstance(
+            appdirs.user_state_dir('MyApp', 'MyCompany'), STRING_TYPE)
+        self.assertIsInstance(
             appdirs.user_log_dir('MyApp', 'MyCompany'), STRING_TYPE)
 
     def test_dirs(self):
@@ -32,6 +34,7 @@
         self.assertIsInstance(dirs.user_data_dir, STRING_TYPE)
         self.assertIsInstance(dirs.site_data_dir, STRING_TYPE)
         self.assertIsInstance(dirs.user_cache_dir, STRING_TYPE)
+        self.assertIsInstance(dirs.user_state_dir, STRING_TYPE)
         self.assertIsInstance(dirs.user_log_dir, STRING_TYPE)
 
 if __name__ == "__main__":

++++++ desetuptoolize.patch ++++++
Index: appdirs-1.4.1/setup.py
===================================================================
--- appdirs-1.4.1.orig/setup.py
+++ appdirs-1.4.1/setup.py
@@ -2,7 +2,7 @@
 import sys
 import os
 import os.path
-from setuptools import setup
+from distutils.core import setup
 import appdirs
 
 tests_require = []

Reply via email to