Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DuplicateOptionError when there is { in entry_points.txt file #253

Open
MikeFalowski opened this issue May 21, 2024 · 0 comments
Open

DuplicateOptionError when there is { in entry_points.txt file #253

MikeFalowski opened this issue May 21, 2024 · 0 comments

Comments

@MikeFalowski
Copy link

I'm trying to build application with dependencies on taurus https://gitlab.com/taurus-org/taurus but it returns error.

It seems that configparser has problem with reading parameter starting with {

entry_points.txt file:

[console_scripts]
taurus = taurus.cli:main

[taurus.cli.subcommands]
check-deps = taurus._taurushelper:check_dependencies_cmd
config = taurus.qt.qtgui.panel.taurusconfigeditor:config_cmd
demo = taurus.qt.qtgui.panel.taurusdemo:demo_cmd
designer = taurus.qt.qtdesigner.taurusdesigner:designer_cmd
device = taurus.qt.qtgui.panel.taurusdevicepanel:device_cmd
form = taurus.qt.qtgui.panel.taurusform:form_cmd
gui = taurus.qt.qtgui.taurusgui.taurusgui:gui_cmd
guiqwt = taurus.qt.qtgui.extra_guiqwt.cli:guiqwt
icons = taurus.qt.qtgui.icon.catalog:icons_cmd
image = taurus.cli.alt:image_cmd
logmon = taurus.core.util.remotelogmonitor:logmon_cmd
newgui = taurus.qt.qtgui.taurusgui.taurusgui:newgui_cmd
panel = taurus.qt.qtgui.panel.taurusdevicepanel:panel_cmd
plot = taurus.cli.alt:plot_cmd
qlogmon = taurus.qt.qtgui.table.qlogtable:qlogmon_cmd
trend = taurus.cli.alt:trend_cmd
trend2d = taurus.cli.alt:trend2d_cmd

[taurus.image.alts]
guiqwt = taurus.qt.qtgui.extra_guiqwt:TaurusImageDialog

[taurus.model_selector.items]
Tango = taurus.qt.qtgui.panel.taurusmodelchooser:TangoModelSelectorItem

[taurus.qt.formatters]
tango = taurus.core.tango.util:tangoFormatter
taurus = taurus.qt.qtgui.base:defaultFormatter
{:.5f} = taurus.qt.qtgui.base:floatFormatter
{:2.3e} = taurus.qt.qtgui.base:expFormatter

[taurus.trend2d.alts]
guiqwt = taurus.qt.qtgui.extra_guiqwt:TaurusTrend2DDialog

error output

$ shiv -c myapp -o myapp . taurus
Collecting taurus
  Using cached taurus-5.1.8-py3-none-any.whl (17.8 MB)
Collecting packaging
  Using cached packaging-24.0-py3-none-any.whl (53 kB)
Collecting click
  Using cached click-8.1.7-py3-none-any.whl (97 kB)
Collecting numpy>=1.1
  Using cached numpy-1.26.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
Collecting pint>=0.8
  Using cached Pint-0.23-py3-none-any.whl (305 kB)
Collecting typing-extensions
  Using cached typing_extensions-4.11.0-py3-none-any.whl (34 kB)
Installing collected packages: typing-extensions, pint, packaging, numpy, click, taurus
  WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /tmp/pip-target-5pu2o4pv/lib64/python
  sysconfig: /tmp/pip-target-5pu2o4pv/lib/python
  WARNING: Additional context:
  user = False
  home = '/tmp/pip-target-5pu2o4pv'
  root = None
  prefix = None
Successfully installed click-8.1.7 numpy-1.26.4 packaging-24.0 pint-0.23 taurus-5.1.8 typing-extensions-4.11.0
Traceback (most recent call last):
  File "/home/michal.falowski/.local/bin/shiv", line 8, in <module>
    sys.exit(main())
  File "/home/michal.falowski/.local/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/michal.falowski/.local/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/michal.falowski/.local/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/michal.falowski/.local/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/michal.falowski/.local/lib/python3.9/site-packages/shiv/cli.py", line 236, in main
    entry_point = find_entry_point(sources, console_script)
  File "/home/michal.falowski/.local/lib/python3.9/site-packages/shiv/cli.py", line 46, in find_entry_point
    config_parser.read(site_packages.rglob("entry_points.txt"))
  File "/usr/lib64/python3.9/configparser.py", line 697, in read
    self._read(fp, filename)
  File "/usr/lib64/python3.9/configparser.py", line 1096, in _read
    raise DuplicateOptionError(sectname, optname,
configparser.DuplicateOptionError: While reading from PosixPath('/tmp/tmpc2vzdrt4/taurus-5.1.8.dist-info/entry_points.txt') [line 33]: option '{' in section 'taurus.qt.formatters' already exists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant