python3Packages.canmatrix: 0.8.0 -> 0.9.1

This commit is contained in:
Jonathan Ringer 2020-07-02 11:40:52 -07:00 committed by Jon
parent f32a8650fd
commit e63a945017

View file

@ -4,6 +4,7 @@
, pythonOlder
, attrs
, bitstruct
, click
, future
, pathlib2
, typing
@ -17,20 +18,21 @@
buildPythonPackage rec {
pname = "canmatrix";
version = "0.8";
version = "0.9.1";
# uses fetchFromGitHub as PyPi release misses test/ dir
src = fetchFromGitHub {
owner = "ebroecker";
repo = pname;
rev = version;
sha256 = "1wzflapyj2j4xsi7d7gfmznmxbgr658n092xyq9nac46rbhpcphg";
sha256 = "129lcchq45h8wqjvvn0rwpbmih4m0igass2cx7a21z94li97hcia";
};
propagatedBuildInputs = [
# required
attrs
bitstruct
click
future
pathlib2
# optional
@ -41,12 +43,18 @@ buildPythonPackage rec {
pyyaml
] ++ lib.optional (pythonOlder "3.5") typing;
postPatch = ''
substituteInPlace setup.py \
--replace "version = versioneer.get_version()" "version = \"${version}\""
'';
checkInputs = [
pytest
];
# long_envvar_name_imports requires stable key value pair ordering
checkPhase = ''
pytest -s src/canmatrix
pytest -s src/canmatrix -k 'not long_envvar_name_imports'
'';
meta = with lib; {