mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-12 03:56:17 +03:00
058d817fd4
This adjusts autopep8 to fetch from GitHub so it can be patched (patch does not apply cleanly to PyPI source tarball), and a test that had to be disabled because it was fetched from PyPI is re-enabled since it could work now (and as far as I understand, pulling from git is generally preferred for Python packages in nixpkgs for test reasons). This lets the package now build successfully with the recent pycodestyle 2.10.0 bump.
46 lines
979 B
Nix
46 lines
979 B
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, fetchpatch
|
|
, buildPythonPackage
|
|
, pycodestyle
|
|
, glibcLocales
|
|
, tomli
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "autopep8";
|
|
version = "2.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hhatto";
|
|
repo = "autopep8";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-77ZVprACHUP8BmylTtvHvJMjb70E1YFKKdQDigAZG6s=";
|
|
};
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
name = "fix-pycodestyle-2.10.0.patch";
|
|
url = "https://github.com/hhatto/autopep8/pull/659.patch";
|
|
hash = "sha256-ulvQqJ3lUm8/9QZwH+whzrxbz8c11/ntc8zH2zfmXiE=";
|
|
})
|
|
];
|
|
|
|
propagatedBuildInputs = [ pycodestyle tomli ];
|
|
|
|
checkInputs = [
|
|
glibcLocales
|
|
pytestCheckHook
|
|
];
|
|
|
|
LC_ALL = "en_US.UTF-8";
|
|
|
|
meta = with lib; {
|
|
description = "A tool that automatically formats Python code to conform to the PEP 8 style guide";
|
|
homepage = "https://pypi.org/project/autopep8/";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ bjornfor ];
|
|
};
|
|
}
|