Bug 213960 - devel/py-flake8 install fails on 11
Summary: devel/py-flake8 install fails on 11
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: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-31 22:57 UTC by pete
Modified: 2017-01-23 13:25 UTC (History)
1 user (show)

See Also:
amdmi3: maintainer-feedback-
amdmi3: merge-quarterly+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pete 2016-10-31 22:57:26 UTC
Hi there - it looks like the default installation of py27-flake8-2.5.4 is broken on FreeBSD-11-RELEASE.  I have installed py27-flake8-2.5.4 via pkg and it is erroring out when invoking it:


$ flake8
Traceback (most recent call last):
  File "/usr/local/bin/flake8", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2927, in <module>
    @_call_aside
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2913, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 637, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 650, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 829, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pyflakes<1.1,>=0.8.1' distribution was not found and is required by flake8
Comment 1 pete 2016-11-01 17:42:26 UTC
If I apply the following diff to the requires.txt for flake8 I can get things working since the current release of pyflakes-2.7 is 1.1.0:

$ diff -u requires.txt.dist requires.txt
--- requires.txt.dist	2016-11-01 17:40:35.004065000 +0000
+++ requires.txt	2016-11-01 17:39:10.242213000 +0000
@@ -1,3 +1,3 @@
-pyflakes >= 0.8.1, < 1.1
+pyflakes >= 0.8.1, <= 1.1
 pep8 >= 1.5.7, != 1.6.0, != 1.6.1, != 1.6.2
 mccabe >= 0.2.1, < 0.5


I am going to run flake8 on my codebase here and verify it works as expected.
Comment 2 freebsd 2016-11-21 13:47:12 UTC
I can install it just fine, unfortunately the dependency issue bites me in the arse when actually running it. We need to update flake8 to at least the 2.6 branch (there is also a 3.2 branch) to remove the constraint on the pyflakes dependency.
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-01-20 11:02:23 UTC
A commit references this bug:

Author: amdmi3
Date: Fri Jan 20 11:01:31 UTC 2017
New revision: 431942
URL: https://svnweb.freebsd.org/changeset/ports/431942

Log:
  - Relax dependency version requirement for pyflakes, fixing the runtime failure:

  The 'pyflakes<1.1,>=0.8.1' distribution was not found and is required by flake8

  - Update WWW

  PR:		213960
  Submitted by:	pete@nomadlogic.org
  Approved by:	maintainer timeout (wg, 5 weeks)
  MFH:		2017Q1

Changes:
  head/devel/py-flake8/Makefile
  head/devel/py-flake8/files/
  head/devel/py-flake8/files/patch-flake8.egg-info_requires.txt
  head/devel/py-flake8/files/patch-setup.py
  head/devel/py-flake8/pkg-descr
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-01-23 13:21:58 UTC
A commit references this bug:

Author: amdmi3
Date: Mon Jan 23 13:21:23 UTC 2017
New revision: 432215
URL: https://svnweb.freebsd.org/changeset/ports/432215

Log:
  MFH: r431942

  - Relax dependency version requirement for pyflakes, fixing the runtime failure:

  The 'pyflakes<1.1,>=0.8.1' distribution was not found and is required by flake8

  - Update WWW

  PR:		213960
  Submitted by:	pete@nomadlogic.org
  Approved by:	maintainer timeout (wg, 5 weeks)
  Approved by:	ports-secteam (with hat)

Changes:
_U  branches/2017Q1/
  branches/2017Q1/devel/py-flake8/Makefile
  branches/2017Q1/devel/py-flake8/files/
  branches/2017Q1/devel/py-flake8/pkg-descr
Comment 5 Dmitry Marakasov freebsd_committer freebsd_triage 2017-01-23 13:25:48 UTC
Fixed, MFHd. I'm also working on updating this to 3.x.