pythonPackages.azure-cli-telemetry: init at 1.0.2

This commit is contained in:
Jonathan Ringer 2019-06-05 14:52:43 -07:00 committed by Frederik Rietdijk
parent f4667efdb3
commit c508e700bd
2 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,50 @@
{ stdenv
, lib
, buildPythonPackage
, fetchPypi
, isPy3k
, python
, applicationinsights
, portalocker
}:
buildPythonPackage rec {
pname = "azure-cli-telemetry";
version = "1.0.2";
src = fetchPypi {
inherit pname version;
sha256 = "14wmxdsrrlnixaj52q37rrvp9wg5b54gf5wn2z1vq68kxpg1s560";
};
propagatedBuildInputs = [
applicationinsights
portalocker
];
# tests are not published to pypi
doCheck = false;
# Remove overly restrictive version contraints and obsolete namespace setup
prePatch = ''
substituteInPlace setup.py \
--replace "applicationinsights>=0.11.1,<0.11.8" "applicationinsights" \
--replace "portalocker==1.2.1" "portalocker"
substituteInPlace setup.cfg \
--replace "azure-namespace-package = azure-cli-nspkg" ""
'';
# 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 ];
};
}

View File

@ -250,6 +250,8 @@ in {
azure-nspkg = callPackage ../development/python-modules/azure-nspkg { };
azure-cli-telemetry = callPackage ../development/python-modules/azure-cli-telemetry { };
azure-common = callPackage ../development/python-modules/azure-common { };
azure-cosmos = callPackage ../development/python-modules/azure-cosmos { };