Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > de.comp.lang.python > #4903

Re: [Python-de] Entrypoint Spezifikation : String oder Dict und wie beides?

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From "Dr. Volker Jaenisch" <volker.jaenisch@inqbus.de>
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 <mailman.3.1504823359.15585.python-de@python.org> (permalink)
References <f6c2ea8a-1169-6849-ca88-c6f036eeb42a@inqbus.de> <c27a2671-fa1b-1f15-65cd-5df3f65865de@inqbus.de>
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 <volker.jaenisch@inqbus.de>
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 <f6c2ea8a-1169-6849-ca88-c6f036eeb42a@inqbus.de>
Content-Language en-US
X-BeenThere python-de@python.org
X-Mailman-Version 2.1.24
Precedence list
List-Id Die Deutsche Python Mailingliste <python-de.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-de>, <mailto:python-de-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-de/>
List-Post <mailto:python-de@python.org>
List-Help <mailto:python-de-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-de>, <mailto:python-de-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <c27a2671-fa1b-1f15-65cd-5df3f65865de@inqbus.de>
X-Mailman-Original-References <f6c2ea8a-1169-6849-ca88-c6f036eeb42a@inqbus.de>
Xref csiph.com de.comp.lang.python:4903

Show key headers only | View raw


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ötige 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 = '\n\n'.join([
    open('README.rst').read(),
    open('CONTRIBUTORS.rst').read(),
    open('CHANGES.rst').read(),
])


setup(
    name='inqbus.plone_bokeh',
    version='1.0a1',
    description="Bokeh Integration for Plone",
    long_description=long_description,
    # Get more from https://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=[
        "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='Python Plone',
    author='sandra',
    author_email='sandra.rum@inqbus.de',
    url='https://pypi.python.org/pypi/inqbus.plone_bokeh',
    license='GPL version 2',
    packages=find_packages('src', exclude=['ez_setup']),
    namespace_packages=['inqbus'],
    package_dir={'': 'src'},
    include_package_data=True,
    zip_safe=False,
    install_requires=[
    ],
    extras_require={
        'test': [
        ],
    },
    entry_points={
       'z3c.autoinclude.plugin':  ['[z3c.autoinclude.plugin] target =
plone'],
       'console_scripts' : ['bokeh_server =
inqbus.bokeh_plone.bokeh.startup:startup_bokeh'],
    }
)

Installieren:
python setup.py install

...
  File
"/home/volker/workspace/test321/local/lib/python2.7/site-packages/setuptools/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/setuptools/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/setuptools/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/setuptools/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_resources/__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_resources/__init__.py",
line 2369, in parse_map
    for group, lines in data:
  File
"/home/volker/workspace/test321/local/lib/python2.7/site-packages/pkg_resources/__init__.py",
line 2975, in split_sections
    raise ValueError("Invalid section heading", line)
ValueError: ('Invalid section heading', '[z3c.autoinclude.plugin] target
= plone')

Geht schief.

Anpassen der setup.py:
...
    ],
    extras_require={
        'test': [
        ],
    },
    entry_points={
       'console_scripts' : ['bokeh_server =
inqbus.bokeh_plone.bokeh.startup:startup_bokeh'],
    }
)

Erneutes installieren:
python setup.py install
...
  File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File
"/home/volker/workspace/test321/local/lib/python2.7/site-packages/setuptools/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_resources/__init__.py",
line 726, in iter_entry_points
    entries = dist.get_entry_map(group)
  File
"/home/volker/workspace/test321/local/lib/python2.7/site-packages/pkg_resources/__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_resources/__init__.py",
line 2369, in parse_map
    for group, lines in data:
  File
"/home/volker/workspace/test321/local/lib/python2.7/site-packages/pkg_resources/__init__.py",
line 2975, in split_sections
    raise ValueError("Invalid section heading", line)
ValueError: ('Invalid section heading', '[z3c.autoinclude.plugin] target
= plone')

Suche nach Dateien die z3c.autoinstall beinhalten

(test321) volker@runner:~/workspace/test321/inqbus.plone_bokeh$ grep -R
z3c.auto ../*
../inqbus.plone_bokeh/build/lib.linux-x86_64-2.7/inqbus/plone_bokeh/testing.py:       
# The z3c.autoinclude feature is disabled in the Plone fixture base
../inqbus.plone_bokeh/src/inqbus.plone_bokeh.egg-info/entry_points.txt:[z3c.autoinclude.plugin]
../inqbus.plone_bokeh/src/inqbus.plone_bokeh.egg-info/entry_points.txt:[z3c.autoinclude.plugin]
target = plone
../inqbus.plone_bokeh/src/inqbus/plone_bokeh/testing.py:        # The
z3c.autoinclude feature is disabled in the Plone fixture base
../inqbus.plone_bokeh/setup.py~:       'z3c.autoinclude.plugin': 
['[z3c.autoinclude.plugin] target = plone'],
../lib/python2.7/site-packages/inqbus.plone_bokeh-1.0a1-py2.7.egg/EGG-INFO/entry_points.txt:[z3c.autoinclude.plugin]
../lib/python2.7/site-packages/inqbus.plone_bokeh-1.0a1-py2.7.egg/EGG-INFO/entry_points.txt:[z3c.autoinclude.plugin]
target = plone
../lib/python2.7/site-packages/inqbus.plone_bokeh-1.0a1-py2.7.egg/inqbus/plone_bokeh/testing.py:       
# The z3c.autoinclude feature is disabled in the Plone fixture base
../local/lib/python2.7/site-packages/inqbus.plone_bokeh-1.0a1-py2.7.egg/EGG-INFO/entry_points.txt:[z3c.autoinclude.plugin]
../local/lib/python2.7/site-packages/inqbus.plone_bokeh-1.0a1-py2.7.egg/EGG-INFO/entry_points.txt:[z3c.autoinclude.plugin]
target = plone
../local/lib/python2.7/site-packages/inqbus.plone_bokeh-1.0a1-py2.7.egg/inqbus/plone_bokeh/testing.py:       
# The z3c.autoinclude feature is disabled in the Plone fixture base

Löschen der Dateien
Erst das Löschen von
../lib/python2.7/site-packages/inqbus.plone_bokeh-1.0a1-py2.7.egg/EGG-INFO/entry_points.txt:
ermöglichte, 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ühren der setup.py behindern.


Beste Grüße

Volker


-- 
=========================================================
   inqbus Scientific Computing    Dr.  Volker Jaenisch
   Richard-Strauss-Straße 1       +49(08861) 690 474 0
   86956 Schongau-West            http://www.inqbus.de
=========================================================

Back to de.comp.lang.python | Previous | Next | Find similar


Thread

Re: [Python-de] Entrypoint Spezifikation : String oder Dict und wie beides? "Dr. Volker Jaenisch" <volker.jaenisch@inqbus.de> - 2017-09-08 00:29 +0200

csiph-web