2019-06-05 21:52:43 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
|
|
|
, python
|
|
|
|
, applicationinsights
|
|
|
|
, portalocker
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "azure-cli-telemetry";
|
2019-10-16 09:43:03 +00:00
|
|
|
version = "1.0.4";
|
2019-06-05 21:52:43 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-10-16 09:43:03 +00:00
|
|
|
sha256 = "1f239d544d309c29e827982cc20113eb57037dba16db6cdd2e0283e437e0e577";
|
2019-06-05 21:52:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
applicationinsights
|
|
|
|
portalocker
|
|
|
|
];
|
|
|
|
|
|
|
|
# tests are not published to pypi
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
# Remove overly restrictive version contraints and obsolete namespace setup
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2019-10-17 15:42:51 +00:00
|
|
|
--replace "applicationinsights>=0.11.1,<0.12" "applicationinsights"
|
2019-06-05 21:52:43 +00:00
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "azure-namespace-package = azure-cli-nspkg" ""
|
2019-10-17 15:42:51 +00:00
|
|
|
rm azure_bdist_wheel.py # we'll fix PEP420 namespacing
|
2019-06-05 21:52:43 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# Prevent these __init__'s from violating PEP420, only needed for python2
|
|
|
|
postInstall = lib.optionalString isPy3k ''
|
|
|
|
rm $out/${python.sitePackages}/azure/__init__.py \
|
|
|
|
$out/${python.sitePackages}/azure/cli/__init__.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = https://github.com/Azure/azure-cli;
|
|
|
|
description = "Next generation multi-platform command line experience for Azure";
|
|
|
|
platforms = platforms.all;
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jonringer ];
|
|
|
|
};
|
|
|
|
}
|