Bug 200920 - editors/leo: does not start after pkg install / ValueError exception is thrown
Summary: editors/leo: does not start after pkg install / ValueError exception is thrown
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ruslan Makhmatkhanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-16 19:10 UTC by Michael Krauss
Modified: 2015-11-18 18:27 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Krauss 2015-06-16 19:10:11 UTC
I am running FreeBSD 10.1 Release:
/-------------
root@gandalf:/usr/ports/editors/leo # freebsd-version 
10.1-RELEASE-p12
\-------------


Installed leo package is:
/--------------
root@gandalf:/usr/ports/editors/leo # pkg info leo
leo-5.1_1
Name           : leo
Version        : 5.1_1
Installed on   : Tue Jun 16 19:01:20 CEST 2015
Origin         : editors/leo
Architecture   : freebsd:10:*
Prefix         : /usr/local
Categories     : python editors
Licenses       : MIT
Maintainer     : ports@FreeBSD.org
WWW            : http://leoeditor.com/
Comment        : Advanced outline editor for programmers
Options        :
	DOCS           : on
	PYENCHANT      : off
Annotations    :
	repo_type      : binary
	repository     : FreeBSD
Flat size      : 38.9MiB
Description    :
* Leo is a programmer's editor and a flexible browser for projects,
[...]
\-----------


After installing the leo package by "pkg install leo" the program can not be started because a ValueError exception is thrown:
/-----------------
[mickraus@gandalf ~]$ leo
Traceback (most recent call last):
  File "/usr/local/bin/leo", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python2.7/site-packages/pkg_resources.py", line 2876, in <module>
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources.py", line 449, in _build_master
    ws.require(__requires__)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources.py", line 745, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python2.7/site-packages/pkg_resources.py", line 603, in resolve
    requirements = list(requirements)[::-1]
  File "/usr/local/lib/python2.7/site-packages/pkg_resources.py", line 2721, in parse_requirements
    "version spec")
  File "/usr/local/lib/python2.7/site-packages/pkg_resources.py", line 2686, in scan_list
    raise ValueError(msg, line, "at", line[p:])
ValueError: ('Expected version spec in', 'leo===5.1-final', 'at', '===5.1-final')
\-------------------


I fixed the issue locally by replacing "===" with "==":
/-----------------
root@gandalf:/usr/ports/editors/leo # diff -u /usr/local/bin/leo_old /usr/local/bin/leo
--- /usr/local/bin/leo_old	2015-06-16 20:42:55.000000000 +0200
+++ /usr/local/bin/leo	2015-06-16 20:45:07.000000000 +0200
@@ -1,10 +1,10 @@
 #!/usr/local/bin/python2.7
-# EASY-INSTALL-ENTRY-SCRIPT: 'leo===5.1-final','gui_scripts','leo'
-__requires__ = 'leo===5.1-final'
+# EASY-INSTALL-ENTRY-SCRIPT: 'leo==5.1-final','gui_scripts','leo'
+__requires__ = 'leo==5.1-final'
 import sys
 from pkg_resources import load_entry_point
 
 if __name__ == '__main__':
     sys.exit(
-        load_entry_point('leo===5.1-final', 'gui_scripts', 'leo')()
+        load_entry_point('leo==5.1-final', 'gui_scripts', 'leo')()
     )
\-------------------
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-11-18 18:24:33 UTC
A commit references this bug:

Author: rm
Date: Wed Nov 18 18:24:18 UTC 2015
New revision: 401886
URL: https://svnweb.freebsd.org/changeset/ports/401886

Log:
  editors/leo: fix runtime

  - fix runtime
  - limit to python 2.x, because port's dependency textproc/silvercity
    fails to build with python3
  - bump PORTREVISION because of package change

  PR:		200920
  Submitted by:	Michael Krauss <hippodriver@codunix.org>

Changes:
  head/editors/leo/Makefile
  head/editors/leo/pkg-descr
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-11-18 18:26:34 UTC
A commit references this bug:

Author: rm
Date: Wed Nov 18 18:26:12 UTC 2015
New revision: 401887
URL: https://svnweb.freebsd.org/changeset/ports/401887

Log:
  MFH: r401886

  editors/leo: fix runtime

  - fix runtime
  - limit to python 2.x, because port's dependency textproc/silvercity
    fails to build with python3
  - bump PORTREVISION because of package change

  PR:		200920
  Submitted by:	Michael Krauss <hippodriver@codunix.org>
  Approved by:    portmgr (blanket)

Changes:
_U  branches/2015Q4/
  branches/2015Q4/editors/leo/Makefile
  branches/2015Q4/editors/leo/pkg-descr
Comment 3 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2015-11-18 18:27:25 UTC
Fix committed, thank you!