2019-07-11 19:47:07 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pbr
|
|
|
|
, prettytable
|
|
|
|
, pyparsing
|
|
|
|
, six
|
|
|
|
, stevedore
|
|
|
|
, pyyaml
|
|
|
|
, unicodecsv
|
|
|
|
, cmd2
|
2019-11-07 00:51:27 +00:00
|
|
|
, pytest
|
|
|
|
, mock
|
|
|
|
, testtools
|
|
|
|
, fixtures
|
2019-07-11 19:47:07 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cliff";
|
2020-04-02 00:54:03 +01:00
|
|
|
version = "3.1.0";
|
2019-07-11 19:47:07 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-04-02 00:54:03 +01:00
|
|
|
sha256 = "0j9q6725226hdhdyy9b0qfjngdj35d3y7fxbmfxpr36ksbh0x6sj";
|
2019-07-11 19:47:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pbr
|
|
|
|
prettytable
|
|
|
|
pyparsing
|
|
|
|
six
|
|
|
|
stevedore
|
|
|
|
pyyaml
|
|
|
|
cmd2
|
|
|
|
unicodecsv
|
|
|
|
];
|
|
|
|
|
2019-11-07 00:51:27 +00:00
|
|
|
# remove version constraints
|
|
|
|
postPatch = ''
|
|
|
|
sed -i '/cmd2/c\cmd2' requirements.txt
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [ fixtures mock pytest testtools ];
|
|
|
|
# add some tests
|
|
|
|
checkPhase = ''
|
|
|
|
pytest cliff/tests/test_{utils,app,command,help,lister}.py \
|
|
|
|
-k 'not interactive_mode'
|
|
|
|
'';
|
2019-07-11 19:47:07 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Command Line Interface Formulation Framework";
|
2020-04-02 00:54:03 +01:00
|
|
|
homepage = "https://docs.openstack.org/cliff/latest/";
|
2019-07-11 19:47:07 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|