Skip to content

Commit

Permalink
pythonPackages.keystoneclient: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Aug 28, 2017
1 parent def7bad commit b24099c
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 37 deletions.
52 changes: 52 additions & 0 deletions pkgs/development/python-modules/keystoneclient/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, python

, pbr, testtools, testresources, testrepository
, requests-mock, fixtures, openssl, oslotest, pep8

, oslo-serialization, oslo-config, oslo-i18n, oslo-utils
, Babel, prettytable, requests, six, iso8601, stevedore
, netaddr, debtcollector, bandit, webob, mock, pycrypto
}:

buildPythonPackage rec {
name = "keystoneclient-${version}";
version = "1.8.1";

src = fetchFromGitHub {
owner = "openstack";
repo = "python-keystoneclient";
rev = version;
sha256 = "0yayn1hb3mncqb0isy8vy6d519xya7mhf5pcbn60fzdqjrkj2prq";
};

PBR_VERSION = "${version}";

buildInputs = [
pbr testtools testresources testrepository requests-mock fixtures openssl
oslotest pep8
];
propagatedBuildInputs = [
oslo-serialization oslo-config oslo-i18n oslo-utils
Babel prettytable requests six iso8601 stevedore
netaddr debtcollector bandit webob mock pycrypto
];

postPatch = ''
sed -i 's@python@${python.interpreter}@' .testr.conf
sed -ie '/argparse/d' requirements.txt
'';

doCheck = false; # The checkPhase below is broken

checkPhase = ''
patchShebangs run_tests.sh
./run_tests.sh
'';

meta = with stdenv.lib; {
homepage = https://github.com/openstack/python-novaclient/;
description = "Client library and command line tool for the OpenStack Nova API";
license = licenses.asl20;
platforms = platforms.linux;
};
}
38 changes: 1 addition & 37 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22887,43 +22887,7 @@ in {
};
};

keystoneclient = buildPythonPackage rec {
name = "keystoneclient-${version}";
version = "1.8.1";

src = pkgs.fetchurl {
url = "https://github.com/openstack/python-keystoneclient/archive/${version}.tar.gz";
sha256 = "0lijri0xa5fvmynvq148z13kw4xd3bam4zrfd8aj0gb3lnzh9y6v";
};

PBR_VERSION = "${version}";

buildInputs = with self; [
pbr testtools testresources testrepository requests-mock fixtures pkgs.openssl
oslotest pep8 ];
propagatedBuildInputs = with self; [
oslo-serialization oslo-config oslo-i18n oslo-utils
Babel argparse prettytable requests six iso8601 stevedore
netaddr debtcollector bandit webob mock pycrypto ];

patchPhase = ''
sed -i 's@python@${python.interpreter}@' .testr.conf
'';

doCheck = false; # The checkPhase below is broken

checkPhase = ''
patchShebangs run_tests.sh
./run_tests.sh
'';

meta = {
homepage = https://github.com/openstack/python-novaclient/;
description = "Client library and command line tool for the OpenStack Nova API";
license = stdenv.lib.licenses.asl20;
platforms = stdenv.lib.platforms.linux;
};
};
keystoneclient = callPackage ../development/python-modules/keystoneclient { };

keystonemiddleware = buildPythonPackage rec {
name = "keystonemiddleware-${version}";
Expand Down

0 comments on commit b24099c

Please sign in to comment.