diff --git a/py/_vendored_packages/apipkg-1.4.dist-info/DESCRIPTION.rst b/py/_vendored_packages/apipkg-1.4.dist-info/DESCRIPTION.rst deleted file mode 100644 index 54822200..00000000 --- a/py/_vendored_packages/apipkg-1.4.dist-info/DESCRIPTION.rst +++ /dev/null @@ -1,87 +0,0 @@ -Welcome to apipkg! ------------------------- - -With apipkg you can control the exported namespace of a -python package and greatly reduce the number of imports for your users. -It is a `small pure python module`_ that works on virtually all Python -versions, including CPython2.3 to Python3.1, Jython and PyPy. It co-operates -well with Python's ``help()`` system, custom importers (PEP302) and common -command line completion tools. - -Usage is very simple: you can require 'apipkg' as a dependency or you -can copy paste the <200 Lines of code into your project. - - -Tutorial example -------------------- - -Here is a simple ``mypkg`` package that specifies one namespace -and exports two objects imported from different modules:: - - # mypkg/__init__.py - import apipkg - apipkg.initpkg(__name__, { - 'path': { - 'Class1': "_mypkg.somemodule:Class1", - 'clsattr': "_mypkg.othermodule:Class2.attr", - } - } - -The package is initialized with a dictionary as namespace. - -You need to create a ``_mypkg`` package with a ``somemodule.py`` -and ``othermodule.py`` containing the respective classes. -The ``_mypkg`` is not special - it's a completely -regular python package. - -Namespace dictionaries contain ``name: value`` mappings -where the value may be another namespace dictionary or -a string specifying an import location. On accessing -an namespace attribute an import will be performed:: - - >>> import mypkg - >>> mypkg.path - - >>> mypkg.path.Class1 # '_mypkg.somemodule' gets imported now - - >>> mypkg.path.clsattr # '_mypkg.othermodule' gets imported now - 4 # the value of _mypkg.othermodule.Class2.attr - -The ``mypkg.path`` namespace and its two entries are -loaded when they are accessed. This means: - -* lazy loading - only what is actually needed is ever loaded - -* only the root "mypkg" ever needs to be imported to get - access to the complete functionality. - -* the underlying modules are also accessible, for example:: - - from mypkg.sub import Class1 - - -Including apipkg in your package --------------------------------------- - -If you don't want to add an ``apipkg`` dependency to your package you -can copy the `apipkg.py`_ file somewhere to your own package, -for example ``_mypkg/apipkg.py`` in the above example. You -then import the ``initpkg`` function from that new place and -are good to go. - -.. _`small pure python module`: -.. _`apipkg.py`: http://bitbucket.org/hpk42/apipkg/src/tip/apipkg.py - -Feedback? ------------------------ - -If you have questions you are welcome to - -* join the #pylib channel on irc.freenode.net -* subscribe to the http://codespeak.net/mailman/listinfo/py-dev list. -* create an issue on http://bitbucket.org/hpk42/apipkg/issues - -have fun, -holger krekel - - diff --git a/py/_vendored_packages/apipkg-1.4.dist-info/RECORD b/py/_vendored_packages/apipkg-1.4.dist-info/RECORD deleted file mode 100644 index dc72959d..00000000 --- a/py/_vendored_packages/apipkg-1.4.dist-info/RECORD +++ /dev/null @@ -1,9 +0,0 @@ -apipkg.py,sha256=BNnv_qvq8zZvku-uudoqgp3XTNFbwsNUmtzOKrVI7X0,6420 -apipkg-1.4.dist-info/top_level.txt,sha256=3TGS6nmN7kjxhUK4LpPCB3QkQI34QYGrT0ZQGWajoZ8,7 -apipkg-1.4.dist-info/METADATA,sha256=Fk_8BrHyXE--kvB3_ZBKgwvPaKusAZUjchH-kpB63Hs,3491 -apipkg-1.4.dist-info/DESCRIPTION.rst,sha256=RkMQqk5ljhGy0DiZkR_nbpjqvwCIhuIEHsyvkn3O96k,2803 -apipkg-1.4.dist-info/metadata.json,sha256=GdshYrA_7gAII3E3EQMH-31BHzU-klTZ6bPQzlDmuy4,779 -apipkg-1.4.dist-info/WHEEL,sha256=AvR0WeTpDaxT645bl5FQxUK6NPsTls2ttpcGJg3j1Xg,110 -apipkg-1.4.dist-info/RECORD,, -apipkg-1.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -__pycache__/apipkg.cpython-35.pyc,, diff --git a/py/_vendored_packages/apipkg-1.4.dist-info/metadata.json b/py/_vendored_packages/apipkg-1.4.dist-info/metadata.json deleted file mode 100644 index 05609b99..00000000 --- a/py/_vendored_packages/apipkg-1.4.dist-info/metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"license": "MIT License", "name": "apipkg", "metadata_version": "2.0", "generator": "bdist_wheel (0.24.0)", "summary": "apipkg: namespace control and lazy-import mechanism", "platform": "unix", "version": "1.4", "extensions": {"python.details": {"project_urls": {"Home": "http://bitbucket.org/hpk42/apipkg"}, "document_names": {"description": "DESCRIPTION.rst"}, "contacts": [{"role": "author", "email": "holger at merlinux.eu", "name": "holger krekel"}]}}, "classifiers": ["Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: POSIX", "Operating System :: Microsoft :: Windows", "Operating System :: MacOS :: MacOS X", "Topic :: Software Development :: Libraries", "Programming Language :: Python"]} \ No newline at end of file diff --git a/py/_vendored_packages/apipkg-1.4.dist-info/INSTALLER b/py/_vendored_packages/apipkg-1.5.dist-info/INSTALLER similarity index 100% rename from py/_vendored_packages/apipkg-1.4.dist-info/INSTALLER rename to py/_vendored_packages/apipkg-1.5.dist-info/INSTALLER diff --git a/py/_vendored_packages/apipkg-1.4.dist-info/METADATA b/py/_vendored_packages/apipkg-1.5.dist-info/METADATA similarity index 69% rename from py/_vendored_packages/apipkg-1.4.dist-info/METADATA rename to py/_vendored_packages/apipkg-1.5.dist-info/METADATA index eb7e60ac..ac14b4bb 100644 --- a/py/_vendored_packages/apipkg-1.4.dist-info/METADATA +++ b/py/_vendored_packages/apipkg-1.5.dist-info/METADATA @@ -1,10 +1,11 @@ -Metadata-Version: 2.0 +Metadata-Version: 2.1 Name: apipkg -Version: 1.4 +Version: 1.5 Summary: apipkg: namespace control and lazy-import mechanism -Home-page: http://bitbucket.org/hpk42/apipkg +Home-page: https://github.com/pytest-dev/apipkg Author: holger krekel -Author-email: holger at merlinux.eu +Maintainer: Ronny Pfannschmidt +Maintainer-email: opensource@ronnypfannschmidt.de License: MIT License Platform: unix Platform: linux @@ -19,19 +20,25 @@ Classifier: Operating System :: Microsoft :: Windows Classifier: Operating System :: MacOS :: MacOS X Classifier: Topic :: Software Development :: Libraries Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* Welcome to apipkg! ------------------------ -With apipkg you can control the exported namespace of a -python package and greatly reduce the number of imports for your users. -It is a `small pure python module`_ that works on virtually all Python -versions, including CPython2.3 to Python3.1, Jython and PyPy. It co-operates -well with Python's ``help()`` system, custom importers (PEP302) and common -command line completion tools. +With apipkg you can control the exported namespace of a Python package and +greatly reduce the number of imports for your users. +It is a `small pure Python module`_ that works on CPython 2.7 and 3.4+, +Jython and PyPy. It cooperates well with Python's ``help()`` system, +custom importers (PEP302) and common command-line completion tools. Usage is very simple: you can require 'apipkg' as a dependency or you -can copy paste the <200 Lines of code into your project. +can copy paste the ~200 lines of code into your project. Tutorial example @@ -54,7 +61,7 @@ The package is initialized with a dictionary as namespace. You need to create a ``_mypkg`` package with a ``somemodule.py`` and ``othermodule.py`` containing the respective classes. The ``_mypkg`` is not special - it's a completely -regular python package. +regular Python package. Namespace dictionaries contain ``name: value`` mappings where the value may be another namespace dictionary or @@ -75,7 +82,7 @@ loaded when they are accessed. This means: * lazy loading - only what is actually needed is ever loaded * only the root "mypkg" ever needs to be imported to get - access to the complete functionality. + access to the complete functionality * the underlying modules are also accessible, for example:: @@ -91,8 +98,8 @@ for example ``_mypkg/apipkg.py`` in the above example. You then import the ``initpkg`` function from that new place and are good to go. -.. _`small pure python module`: -.. _`apipkg.py`: http://bitbucket.org/hpk42/apipkg/src/tip/apipkg.py +.. _`small pure Python module`: +.. _`apipkg.py`: https://github.com/pytest-dev/apipkg/blob/master/src/apipkg/__init__.py Feedback? ----------------------- @@ -100,8 +107,7 @@ Feedback? If you have questions you are welcome to * join the #pylib channel on irc.freenode.net -* subscribe to the http://codespeak.net/mailman/listinfo/py-dev list. -* create an issue on http://bitbucket.org/hpk42/apipkg/issues +* create an issue on https://github.com/pytest-dev/apipkg/issues have fun, holger krekel diff --git a/py/_vendored_packages/apipkg-1.5.dist-info/RECORD b/py/_vendored_packages/apipkg-1.5.dist-info/RECORD new file mode 100644 index 00000000..dcfe1597 --- /dev/null +++ b/py/_vendored_packages/apipkg-1.5.dist-info/RECORD @@ -0,0 +1,10 @@ +apipkg-1.5.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +apipkg-1.5.dist-info/METADATA,sha256=tIG1DSBzSeqmSRpOKHSEBmT1eOPdK8xK01xAIADuks4,3800 +apipkg-1.5.dist-info/RECORD,, +apipkg-1.5.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +apipkg-1.5.dist-info/WHEEL,sha256=gduuPyBvFJQSQ0zdyxF7k0zynDXbIbvg5ZBHoXum5uk,110 +apipkg-1.5.dist-info/top_level.txt,sha256=3TGS6nmN7kjxhUK4LpPCB3QkQI34QYGrT0ZQGWajoZ8,7 +apipkg/__init__.py,sha256=VogR4mDwYmeOdJnjGi-RoMB1qJnD6_puDYj_nRolzhM,6707 +apipkg/__pycache__/__init__.cpython-38.pyc,, +apipkg/__pycache__/version.cpython-38.pyc,, +apipkg/version.py,sha256=YN6DnKyEPqjDAauJuwJRG9vlKbWVLd9gAbH7mkQXXNo,114 diff --git a/py/_vendored_packages/apipkg-1.5.dist-info/REQUESTED b/py/_vendored_packages/apipkg-1.5.dist-info/REQUESTED new file mode 100644 index 00000000..e69de29b diff --git a/py/_vendored_packages/apipkg-1.4.dist-info/WHEEL b/py/_vendored_packages/apipkg-1.5.dist-info/WHEEL similarity index 70% rename from py/_vendored_packages/apipkg-1.4.dist-info/WHEEL rename to py/_vendored_packages/apipkg-1.5.dist-info/WHEEL index 9dff69d8..1316c41d 100644 --- a/py/_vendored_packages/apipkg-1.4.dist-info/WHEEL +++ b/py/_vendored_packages/apipkg-1.5.dist-info/WHEEL @@ -1,5 +1,5 @@ Wheel-Version: 1.0 -Generator: bdist_wheel (0.24.0) +Generator: bdist_wheel (0.31.1) Root-Is-Purelib: true Tag: py2-none-any Tag: py3-none-any diff --git a/py/_vendored_packages/apipkg-1.4.dist-info/top_level.txt b/py/_vendored_packages/apipkg-1.5.dist-info/top_level.txt similarity index 100% rename from py/_vendored_packages/apipkg-1.4.dist-info/top_level.txt rename to py/_vendored_packages/apipkg-1.5.dist-info/top_level.txt diff --git a/py/_vendored_packages/apipkg.py b/py/_vendored_packages/apipkg/__init__.py similarity index 90% rename from py/_vendored_packages/apipkg.py rename to py/_vendored_packages/apipkg/__init__.py index 9d56e0bc..93180484 100644 --- a/py/_vendored_packages/apipkg.py +++ b/py/_vendored_packages/apipkg/__init__.py @@ -1,7 +1,7 @@ """ -apipkg: control the exported namespace of a python package. +apipkg: control the exported namespace of a Python package. -see http://pypi.python.org/pypi/apipkg +see https://pypi.python.org/pypi/apipkg (c) holger krekel, 2009 - MIT license """ @@ -9,8 +9,7 @@ import sys from types import ModuleType - -__version__ = '1.4' +from .version import version as __version__ def _py_abspath(path): @@ -37,8 +36,9 @@ def distribution_version(name): return dist.version -def initpkg(pkgname, exportdefs, attr=dict(), eager=False): +def initpkg(pkgname, exportdefs, attr=None, eager=False): """ initialize given package from the export definitions. """ + attr = attr or {} oldmod = sys.modules.get(pkgname) d = {} f = getattr(oldmod, '__file__', None) @@ -51,6 +51,8 @@ def initpkg(pkgname, exportdefs, attr=dict(), eager=False): d['__loader__'] = oldmod.__loader__ if hasattr(oldmod, '__path__'): d['__path__'] = [_py_abspath(p) for p in oldmod.__path__] + if hasattr(oldmod, '__package__'): + d['__package__'] = oldmod.__package__ if '__doc__' not in exportdefs and getattr(oldmod, '__doc__', None): d['__doc__'] = oldmod.__doc__ d.update(attr) @@ -60,12 +62,13 @@ def initpkg(pkgname, exportdefs, attr=dict(), eager=False): sys.modules[pkgname] = mod # eagerload in bypthon to avoid their monkeypatching breaking packages if 'bpython' in sys.modules or eager: - for module in sys.modules.values(): + for module in list(sys.modules.values()): if isinstance(module, ApiModule): module.__dict__ def importobj(modpath, attrname): + """imports a module, then resolves the attrname on it""" module = __import__(modpath, None, None, ['__doc__']) if not attrname: return module @@ -78,6 +81,7 @@ def importobj(modpath, attrname): class ApiModule(ModuleType): + """the magical lazy-loading module standing""" def __docget(self): try: return self.__doc @@ -121,13 +125,13 @@ def __init__(self, name, importspec, implprefix=None, attr=None): self.__map__[name] = (modpath, attrname) def __repr__(self): - l = [] + repr_list = [] if hasattr(self, '__version__'): - l.append("version=" + repr(self.__version__)) + repr_list.append("version=" + repr(self.__version__)) if hasattr(self, '__file__'): - l.append('from ' + repr(self.__file__)) - if l: - return '' % (self.__name__, " ".join(l)) + repr_list.append('from ' + repr(self.__file__)) + if repr_list: + return '' % (self.__name__, " ".join(repr_list)) return '' % (self.__name__,) def __makeattr(self, name): diff --git a/py/_vendored_packages/apipkg/version.py b/py/_vendored_packages/apipkg/version.py new file mode 100644 index 00000000..c25fc7c9 --- /dev/null +++ b/py/_vendored_packages/apipkg/version.py @@ -0,0 +1,4 @@ +# coding: utf-8 +# file generated by setuptools_scm +# don't change, don't track in version control +version = '1.5' diff --git a/py/_vendored_packages/iniconfig-1.0.0.dist-info/DESCRIPTION.rst b/py/_vendored_packages/iniconfig-1.0.0.dist-info/DESCRIPTION.rst deleted file mode 100644 index 6d59bc22..00000000 --- a/py/_vendored_packages/iniconfig-1.0.0.dist-info/DESCRIPTION.rst +++ /dev/null @@ -1,53 +0,0 @@ -iniconfig: brain-dead simple parsing of ini files -======================================================= - -iniconfig is a small and simple INI-file parser module -having a unique set of features: - -* tested against Python2.4 across to Python3.2, Jython, PyPy -* maintains order of sections and entries -* supports multi-line values with or without line-continuations -* supports "#" comments everywhere -* raises errors with proper line-numbers -* no bells and whistles like automatic substitutions -* iniconfig raises an Error if two sections have the same name. - -If you encounter issues or have feature wishes please report them to: - - http://github.org/RonnyPfannschmidt/iniconfig/issues - -Basic Example -=================================== - -If you have an ini file like this:: - - # content of example.ini - [section1] # comment - name1=value1 # comment - name1b=value1,value2 # comment - - [section2] - name2= - line1 - line2 - -then you can do:: - - >>> import iniconfig - >>> ini = iniconfig.IniConfig("example.ini") - >>> ini['section1']['name1'] # raises KeyError if not exists - 'value1' - >>> ini.get('section1', 'name1b', [], lambda x: x.split(",")) - ['value1', 'value2'] - >>> ini.get('section1', 'notexist', [], lambda x: x.split(",")) - [] - >>> [x.name for x in list(ini)] - ['section1', 'section2'] - >>> list(list(ini)[0].items()) - [('name1', 'value1'), ('name1b', 'value1,value2')] - >>> 'section1' in ini - True - >>> 'inexistendsection' in ini - False - - diff --git a/py/_vendored_packages/iniconfig-1.0.0.dist-info/RECORD b/py/_vendored_packages/iniconfig-1.0.0.dist-info/RECORD deleted file mode 100644 index ec2f5e17..00000000 --- a/py/_vendored_packages/iniconfig-1.0.0.dist-info/RECORD +++ /dev/null @@ -1,9 +0,0 @@ -iniconfig.py,sha256=-pBe5AF_6aAwo1CxJQ8i_zJq6ejc6IxHta7qk2tNJhY,5208 -iniconfig-1.0.0.dist-info/DESCRIPTION.rst,sha256=BDLMwWqfjpwZ5yqXRvz1x6bf8Dnt_pZhElekAwtL19o,1522 -iniconfig-1.0.0.dist-info/METADATA,sha256=bb2T8WUSDXXiUVxZ4WXhbffq6stikMTlB1jyrPbLfyU,2405 -iniconfig-1.0.0.dist-info/RECORD,, -iniconfig-1.0.0.dist-info/WHEEL,sha256=3XK1Z4AI42GuJXciCpiHMOkbehxRV8QDBW8IU41k3ZU,96 -iniconfig-1.0.0.dist-info/metadata.json,sha256=UYYwW0p815nU4qz8Iq1gGqIYaAcsCyGju3jXvTOyXSI,950 -iniconfig-1.0.0.dist-info/top_level.txt,sha256=7KfM0fugdlToj9UW7enKXk2HYALQD8qHiyKtjhSzgN8,10 -iniconfig-1.0.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 -__pycache__/iniconfig.cpython-35.pyc,, diff --git a/py/_vendored_packages/iniconfig-1.0.0.dist-info/WHEEL b/py/_vendored_packages/iniconfig-1.0.0.dist-info/WHEEL deleted file mode 100644 index 15b96c99..00000000 --- a/py/_vendored_packages/iniconfig-1.0.0.dist-info/WHEEL +++ /dev/null @@ -1,5 +0,0 @@ -Wheel-Version: 1.0 -Generator: bdist_wheel (0.30.0.a0) -Root-Is-Purelib: true -Tag: cp35-none-any - diff --git a/py/_vendored_packages/iniconfig-1.0.0.dist-info/metadata.json b/py/_vendored_packages/iniconfig-1.0.0.dist-info/metadata.json deleted file mode 100644 index 084daa6c..00000000 --- a/py/_vendored_packages/iniconfig-1.0.0.dist-info/metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"classifiers": ["Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: POSIX", "Operating System :: Microsoft :: Windows", "Operating System :: MacOS :: MacOS X", "Topic :: Software Development :: Libraries", "Topic :: Utilities", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3"], "extensions": {"python.details": {"contacts": [{"email": "opensource@ronnypfannschmidt.de, holger.krekel@gmail.com", "name": "Ronny Pfannschmidt, Holger Krekel", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "http://github.com/RonnyPfannschmidt/iniconfig"}}}, "generator": "bdist_wheel (0.30.0.a0)", "license": "MIT License", "metadata_version": "2.0", "name": "iniconfig", "platform": "unix", "summary": "iniconfig: brain-dead simple config-ini parsing", "version": "1.0.0"} \ No newline at end of file diff --git a/py/_vendored_packages/iniconfig-1.0.0.dist-info/INSTALLER b/py/_vendored_packages/iniconfig-1.0.1.dist-info/INSTALLER similarity index 100% rename from py/_vendored_packages/iniconfig-1.0.0.dist-info/INSTALLER rename to py/_vendored_packages/iniconfig-1.0.1.dist-info/INSTALLER diff --git a/py/_vendored_packages/iniconfig-1.0.1.dist-info/LICENSE b/py/_vendored_packages/iniconfig-1.0.1.dist-info/LICENSE new file mode 100644 index 00000000..31ecdfb1 --- /dev/null +++ b/py/_vendored_packages/iniconfig-1.0.1.dist-info/LICENSE @@ -0,0 +1,19 @@ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + diff --git a/py/_vendored_packages/iniconfig-1.0.0.dist-info/METADATA b/py/_vendored_packages/iniconfig-1.0.1.dist-info/METADATA similarity index 96% rename from py/_vendored_packages/iniconfig-1.0.0.dist-info/METADATA rename to py/_vendored_packages/iniconfig-1.0.1.dist-info/METADATA index 79ea62dc..87c0eb41 100644 --- a/py/_vendored_packages/iniconfig-1.0.0.dist-info/METADATA +++ b/py/_vendored_packages/iniconfig-1.0.1.dist-info/METADATA @@ -1,6 +1,6 @@ -Metadata-Version: 2.0 +Metadata-Version: 2.1 Name: iniconfig -Version: 1.0.0 +Version: 1.0.1 Summary: iniconfig: brain-dead simple config-ini parsing Home-page: http://github.com/RonnyPfannschmidt/iniconfig Author: Ronny Pfannschmidt, Holger Krekel @@ -39,7 +39,7 @@ having a unique set of features: If you encounter issues or have feature wishes please report them to: - http://github.org/RonnyPfannschmidt/iniconfig/issues + http://github.com/RonnyPfannschmidt/iniconfig/issues Basic Example =================================== diff --git a/py/_vendored_packages/iniconfig-1.0.1.dist-info/RECORD b/py/_vendored_packages/iniconfig-1.0.1.dist-info/RECORD new file mode 100644 index 00000000..b60c1a53 --- /dev/null +++ b/py/_vendored_packages/iniconfig-1.0.1.dist-info/RECORD @@ -0,0 +1,9 @@ +__pycache__/iniconfig.cpython-38.pyc,, +iniconfig-1.0.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +iniconfig-1.0.1.dist-info/LICENSE,sha256=KvaAw570k_uCgwNW0dPfGstaBgM8ui3sehniHKp3qGY,1061 +iniconfig-1.0.1.dist-info/METADATA,sha256=J-XULI2IH9oRN99MYKzadNBkzPKVE25GzwfkYIfDTAA,2405 +iniconfig-1.0.1.dist-info/RECORD,, +iniconfig-1.0.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +iniconfig-1.0.1.dist-info/WHEEL,sha256=g4nMs7d-Xl9-xC9XovUrsDHGXt-FT0E17Yqo92DEfvY,92 +iniconfig-1.0.1.dist-info/top_level.txt,sha256=7KfM0fugdlToj9UW7enKXk2HYALQD8qHiyKtjhSzgN8,10 +iniconfig.py,sha256=-pBe5AF_6aAwo1CxJQ8i_zJq6ejc6IxHta7qk2tNJhY,5208 diff --git a/py/_vendored_packages/iniconfig-1.0.1.dist-info/REQUESTED b/py/_vendored_packages/iniconfig-1.0.1.dist-info/REQUESTED new file mode 100644 index 00000000..e69de29b diff --git a/py/_vendored_packages/iniconfig-1.0.1.dist-info/WHEEL b/py/_vendored_packages/iniconfig-1.0.1.dist-info/WHEEL new file mode 100644 index 00000000..b552003f --- /dev/null +++ b/py/_vendored_packages/iniconfig-1.0.1.dist-info/WHEEL @@ -0,0 +1,5 @@ +Wheel-Version: 1.0 +Generator: bdist_wheel (0.34.2) +Root-Is-Purelib: true +Tag: py3-none-any + diff --git a/py/_vendored_packages/iniconfig-1.0.0.dist-info/top_level.txt b/py/_vendored_packages/iniconfig-1.0.1.dist-info/top_level.txt similarity index 100% rename from py/_vendored_packages/iniconfig-1.0.0.dist-info/top_level.txt rename to py/_vendored_packages/iniconfig-1.0.1.dist-info/top_level.txt diff --git a/tasks/__init__.py b/tasks/__init__.py index 5d74b649..e69de29b 100644 --- a/tasks/__init__.py +++ b/tasks/__init__.py @@ -1,12 +0,0 @@ -""" -Invoke tasks to help with pytest development and release process. -""" - -import invoke - -from . import vendoring - - -ns = invoke.Collection( - vendoring -) diff --git a/tasks/vendoring.py b/tasks/vendoring.py index fbc171bc..3c7d6015 100644 --- a/tasks/vendoring.py +++ b/tasks/vendoring.py @@ -1,23 +1,41 @@ from __future__ import absolute_import, print_function -import py -import invoke +import os.path +import shutil +import subprocess +import sys -VENDOR_TARGET = py.path.local("py/_vendored_packages") -GOOD_FILES = 'README.md', '__init__.py' +VENDOR_TARGET = "py/_vendored_packages" +GOOD_FILES = ('README.md', '__init__.py') -@invoke.task() -def remove_libs(ctx): + +def remove_libs(): print("removing vendored libs") - for path in VENDOR_TARGET.listdir(): - if path.basename not in GOOD_FILES: + for filename in os.listdir(VENDOR_TARGET): + if filename not in GOOD_FILES: + path = os.path.join(VENDOR_TARGET, filename) print(" ", path) - path.remove() + if os.path.isfile(path): + os.remove(path) + else: + shutil.rmtree(path) + -@invoke.task(pre=[remove_libs]) -def update_libs(ctx): +def update_libs(): print("installing libs") - ctx.run("pip install -t {target} apipkg iniconfig".format(target=VENDOR_TARGET)) - ctx.run("git add {target}".format(target=VENDOR_TARGET)) + subprocess.check_call(( + sys.executable, '-m', 'pip', 'install', + '--target', VENDOR_TARGET, 'apipkg', 'iniconfig', + )) + subprocess.check_call(('git', 'add', VENDOR_TARGET)) print("Please commit to finish the update after running the tests:") print() print(' git commit -am "Updated vendored libs"') + + +def main(): + remove_libs() + update_libs() + + +if __name__ == '__main__': + exit(main())