[MacPorts] #47429: py-flake8, py-pep8: current versions not compatible

MacPorts noreply at macports.org
Tue Jul 7 09:23:12 PDT 2015


#47429: py-flake8, py-pep8:  current versions not compatible
--------------------------------+--------------------
  Reporter:  rectalogic@…       |      Owner:  petr@…
      Type:  defect             |     Status:  new
  Priority:  Normal             |  Milestone:
 Component:  ports              |    Version:
Resolution:                     |   Keywords:
      Port:  py-flake8 py-pep8  |
--------------------------------+--------------------

Comment (by petr@…):

 Replying to [comment:7 jacoblee@…]:
 > Adding this to this ticket, since it is not resolved, and the issue is
 similar.
 Yes, the ticket is about this issue.

 [...]

 > On a relatively clean install:
 >
 > sudo port install py27-flake8
 [...]

 Your installation work *as expected*.


 > Found, that I had to call `port select --set` on the flake8
 dependencies, pyflakes and pep8. I was surprised, but maybe that is not so
 unusual.

 I an not sure if I understand this correctly.

 Macports installs the callable scripts with a `-2.7` and `-3.4` suffix,
 respectively to allow the installation against various versions of Python.
 Appending this suffix allows you to select the desired version. With `port
 select` you can choose your default version.

 However, it should not be really necessary to perform a `port select
 --set` to have this package working correctly. If you found this necessary
 to make the packages working correctly, this is probably a bug and needs
 fixing.


 > When trying to call flake8 I get the following traceback:
 >
 >
 > {{{
 > Traceback (most recent call last):
 >   File "/opt/local/bin/flake8", line 5, in <module>
 >     from pkg_resources import load_entry_point
 >   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/pkg_resources/__init__.py", line 3084, in <module>
 >     @_call_aside
 >   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/pkg_resources/__init__.py", line 3070, in _call_aside
 >     f(*args, **kwargs)
 >   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/pkg_resources/__init__.py", line 3097, in
 _initialize_master_working_set
 >     working_set = WorkingSet._build_master()
 >   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/pkg_resources/__init__.py", line 653, in _build_master
 >     return cls._build_from_requirements(__requires__)
 >   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/pkg_resources/__init__.py", line 666, in
 _build_from_requirements
 >     dists = ws.resolve(reqs, Environment())
 >   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/pkg_resources/__init__.py", line 839, in resolve
 >     raise DistributionNotFound(req, requirers)
 > pkg_resources.DistributionNotFound: The
 'pep8!=1.6.0,!=1.6.1,!=1.6.2,>=1.5.7' distribution was not found and is
 required by flake8
 > }}}
 >
 > Oddly, my version of pep8 is 1.6.2 which is one of those listed in the
 error message.

 Yes, this is exactly the issue here. The most recent released versions of
 `pep8` and `flake8` are not compatible, so this combination fails. This
 would ideally be solve upstream, but to my surprise this takes quite some
 time and the developers have not released yet.

 To have an immediate work-around you could install version 1.5.8. See
 wiki:howto/InstallingOlderPort.

 If we consider not to wait for upstream, we would need to:

 * down-grade pep8 to 1.5.8 again;
 * upgrade an unreleased *post-1.6.2-version* from the repository
 [https://github.com/jcrocholl/pep8/commit/435d1cbf995a659a82d1d4b42d25e3459556ef21
 `435d1cb`];

-- 
Ticket URL: <https://trac.macports.org/ticket/47429#comment:8>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list