Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Dr. Volker Jaenisch" Newsgroups: de.comp.lang.python Subject: Re: [Python-de] Entrypoint Spezifikation : String oder Dict und wie beides? Date: Fri, 8 Sep 2017 00:29:14 +0200 Lines: 217 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de fJ9lkdV5CZPz1aksgMi/OgFf9GYqIrawjZ/emYrgYbow== Return-Path: X-Original-To: python-de@python.org Delivered-To: python-de@mail.python.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=inqbus.de; s=20160215; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8j34oKb/8bNPJ8gRT2zOnmkpcmD4jHdKpNxOd6dQpeU=; b=oCrOsmETsrkGAcJdQV22segnUo jmQr0gZgi++/ZwFYSidCf0UbgWcveXwOUqbiHCDf2rf0+hm/rlruHeiMktpx6c/YRbquWPYLVqpTB rUCl01E5ZQO1mjkvNUrkVSr9iOVmQdo37MQWfFKtoK3V/QeKmSjVNPPuSnUzvAjN3O+g=; User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 In-Reply-To: Content-Language: en-US X-BeenThere: python-de@python.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Die Deutsche Python Mailingliste List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: Xref: csiph.com de.comp.lang.python:4903 Servus Python Freaks! Zuerst die schlechte Nachricht. Setup-Tools speichert die Entrypoints in den Egg-Infos ab. Das ist an sich ja nicht verkehrt. Aber es erzeugt unn=C3=B6tige Fehler, weil setup-tools offenbar auch die schon erzeugten entrypoints.txt Dateien parsed. Erzeuge ein neues VEnv. $ mkvirtualenv test321 Die setup.py im VEnv # -*- coding: utf-8 -*- """Installer for the inqbus.plone_bokeh package.""" from setuptools import find_packages from setuptools import setup long_description =3D '\n\n'.join([ open('README.rst').read(), open('CONTRIBUTORS.rst').read(), open('CHANGES.rst').read(), ]) setup( name=3D'inqbus.plone_bokeh', version=3D'1.0a1', description=3D"Bokeh Integration for Plone", long_description=3Dlong_description, # Get more from https://pypi.python.org/pypi?%3Aaction=3Dlist_classif= iers classifiers=3D[ "Environment :: Web Environment", "Framework :: Plone", "Framework :: Plone :: 5.0", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Operating System :: OS Independent", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)= ", ], keywords=3D'Python Plone', author=3D'sandra', author_email=3D'sandra.rum@inqbus.de', url=3D'https://pypi.python.org/pypi/inqbus.plone_bokeh', license=3D'GPL version 2', packages=3Dfind_packages('src', exclude=3D['ez_setup']), namespace_packages=3D['inqbus'], package_dir=3D{'': 'src'}, include_package_data=3DTrue, zip_safe=3DFalse, install_requires=3D[ ], extras_require=3D{ 'test': [ ], }, entry_points=3D{ 'z3c.autoinclude.plugin': ['[z3c.autoinclude.plugin] target =3D plone'], 'console_scripts' : ['bokeh_server =3D inqbus.bokeh_plone.bokeh.startup:startup_bokeh'], } ) Installieren: python setup.py install =2E.. File "/home/volker/workspace/test321/local/lib/python2.7/site-packages/setupto= ols/command/easy_install.py", line 725, in process_distribution self.install_egg_scripts(dist) File "/home/volker/workspace/test321/local/lib/python2.7/site-packages/setupto= ols/command/easy_install.py", line 601, in install_egg_scripts self.install_wrapper_scripts(dist) File "/home/volker/workspace/test321/local/lib/python2.7/site-packages/setupto= ols/command/easy_install.py", line 793, in install_wrapper_scripts for args in ScriptWriter.best().get_args(dist): File "/home/volker/workspace/test321/local/lib/python2.7/site-packages/setupto= ols/command/easy_install.py", line 2070, in get_args for name, ep in dist.get_entry_map(group).items(): File "/home/volker/workspace/test321/local/lib/python2.7/site-packages/pkg_res= ources/__init__.py", line 2639, in get_entry_map self._get_metadata('entry_points.txt'), self File "/home/volker/workspace/test321/local/lib/python2.7/site-packages/pkg_res= ources/__init__.py", line 2369, in parse_map for group, lines in data: File "/home/volker/workspace/test321/local/lib/python2.7/site-packages/pkg_res= ources/__init__.py", line 2975, in split_sections raise ValueError("Invalid section heading", line) ValueError: ('Invalid section heading', '[z3c.autoinclude.plugin] target =3D plone') Geht schief. Anpassen der setup.py: =2E.. ], extras_require=3D{ 'test': [ ], }, entry_points=3D{ 'console_scripts' : ['bokeh_server =3D inqbus.bokeh_plone.bokeh.startup:startup_bokeh'], } ) Erneutes installieren: python setup.py install =2E.. File "/usr/lib/python2.7/distutils/core.py", line 111, in setup _setup_distribution =3D dist =3D klass(attrs) File "/home/volker/workspace/test321/local/lib/python2.7/site-packages/setupto= ols/dist.py", line 336, in __init__ for ep in pkg_resources.iter_entry_points('distutils.setup_keywords')= : File "/home/volker/workspace/test321/local/lib/python2.7/site-packages/pkg_res= ources/__init__.py", line 726, in iter_entry_points entries =3D dist.get_entry_map(group) File "/home/volker/workspace/test321/local/lib/python2.7/site-packages/pkg_res= ources/__init__.py", line 2639, in get_entry_map self._get_metadata('entry_points.txt'), self File "/home/volker/workspace/test321/local/lib/python2.7/site-packages/pkg_res= ources/__init__.py", line 2369, in parse_map for group, lines in data: File "/home/volker/workspace/test321/local/lib/python2.7/site-packages/pkg_res= ources/__init__.py", line 2975, in split_sections raise ValueError("Invalid section heading", line) ValueError: ('Invalid section heading', '[z3c.autoinclude.plugin] target =3D plone') Suche nach Dateien die z3c.autoinstall beinhalten (test321) volker@runner:~/workspace/test321/inqbus.plone_bokeh$ grep -R z3c.auto ../* =2E./inqbus.plone_bokeh/build/lib.linux-x86_64-2.7/inqbus/plone_bokeh/tes= ting.py: =20 # The z3c.autoinclude feature is disabled in the Plone fixture base =2E./inqbus.plone_bokeh/src/inqbus.plone_bokeh.egg-info/entry_points.txt:= [z3c.autoinclude.plugin] =2E./inqbus.plone_bokeh/src/inqbus.plone_bokeh.egg-info/entry_points.txt:= [z3c.autoinclude.plugin] target =3D plone =2E./inqbus.plone_bokeh/src/inqbus/plone_bokeh/testing.py: # The z3c.autoinclude feature is disabled in the Plone fixture base =2E./inqbus.plone_bokeh/setup.py~: 'z3c.autoinclude.plugin':=20 ['[z3c.autoinclude.plugin] target =3D plone'], =2E./lib/python2.7/site-packages/inqbus.plone_bokeh-1.0a1-py2.7.egg/EGG-I= NFO/entry_points.txt:[z3c.autoinclude.plugin] =2E./lib/python2.7/site-packages/inqbus.plone_bokeh-1.0a1-py2.7.egg/EGG-I= NFO/entry_points.txt:[z3c.autoinclude.plugin] target =3D plone =2E./lib/python2.7/site-packages/inqbus.plone_bokeh-1.0a1-py2.7.egg/inqbu= s/plone_bokeh/testing.py: =20 # The z3c.autoinclude feature is disabled in the Plone fixture base =2E./local/lib/python2.7/site-packages/inqbus.plone_bokeh-1.0a1-py2.7.egg= /EGG-INFO/entry_points.txt:[z3c.autoinclude.plugin] =2E./local/lib/python2.7/site-packages/inqbus.plone_bokeh-1.0a1-py2.7.egg= /EGG-INFO/entry_points.txt:[z3c.autoinclude.plugin] target =3D plone =2E./local/lib/python2.7/site-packages/inqbus.plone_bokeh-1.0a1-py2.7.egg= /inqbus/plone_bokeh/testing.py: =20 # The z3c.autoinclude feature is disabled in the Plone fixture base L=C3=B6schen der Dateien Erst das L=C3=B6schen von =2E./lib/python2.7/site-packages/inqbus.plone_bokeh-1.0a1-py2.7.egg/EGG-I= NFO/entry_points.txt: erm=C3=B6glichte, das die setup.py sauber geparsed wurde. Das ist IMHO ein Fehler in Setup-Tools. Was in die Egg-Info geschrieben wurde darf nicht das erneute Ausf=C3=BChren der setup.py behindern. Beste Gr=C3=BC=C3=9Fe Volker --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D inqbus Scientific Computing Dr. Volker Jaenisch Richard-Strauss-Stra=C3=9Fe 1 +49(08861) 690 474 0 86956 Schongau-West http://www.inqbus.de =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D