lol

pythonPackages.flake8-future-import: 0.4.5 -> 0.4.6 and fix build

The build is currently broken on master and 20.03. This upgrades to the latest
version and also disables the bad py2 test. I spent a long time trying to figure
out what the issue is, but since it's disabled upstream on python3 anyways let's
just skip it on python2 as well.

ZHF: #80379

authored by

Benjamin Hipple and committed by
Jon
3248eac2 a82c39f1

+24 -14
+11 -14
pkgs/development/python-modules/flake8-future-import/default.nix
··· 1 - { lib, fetchFromGitHub, buildPythonPackage, fetchpatch, flake8, six }: 1 + { lib, isPy27, fetchFromGitHub, buildPythonPackage, fetchpatch, flake8, six }: 2 2 3 3 buildPythonPackage rec { 4 4 pname = "flake8-future-import"; 5 - version = "0.4.5"; 5 + version = "0.4.6"; 6 6 7 7 # PyPI tarball doesn't include the test suite 8 8 src = fetchFromGitHub { 9 9 owner = "xZise"; 10 10 repo = "flake8-future-import"; 11 11 rev = version; 12 - sha256 = "00fpxa6g8cabybnciwnpsbg60zhgydc966jgwyyggw1pcg0frdqr"; 12 + sha256 = "00q8n15xdnvqj454arn7xxksyrzh0dw996kjyy7g9rdk0rf8x82z"; 13 13 }; 14 14 15 - patches = [ 16 - # Add Python 3.7 support. Remove with the next release 17 - (fetchpatch { 18 - url = https://github.com/xZise/flake8-future-import/commit/cace194a44d3b95c9c1ed96640bae49183acca04.patch; 19 - sha256 = "17pkqnh035j5s5c53afs8bk49bq7lnmdwqp5k7izx7sw80z73p9r"; 20 - }) 21 - ]; 15 + propagatedBuildInputs = [ flake8 six ]; 22 16 23 - propagatedBuildInputs = [ flake8 six ]; 17 + # Upstream disables this test case naturally on python 3, but it also fails 18 + # inside NixPkgs for python 2. Since it's going to be deleted, we just skip it 19 + # on py2 as well. 20 + patches = lib.optionals isPy27 [ ./skip-test.patch ]; 24 21 25 - meta = { 26 - homepage = https://github.com/xZise/flake8-future-import; 22 + meta = with lib; { 27 23 description = "A flake8 extension to check for the imported __future__ modules to make it easier to have a consistent code base"; 28 - license = lib.licenses.mit; 24 + homepage = "https://github.com/xZise/flake8-future-import"; 25 + license = licenses.mit; 29 26 }; 30 27 }
+13
pkgs/development/python-modules/flake8-future-import/skip-test.patch
··· 1 + diff --git a/test_flake8_future_import.py b/test_flake8_future_import.py 2 + index 84fde59..345f23f 100644 3 + --- a/test_flake8_future_import.py 4 + +++ b/test_flake8_future_import.py 5 + @@ -230,7 +230,7 @@ class TestBadSyntax(TestCaseBase): 6 + """Test using various bad syntax examples from Python's library.""" 7 + 8 + 9 + -@unittest.skipIf(sys.version_info[:2] >= (3, 7), 'flake8 supports up to 3.6') 10 + +@unittest.skip("Has issue with installed path for flake8 in python2") 11 + class Flake8TestCase(TestCaseBase): 12 + 13 + """