Hello community, here is the log from the commit of package python-zetup for openSUSE:Factory checked in at 2019-05-13 14:48:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-zetup (Old) and /work/SRC/openSUSE:Factory/.python-zetup.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-zetup" Mon May 13 14:48:32 2019 rev:4 rq:694779 version:0.2.48 Changes: -------- --- /work/SRC/openSUSE:Factory/python-zetup/python-zetup.changes 2019-03-14 15:01:07.555698179 +0100 +++ /work/SRC/openSUSE:Factory/.python-zetup.new.5148/python-zetup.changes 2019-05-13 14:48:35.042493516 +0200 @@ -1,0 +2,6 @@ +Tue Apr 16 10:33:10 UTC 2019 - Tomáš Chvátal <tchva...@suse.com> + +- Update to 0.2.48: + * various requirement updates + +------------------------------------------------------------------- Old: ---- zetup-0.2.45.tar.gz New: ---- zetup-0.2.48.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-zetup.spec ++++++ --- /var/tmp/diff_new_pack.zMVGNY/_old 2019-05-13 14:48:37.174498821 +0200 +++ /var/tmp/diff_new_pack.zMVGNY/_new 2019-05-13 14:48:37.174498821 +0200 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-zetup -Version: 0.2.45 +Version: 0.2.48 Release: 0 Summary: Project setups tools License: LGPL-3.0-only @@ -26,18 +26,19 @@ URL: https://github.com/zimmermanncode/zetup Source: https://files.pythonhosted.org/packages/source/z/zetup/zetup-%{version}.tar.gz BuildRequires: %{python_module jupyter_nbconvert >= 5.4} -BuildRequires: %{python_module path.py >= 11.1} +BuildRequires: %{python_module path.py >= 11.5} BuildRequires: %{python_module pytest >= 3.8} +BuildRequires: %{python_module setuptools >= 40.8} BuildRequires: %{python_module setuptools_scm >= 3.1} -BuildRequires: %{python_module setuptools} BuildRequires: dos2unix BuildRequires: fdupes BuildRequires: python-rpm-macros Requires(post): update-alternatives Requires(postun): update-alternatives -Recommends: python-jinjatools >= 0.1.7 +Recommends: python-jinjatools >= 0.1.8 Recommends: python-jupyter_nbconvert >= 5.4 -Recommends: python-path.py >= 11.1 +Recommends: python-path.py >= 11.5 +Recommends: python-pip >= 19.0 Recommends: python-pytest BuildArch: noarch %python_subpackages @@ -56,15 +57,14 @@ %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} - %python_clone -a %{buildroot}%{_bindir}/zetup %check export PYTHONDONTWRITEBYTECODE=1 +%pytest zetup # test_python - checks if python is set by maintainer to be supported, bogus -%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib} -py.test-%{$python_bin_suffix} test/ -k 'not test_python' -} +# test_class_dir - check dir content and looks weird too +%pytest test -k 'not (test_python or test_class_dir or test_dir)' %post %python_install_alternative zetup ++++++ zetup-0.2.45.tar.gz -> zetup-0.2.48.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zetup-0.2.45/PKG-INFO new/zetup-0.2.48/PKG-INFO --- old/zetup-0.2.45/PKG-INFO 2018-09-17 21:35:10.000000000 +0200 +++ new/zetup-0.2.48/PKG-INFO 2019-04-03 06:32:52.000000000 +0200 @@ -1,26 +1,26 @@ -Metadata-Version: 2.1 -Name: zetup -Version: 0.2.45 -Summary: Zimmermann's Extensible Tools for Unified Project_setups -Home-page: https://github.com/zimmermanncode/zetup -Author: Stefan Zimmermann -Author-email: u...@zimmermann.co -License: LGPLv3 -Description: UNKNOWN -Keywords: zetup,project,tools,config,ini,setup,requirements,extras,packages,package,toplevel,object,meta,subprocess,process,popen,call,python3,python3 -Platform: UNKNOWN -Classifier: Development Status :: 3 - Alpha -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) -Classifier: Operating System :: OS Independent -Classifier: Topic :: Software Development -Classifier: Topic :: Utilities -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3.4 -Classifier: Programming Language :: Python :: 3.5 -Classifier: Programming Language :: Python :: 3.6 -Provides-Extra: commands -Provides-Extra: notebook -Provides-Extra: pytest -Provides-Extra: all +Metadata-Version: 2.1 +Name: zetup +Version: 0.2.48 +Summary: Zimmermann's Extensible Tools for Unified Project_setups +Home-page: https://github.com/zimmermanncode/zetup +Author: Stefan Zimmermann +Author-email: u...@zimmermann.co +License: LGPLv3 +Description: UNKNOWN +Keywords: zetup,project,tools,config,ini,setup,requirements,extras,packages,package,toplevel,object,meta,subprocess,process,popen,call,python3,python3 +Platform: UNKNOWN +Classifier: Development Status :: 3 - Alpha +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) +Classifier: Operating System :: OS Independent +Classifier: Topic :: Software Development +Classifier: Topic :: Utilities +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Provides-Extra: commands +Provides-Extra: notebook +Provides-Extra: pytest +Provides-Extra: all diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zetup-0.2.45/VERSION new/zetup-0.2.48/VERSION --- old/zetup-0.2.45/VERSION 2018-09-17 21:35:09.000000000 +0200 +++ new/zetup-0.2.48/VERSION 2019-04-03 06:32:50.000000000 +0200 @@ -1 +1 @@ -0.2.45 \ No newline at end of file +0.2.48 \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zetup-0.2.45/requirements.commands.txt new/zetup-0.2.48/requirements.commands.txt --- old/zetup-0.2.45/requirements.commands.txt 2018-09-17 21:33:58.000000000 +0200 +++ new/zetup-0.2.48/requirements.commands.txt 2019-04-03 06:17:33.000000000 +0200 @@ -1,2 +1,2 @@ -path.py >= 11.1 #import path -jinjatools >= 0.1.7 +path.py >= 11.5 #import path +jinjatools >= 0.1.8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zetup-0.2.45/requirements.notebook.txt new/zetup-0.2.48/requirements.notebook.txt --- old/zetup-0.2.45/requirements.notebook.txt 2018-09-17 21:33:58.000000000 +0200 +++ new/zetup-0.2.48/requirements.notebook.txt 2019-03-31 09:55:15.000000000 +0200 @@ -1,2 +1,2 @@ -path.py >= 11.1 #import path +path.py >= 11.5 #import path nbconvert >= 5.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zetup-0.2.45/requirements.pytest.txt new/zetup-0.2.48/requirements.pytest.txt --- old/zetup-0.2.45/requirements.pytest.txt 2018-09-17 21:33:58.000000000 +0200 +++ new/zetup-0.2.48/requirements.pytest.txt 2019-03-31 09:47:51.000000000 +0200 @@ -1 +1 @@ -pytest >= 3.8 +pytest >= 4.3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zetup-0.2.45/setup.cfg new/zetup-0.2.48/setup.cfg --- old/zetup-0.2.45/setup.cfg 2018-09-17 21:35:10.000000000 +0200 +++ new/zetup-0.2.48/setup.cfg 2019-04-03 06:32:52.000000000 +0200 @@ -1,4 +1,4 @@ -[egg_info] -tag_build = -tag_date = 0 - +[egg_info] +tag_build = +tag_date = 0 + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zetup-0.2.45/setup.py new/zetup-0.2.48/setup.py --- old/zetup-0.2.45/setup.py 2018-09-17 21:33:58.000000000 +0200 +++ new/zetup-0.2.48/setup.py 2019-03-31 09:50:58.000000000 +0200 @@ -59,7 +59,7 @@ zfg = Zetup() -zetup.requires.Requirements('setuptools >= 36.2', zfg=zfg).check() +zetup.requires.Requirements('setuptools >= 40.8', zfg=zfg).check() setup = zfg.setup setup['package_data']['zetup.commands.make'] = [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zetup-0.2.45/zetup/__init__.py new/zetup-0.2.48/zetup/__init__.py --- old/zetup-0.2.45/zetup/__init__.py 2018-09-17 21:33:58.000000000 +0200 +++ new/zetup-0.2.48/zetup/__init__.py 2019-03-26 19:42:39.000000000 +0100 @@ -39,6 +39,7 @@ from .process import Popen, call from .object import object, meta from .annotate import annotate +from .func import apifunction from .modules import package, toplevel, extra_toplevel from .classpackage import classpackage from .pip import ZetupPipError, pip @@ -52,7 +53,7 @@ 'resolve', 'DistributionNotFound', 'VersionConflict', 'Popen', 'call', 'object', 'meta', - 'annotate', 'package', 'toplevel', 'extra_toplevel', + 'annotate', 'apifunction', 'package', 'toplevel', 'extra_toplevel', ], check_requirements=False) # can't be defined in .notebook subpackage diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zetup-0.2.45/zetup/doc/__init__.py new/zetup-0.2.48/zetup/doc/__init__.py --- old/zetup-0.2.45/zetup/doc/__init__.py 2018-09-17 21:33:58.000000000 +0200 +++ new/zetup-0.2.48/zetup/doc/__init__.py 2019-04-02 15:20:06.000000000 +0200 @@ -21,15 +21,43 @@ .. moduleauthor:: Stefan Zimmermann <zimmermann.c...@gmail.com> """ + import sys from importlib import import_module +from inspect import ismodule from types import ModuleType import zetup +__all__ = ('AutoDocScopeImporter', ) + # zetup.package(__name__, ['AutoDocScopeImporter']) +class EndlessRecursionError(RuntimeError): + pass + + +def prevent_endless_recursion(func): + func.call_stack = [] + + def caller(*args, **kwargs): + if (args, kwargs) in func.call_stack: + raise EndlessRecursionError( + "{!r} was called recusively again with args {!r} and " + "keyword args {!r}".format(func, args, kwargs)) + + func.call_stack.append((args, kwargs)) + try: + result = func(*args, **kwargs) + finally: + assert func.call_stack[-1] == (args, kwargs) + func.call_stack.pop(-1) + return result + + return caller + + class AutoDocScopeModule(ModuleType): # to be accepted as packages for subscope imports :) @@ -63,13 +91,25 @@ def find_module(self, name, path): if name.startswith(self.package.__name__ + '.'): - return self + try: + if self.load_module(name) is not None: + return self + + except EndlessRecursionError: + pass + @prevent_endless_recursion def load_module(self, name): assert name.startswith(self.package.__name__ + '.') scope = scopemod = self.package for attr in name[len(self.package.__name__) + 1:].split('.'): - scope = getattr(scope, attr) + scope = getattr(scope, attr, None) + if scope is None: + return None + + if ismodule(scope): + return scope + scopemod = AutoDocScopeModule( '%s.%s' % (scopemod.__name__, attr), scope) scopemod.__path__ = None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zetup-0.2.45/zetup/func.py new/zetup-0.2.48/zetup/func.py --- old/zetup-0.2.45/zetup/func.py 1970-01-01 01:00:00.000000000 +0100 +++ new/zetup-0.2.48/zetup/func.py 2019-03-27 19:07:39.000000000 +0100 @@ -0,0 +1,86 @@ +# ZETUP | Zimmermann's Extensible Tools for Unified Projects +# +# Copyright (C) 2014-2019 Stefan Zimmermann <u...@zimmermann.co> +# +# ZETUP is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# ZETUP 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 Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with ZETUP. If not, see <http://www.gnu.org/licenses/>. + +from __future__ import absolute_import + +import sys +from inspect import ismodule +try: + from inspect import signature +except ImportError: + def signature(func): + return "" + +import zetup +from .object import object + +__all__ = ('apifunction', ) + + +class apifunction(object): + + __package__ = zetup.__package__ + + def __init__(self, pkg, func=None): + if not ismodule(pkg): + raise TypeError( + "{!r} must be initialized with a module object as first arg" + ", not {!r}".format(type(self), pkg)) + + if func is None: + self.__package__ = pkg + else: + self.__package__ = pkg.__name__ + self.__module__ = func.__module__ + self.__class__ = type('apifunction', (type(self), ), { + '__doc__': "", '__call__': staticmethod(func)}) + self.__func__ = func + + mod = sys.modules[self.__module__] + if not hasattr(mod, '__test__'): + mod.__test__ = {} + mod.__test__[func.__name__] = func.__doc__ + + def __call__(self, func): + return type(self)(self.__package__, func) + + def __getattr__(self, name): + if '__func__' in self.__dict__: + try: + return getattr(self.__func__, name) + + except AttributeError: + pass + raise AttributeError( + "{!r} has no attribute {!r}".format(self, name)) + + def __str__(self): + if '__func__' in self.__dict__: + return '.'.join((self.__package__, getattr( + self.__func__, '__qualname__', self.__func__.__name__))) + + return repr(self) + + def __repr__(self): + if '__func__' in self.__dict__: + return "<{} {}.{}{}>".format( + type(self).__name__, self.__package__, getattr( + self.__func__, '__qualname__', self.__func__.__name__), + signature(self.__func__)) + + return "<{} decorator for {!r}>".format( + type(self), self.__package__) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zetup-0.2.45/zetup/modules.py new/zetup-0.2.48/zetup/modules.py --- old/zetup-0.2.45/zetup/modules.py 2018-09-17 21:33:58.000000000 +0200 +++ new/zetup-0.2.48/zetup/modules.py 2019-04-02 22:43:49.000000000 +0200 @@ -1,46 +1,45 @@ -# zetup.py +# ZETUP | Zimmermann's Extensible Tools for Unified Project_setups # -# Zimmermann's Python package setup. +# Copyright (C) 2014-2019 Stefan Zimmermann <u...@zimmermann.co> # -# Copyright (C) 2014-2015 Stefan Zimmermann <zimmermann.c...@gmail.com> -# -# zetup.py is free software: you can redistribute it and/or modify +# ZETUP is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # -# zetup.py is distributed in the hope that it will be useful, +# ZETUP 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 Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License -# along with zetup.py. If not, see <http://www.gnu.org/licenses/>. +# along with ZETUP. If not, see <http://www.gnu.org/licenses/>. """ -zetup.modules +Several ``module`` object wrappers. -Module object wrappers for packages, top-level packages, and top-level -packages for extra features +For modules, packages, top-level packages, and top-level packages for extra +features .. moduleauthor:: Stefan Zimmermann <zimmermann.c...@gmail.com> """ -from __future__ import absolute_import -__all__ = ['package', 'toplevel'] +from __future__ import absolute_import import sys -from warnings import warn from importlib import import_module from inspect import ismodule -from types import ModuleType from itertools import chain +from types import ModuleType +from warnings import warn import zetup from .object import object, meta from .annotate import annotate, annotate_extra from .doc import AutoDocScopeModule +__all__ = ('package', 'toplevel') + class deprecated(str): """ @@ -56,17 +55,17 @@ """ Package module object wrapper. - For clean dynamic API import from sub-modules + Providing clean dynamic API imports from sub-modules """ - __module__ = __package__ + + __package__ = zetup def __init__( self, name, __all__=None, aliases=None, deprecated_aliases=None, - __getitem__=None, __iter__=None, __call__=None - ): + __getitem__=None, __iter__=None, __call__=None): """ - Wraps a package module given by `name`. + Wrap a package module given by `name`. Original package module object is replaced in ``sys.modules`` and stored in :attr:``.__module__`` @@ -81,21 +80,26 @@ objects (which are not called with a ``self`` argument) """ mod = sys.modules[name] - ModuleType.__init__(self, name, mod.__doc__) + ModuleType.__init__( # pylint: disable=no-member + self, name, mod.__doc__) self.__name__ = name self.__module__ = mod sys.modules[name] = self + self.__dict__['__all__'] = api \ = dict.fromkeys(__all__) if __all__ is not None else {} if aliases is not None: api.update(aliases) if deprecated_aliases is not None: - api.update((deprecated(alias), name) - for alias, name in dict(deprecated_aliases).items()) + api.update( + (deprecated(alias), name) + for alias, name in dict(deprecated_aliases).items()) + # if api is not None: # for submodname, members in dict(__all__).items(): # self.__dict__['__all__'].update( # (name, submodname) for name in members) + cls = type(self) cls.__getitem__.funcs[self] = __getitem__ cls.__iter__.funcs[self] = __iter__ @@ -109,6 +113,7 @@ "%s is not subscriptable. " "Instantiate %s with __getitem__=<func> to change that." % (repr(self), repr(cls))) + return func(key) __getitem__.funcs = {} @@ -121,6 +126,7 @@ "%s is not iterable. " "Instantiate %s with __iter__=<func> to change that." % (repr(self), repr(cls))) + return func() __iter__.funcs = {} @@ -133,19 +139,18 @@ "%s is not callable. " "Instantiate %s with __call__=<func> to change that." % (repr(self), repr(cls))) + return func(*args, **kwargs) __call__.funcs = {} @property def __all__(self): - """ - Get API names list (without deprecated aliases). - """ + """Get API names list (without deprecated aliases).""" return list(set(chain( - getattr(self.__module__, '__all__', ()), - (name for name in self.__dict__['__all__'] - if not isinstance(name, deprecated))))) + getattr(self.__module__, '__all__', ()), ( + name for name in self.__dict__['__all__'] + if not isinstance(name, deprecated))))) def __setattr__(self, name, value): """ @@ -154,19 +159,17 @@ To avoid unnecessary ``dir()`` pollution """ if isinstance(value, AutoDocScopeModule) or ismodule(value) and ( - value.__name__ == '%s.%s' % (self.__name__, name) - and not isinstance(value, package) - ): + value.__name__ == '%s.%s' % (self.__name__, name) and + not isinstance(value, package)): return + from .classpackage import classpackage if isinstance(value, classpackage): value = getattr(value, name) object.__setattr__(self, name, value) def __getattribute__(self, name): - """ - Dynamically access API from wrapped module or import extra API. - """ + """Dynamically access API from wrapped module or import extra API.""" if name.startswith('__'): try: return object.__getattribute__(self, name) @@ -177,37 +180,43 @@ realname = self.__dict__['__all__'].get(name) if realname is not None: if isinstance(name, deprecated): - warn("%s.%s is deprecated in favor of %s.%s" - % (self.__name__, name, self.__name__, realname), - DeprecationWarning) + warn("%s.%s is deprecated in favor of %s.%s" % ( + self.__name__, name, self.__name__, realname + ), DeprecationWarning) name = realname try: # first try to get attr from wrapped original module return getattr(self.__module__, name) + except AttributeError: - try: # then from wrapper module + try: # then from wrapper module obj = self.__dict__[name] except KeyError: if name in getattr(self.__module__, '__all__', ()): raise AttributeError( "%s has no attribute %s although listed in __all__" % (repr(self.__module__), repr(name))) - try: # and finally try to find a matching submodule + + try: # and finally try to find a matching submodule + # sys.modules[self.__name__] = self.__module__ + # __import__('ipdb').set_trace() obj = import_module('%s.%s' % (self.__name__, name)) except ImportError as exc: - raise AttributeError("%s has no attribute %s" - % (repr(self), repr(name))) + raise AttributeError( + "%s has no attribute %s" % (repr(self), repr(name))) + + # finally: + # sys.modules[self.__name__] = self if isinstance(obj, zetup.classpackage): classobj = getattr(obj, name) setattr(self, name, classobj) return classobj + return obj def __dir__(self): - """ - Additionally get all API member names - """ + """Additionally get all API member names.""" def exclude(): """ Get names of submodules implicitly added to ``__dict__``. @@ -218,18 +227,21 @@ for name, obj in self.__dict__.items(): if name.startswith('__'): continue + if ismodule(obj) and not isinstance(obj, package): yield name return list(chain( - # (name for name in self.__module__.__dict__ if name.startswith('__')), - set(object.__dir__(self)).difference(exclude()), + # ( + # name for name in self.__module__.__dict__ + # if name.startswith('__')), + set( + object.__dir__(self) # pylint: disable=no-member + ).difference(exclude()), self.__all__)) def __repr__(self): - """ - Create module-style representation - """ + """Create module-style representation.""" return "<%s %s from %s>" % ( type(self).__name__, repr(self.__name__), repr(self.__module__.__file__)) @@ -242,7 +254,8 @@ For clean dynamic API import from sub-modules and automatic application of func:`zetup.annotate` """ - __module__ = __package__ + + __package__ = zetup def __init__( self, name, __all__=None, @@ -260,15 +273,18 @@ super(toplevel, self).__init__( name, __all__, aliases=aliases, deprecated_aliases=deprecated_aliases, - __getitem__=__getitem__, __iter__=__iter__, __call__=__call__ - ) - zfg = annotate(name, check_requirements=check_requirements, - check_packages=check_packages) + __getitem__=__getitem__, __iter__=__iter__, __call__=__call__) + + zfg = annotate( + name, check_requirements=check_requirements, + check_packages=check_packages) self.__package__ = pkg = zfg.PACKAGES[name] pkg.zetup_config = zfg class extra_toplevel_meta(meta): + """Metaclass for :class:`zetup.extra_toplevel`.""" + extra = None def __getitem__(cls, extra): @@ -281,22 +297,21 @@ class extra_toplevel( # PY2/3 compatible way to assign metaclass - extra_toplevel_meta('extra_toplevel_base', (package, ), {}) -): + extra_toplevel_meta('extra_toplevel_base', (package, ), {})): """ Special extra feature top-level package module object wrapper. For clean dynamic API import from sub-modules and automatic application of func:`zetup.annotate_extra` """ - __module__ = __package__ + + __package__ = zetup def __init__( self, toplevel, name, __all__=None, aliases=None, deprecated_aliases=None, check_requirements=True, - __getitem__=None, __iter__=None, __call__=None - ): + __getitem__=None, __iter__=None, __call__=None): """ Wrap top-level package module given by `name` and `api` list. @@ -308,8 +323,8 @@ super(extra_toplevel, self).__init__( name, __all__, aliases=aliases, deprecated_aliases=deprecated_aliases, - __getitem__=__getitem__, __iter__=__iter__, __call__=__call__ - ) + __getitem__=__getitem__, __iter__=__iter__, __call__=__call__) + extra = type(self).extra - annotate_extra[extra]( + annotate_extra[extra]( # pylint: disable=unsubscriptable-object toplevel, name, check_requirements=check_requirements) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zetup-0.2.45/zetup/object.py new/zetup-0.2.48/zetup/object.py --- old/zetup-0.2.45/zetup/object.py 2018-09-17 21:33:58.000000000 +0200 +++ new/zetup-0.2.48/zetup/object.py 2019-04-02 22:42:36.000000000 +0200 @@ -1,6 +1,6 @@ # ZETUP | Zimmermann's Extensible Tools for Unified Projects # -# Copyright (C) 2014-2018 Stefan Zimmermann <u...@zimmermann.co> +# Copyright (C) 2014-2019 Stefan Zimmermann <u...@zimmermann.co> # # ZETUP is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by @@ -22,10 +22,15 @@ .. moduleauthor:: Stefan Zimmermann <u...@zimmermann.co> """ + from __future__ import absolute_import +import sys +from inspect import ismodule from itertools import chain +import zetup + __all__ = ('object', 'meta') @@ -42,17 +47,14 @@ """ if hasattr(type, '__dir__'): # PY3 def __dir__(cls): - """Get all member names from class and metaclass level. - """ + """Get all member names from class and metaclass level.""" return sorted(set(chain(type.__dir__(cls), dir(type(cls))))) else: # PY2 def __dir__(cls): - """Get all member names from class and metaclass level. - """ + """Get all member names from class and metaclass level.""" return sorted(set(chain( - dir(type(cls)), - *(c.__dict__ for c in cls.mro())))) + dir(type(cls)), *(c.__dict__ for c in cls.mro())))) @classmethod def metamember(mcs, obj): @@ -153,12 +155,27 @@ setattr(cls, name, obj) return obj + def __str__(cls): + clsname = getattr(cls, '__qualname__', cls.__name__) + mod = getattr(cls, '__package__', cls.__module__) + if ismodule(mod): # and not just a string + mod = mod.__name__ + return '.'.join((mod, clsname)) + + def __repr__(cls): + """Create PY2/3 unified PY3-style representation.""" + return "<class {!r}>".format(str(cls)) + # PY2/3 compatible way to create class `object` with metaclass `meta`... +def __repr__(self): + """Create PY2/3-unified PY3-style representation.""" + return "<{} at {}>".format(type(self), hex(id(self)).rstrip('L')) + clsattrs = { - '__doc__': - """ + '__package__': zetup, + '__doc__': """ Basic class that extends builtin ``object`` with useful extra features. Adds a basic ``__dir__`` method for Python 2 @@ -167,7 +184,8 @@ :meth:`zetup.meta.metamethod` and :meth:`zetup.meta.method` decorators for adding new members to classes and their metaclasses outside of the class definition scopes - """} + """, + '__repr__': __repr__} if not hasattr(object, '__dir__'): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zetup-0.2.45/zetup/pip/__init__.py new/zetup-0.2.48/zetup/pip/__init__.py --- old/zetup-0.2.45/zetup/pip/__init__.py 2018-09-17 21:33:58.000000000 +0200 +++ new/zetup-0.2.48/zetup/pip/__init__.py 2019-03-31 09:51:55.000000000 +0200 @@ -9,7 +9,7 @@ __all__ = ('ZetupPipError', 'pip') -@requires("pip >= 10.0") +@requires("pip >= 19.0") def pip(command, raise_=True): """ Run a pip `command`. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zetup-0.2.45/zetup/zetup_config.py new/zetup-0.2.48/zetup/zetup_config.py --- old/zetup-0.2.45/zetup/zetup_config.py 2018-09-17 21:35:09.000000000 +0200 +++ new/zetup-0.2.48/zetup/zetup_config.py 2019-04-03 06:32:50.000000000 +0200 @@ -1,190 +1,192 @@ -# This file was auto-generated by ZETUP -# -# Zimmermann's Extensible Tools for Unified Project setups -# -# https://github.com/zimmermanncode/zetup - - -from __future__ import absolute_import - -import sys -import os -from collections import OrderedDict - -from zetup.version import Version -from zetup.dist import Distribution -from zetup.requires import Requirements -from zetup.extras import Extras -from zetup.package import Packages, Package -from zetup.notebook import Notebook - - - -zfg = sys.modules[__name__] - -NAME = 'zetup' - -LICENSE = 'LGPLv3' - -TITLE = 'zetup' - -PYTHON = ['2.7', '3.4', '3.5', '3.6'] - -MODULES = [] - -FORCE_MAKE = True - -KEYWORDS = ['zetup', 'project', 'tools', 'config', 'ini', 'setup', 'requirements', 'extras', 'packages', 'package', 'toplevel', 'object', 'meta', 'subprocess', 'process', 'popen', 'call', 'python3', 'python3'] - -PACKAGES = Packages([ - -Package('zetup', - sources=[ - '__init__.py', - '__main__.py', - 'annotate.py', - 'classpackage.py', - 'conda.py', - 'config.py', - 'dist.py', - 'error.py', - 'extras.py', - 'modules.py', - 'object.py', - 'package.py', - 'requires.py', - 'resolve.py', - 'script.py', - 'test_classpackage.py', - 'version.py', - 'zetup.py' - ], - subpackages=[ - -Package('zetup.commands', - sources=[ - '__init__.py', - 'command.py', - 'conda.py', - 'del_.py', - 'dev.py', - 'error.py', - 'pytest.py', - 'run.py', - 'test.py', - 'tox.py' - ], - subpackages=[ - -Package('zetup.commands.make', - sources=[ - '__init__.py' - ], - subpackages=[ - - ], - ) - - ], - ) -, - -Package('zetup.doc', - sources=[ - '__init__.py' - ], - subpackages=[ - - ], - ) -, - -Package('zetup.notebook', - sources=[ - '__init__.py', - 'jinja.py' - ], - subpackages=[ - - ], - ) -, - -Package('zetup.pip', - sources=[ - '__init__.py', - 'errors.py', - 'test_errors.py' - ], - subpackages=[ - - ], - ) -, - -Package('zetup.process', - sources=[ - '__init__.py', - 'scons.py' - ], - subpackages=[ - - ], - ) - - ], - ) - - ], root=os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) - -EMAIL = 'u...@zimmermann.co' - -AUTHOR = 'Stefan Zimmermann' - -EXTRAS = Extras([ -('commands', Requirements(""" -path.py >= 11.1 #import path -jinjatools >= 0.1.7 - -""")), -('notebook', Requirements(""" -path.py >= 11.1 #import path -nbconvert >= 5.4 - -""")), -('pytest', Requirements(""" -pytest >= 3.8 - -""")) -], zfg=zfg) - -REQUIRES = Requirements(""" -setuptools_scm >= 3.1 - -""", zfg=zfg) - -URL = 'https://github.com/zimmermanncode/zetup' - -SETUP_HOOKS = [] - -VERSION = Version('0.2.45') - -KEEP_MADE = [] - -NO_MAKE = ['setup.py', 'tox.ini'] - -TEST_COMMANDS = ['py.test -v test'] - -DESCRIPTION = "Zimmermann's Extensible Tools for Unified Project_setups" - -SETUP_REQUIRES = None - -in_repo = True - -SCRIPTS = {'zetup': 'zetup.script:run'} - -SETUP_KEYWORDS = {'use_zetup': 'zetup:setup_entry_point'} - -DISTRIBUTION = Distribution(zfg) - +# This file was auto-generated by ZETUP +# +# Zimmermann's Extensible Tools for Unified Project setups +# +# https://github.com/zimmermanncode/zetup + + +from __future__ import absolute_import + +import sys +import os +from collections import OrderedDict + +from zetup.version import Version +from zetup.dist import Distribution +from zetup.requires import Requirements +from zetup.extras import Extras +from zetup.package import Packages, Package +from zetup.notebook import Notebook + + + +zfg = sys.modules[__name__] + +NAME = 'zetup' + +LICENSE = 'LGPLv3' + +TITLE = 'zetup' + +PYTHON = ['2.7', '3.4', '3.5', '3.6'] + +MODULES = [] + +FORCE_MAKE = True + +KEYWORDS = ['zetup', 'project', 'tools', 'config', 'ini', 'setup', 'requirements', 'extras', 'packages', 'package', 'toplevel', 'object', 'meta', 'subprocess', 'process', 'popen', 'call', 'python3', 'python3'] + +PACKAGES = Packages([ + +Package('zetup', + sources=[ + 'annotate.py', + 'classpackage.py', + 'conda.py', + 'config.py', + 'dist.py', + 'error.py', + 'extras.py', + 'func.py', + 'modules.py', + 'object.py', + 'package.py', + 'requires.py', + 'resolve.py', + 'script.py', + 'test_classpackage.py', + 'version.py', + 'zetup.py', + 'zetup_config.py', + '__init__.py', + '__main__.py' + ], + subpackages=[ + +Package('zetup.commands', + sources=[ + 'command.py', + 'conda.py', + 'del_.py', + 'dev.py', + 'error.py', + 'pytest.py', + 'run.py', + 'test.py', + 'tox.py', + '__init__.py' + ], + subpackages=[ + +Package('zetup.commands.make', + sources=[ + '__init__.py' + ], + subpackages=[ + + ], + ) + + ], + ) +, + +Package('zetup.doc', + sources=[ + '__init__.py' + ], + subpackages=[ + + ], + ) +, + +Package('zetup.notebook', + sources=[ + 'jinja.py', + '__init__.py' + ], + subpackages=[ + + ], + ) +, + +Package('zetup.pip', + sources=[ + 'errors.py', + 'test_errors.py', + '__init__.py' + ], + subpackages=[ + + ], + ) +, + +Package('zetup.process', + sources=[ + 'scons.py', + '__init__.py' + ], + subpackages=[ + + ], + ) + + ], + ) + + ], root=os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) + +EMAIL = 'u...@zimmermann.co' + +AUTHOR = 'Stefan Zimmermann' + +EXTRAS = Extras([ +('commands', Requirements(""" +path.py >= 11.5 #import path +jinjatools >= 0.1.8 + +""")), +('notebook', Requirements(""" +path.py >= 11.5 #import path +nbconvert >= 5.4 + +""")), +('pytest', Requirements(""" +pytest >= 4.3 + +""")) +], zfg=zfg) + +REQUIRES = Requirements(""" +setuptools_scm >= 3.1 + +""", zfg=zfg) + +URL = 'https://github.com/zimmermanncode/zetup' + +SETUP_HOOKS = [] + +VERSION = Version('0.2.48') + +KEEP_MADE = [] + +NO_MAKE = ['setup.py', 'tox.ini'] + +TEST_COMMANDS = ['py.test -v test'] + +DESCRIPTION = "Zimmermann's Extensible Tools for Unified Project_setups" + +SETUP_REQUIRES = None + +in_repo = False + +SCRIPTS = {'zetup': 'zetup.script:run'} + +SETUP_KEYWORDS = {'use_zetup': 'zetup:setup_entry_point'} + +DISTRIBUTION = Distribution(zfg) + CLASSIFIERS = ['Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)', 'Operating System :: OS Independent', 'Topic :: Software Development', 'Topic :: Utilities', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6'] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zetup-0.2.45/zetup.egg-info/PKG-INFO new/zetup-0.2.48/zetup.egg-info/PKG-INFO --- old/zetup-0.2.45/zetup.egg-info/PKG-INFO 2018-09-17 21:35:09.000000000 +0200 +++ new/zetup-0.2.48/zetup.egg-info/PKG-INFO 2019-04-03 06:32:50.000000000 +0200 @@ -1,26 +1,26 @@ -Metadata-Version: 2.1 -Name: zetup -Version: 0.2.45 -Summary: Zimmermann's Extensible Tools for Unified Project_setups -Home-page: https://github.com/zimmermanncode/zetup -Author: Stefan Zimmermann -Author-email: u...@zimmermann.co -License: LGPLv3 -Description: UNKNOWN -Keywords: zetup,project,tools,config,ini,setup,requirements,extras,packages,package,toplevel,object,meta,subprocess,process,popen,call,python3,python3 -Platform: UNKNOWN -Classifier: Development Status :: 3 - Alpha -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) -Classifier: Operating System :: OS Independent -Classifier: Topic :: Software Development -Classifier: Topic :: Utilities -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3.4 -Classifier: Programming Language :: Python :: 3.5 -Classifier: Programming Language :: Python :: 3.6 -Provides-Extra: commands -Provides-Extra: notebook -Provides-Extra: pytest -Provides-Extra: all +Metadata-Version: 2.1 +Name: zetup +Version: 0.2.48 +Summary: Zimmermann's Extensible Tools for Unified Project_setups +Home-page: https://github.com/zimmermanncode/zetup +Author: Stefan Zimmermann +Author-email: u...@zimmermann.co +License: LGPLv3 +Description: UNKNOWN +Keywords: zetup,project,tools,config,ini,setup,requirements,extras,packages,package,toplevel,object,meta,subprocess,process,popen,call,python3,python3 +Platform: UNKNOWN +Classifier: Development Status :: 3 - Alpha +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) +Classifier: Operating System :: OS Independent +Classifier: Topic :: Software Development +Classifier: Topic :: Utilities +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Provides-Extra: commands +Provides-Extra: notebook +Provides-Extra: pytest +Provides-Extra: all diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zetup-0.2.45/zetup.egg-info/SOURCES.txt new/zetup-0.2.48/zetup.egg-info/SOURCES.txt --- old/zetup-0.2.45/zetup.egg-info/SOURCES.txt 2018-09-17 21:35:10.000000000 +0200 +++ new/zetup-0.2.48/zetup.egg-info/SOURCES.txt 2019-04-03 06:32:50.000000000 +0200 @@ -26,6 +26,7 @@ zetup/dist.py zetup/error.py zetup/extras.py +zetup/func.py zetup/modules.py zetup/object.py zetup/package.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zetup-0.2.45/zetup.egg-info/requires.txt new/zetup-0.2.48/zetup.egg-info/requires.txt --- old/zetup-0.2.45/zetup.egg-info/requires.txt 2018-09-17 21:35:09.000000000 +0200 +++ new/zetup-0.2.48/zetup.egg-info/requires.txt 2019-04-03 06:32:50.000000000 +0200 @@ -1,19 +1,19 @@ setuptools_scm>=3.1 [all] -path.py>=11.1 -jinjatools>=0.1.7 -path.py>=11.1 +path.py>=11.5 +jinjatools>=0.1.8 +path.py>=11.5 nbconvert>=5.4 -pytest>=3.8 +pytest>=4.3 [commands] -path.py>=11.1 -jinjatools>=0.1.7 +path.py>=11.5 +jinjatools>=0.1.8 [notebook] -path.py>=11.1 +path.py>=11.5 nbconvert>=5.4 [pytest] -pytest>=3.8 +pytest>=4.3