2020-03-23 01:04:17 +00:00
|
|
|
{ lib, isPy27, fetchFromGitHub, buildPythonPackage, fetchpatch, flake8, six }:
|
2017-09-20 14:53:04 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "flake8-future-import";
|
2020-03-23 01:04:17 +00:00
|
|
|
version = "0.4.6";
|
2018-04-17 15:23:52 +00:00
|
|
|
|
2017-09-20 14:53:04 +00:00
|
|
|
# PyPI tarball doesn't include the test suite
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xZise";
|
|
|
|
repo = "flake8-future-import";
|
|
|
|
rev = version;
|
2020-03-23 01:04:17 +00:00
|
|
|
sha256 = "00q8n15xdnvqj454arn7xxksyrzh0dw996kjyy7g9rdk0rf8x82z";
|
2017-09-20 14:53:04 +00:00
|
|
|
};
|
2017-09-23 15:39:04 +00:00
|
|
|
|
2017-09-20 14:53:04 +00:00
|
|
|
propagatedBuildInputs = [ flake8 six ];
|
2018-04-17 15:23:52 +00:00
|
|
|
|
2020-03-23 01:04:17 +00:00
|
|
|
# Upstream disables this test case naturally on python 3, but it also fails
|
|
|
|
# inside NixPkgs for python 2. Since it's going to be deleted, we just skip it
|
|
|
|
# on py2 as well.
|
|
|
|
patches = lib.optionals isPy27 [ ./skip-test.patch ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2017-09-20 14:53:04 +00:00
|
|
|
description = "A flake8 extension to check for the imported __future__ modules to make it easier to have a consistent code base";
|
2020-03-23 01:04:17 +00:00
|
|
|
homepage = "https://github.com/xZise/flake8-future-import";
|
|
|
|
license = licenses.mit;
|
2017-09-20 14:53:04 +00:00
|
|
|
};
|
|
|
|
}
|