Nixpkgs: Package `azure-cli` (aka, the new python one)

Created on 7 May 2018  路  7Comments  路  Source: NixOS/nixpkgs

This is a tracking issue for packaging azure-cli for NixOS.

Notes:

  • It's available on PyPi, but installing via PyPi is not supported. I'm not a python guy, so I don't know how normal this is, but the published packages don't depend on specific versions. The only way to get a full understanding of what packages are needed at a point in time is to load a docker container (hope that it's... working...) and then pip freeze the requirements out.
  • I'm trying to generate an overlay with pypi2nix, but I can't because the latest azure-cli seems to require pip10.
  • I'm also trying ot package an older version of azure-cli with pypi2nix but am having other troubles, as some older versions of the CLI use packages that do not have full source dist packages available on PyPi, so pypi2nix fails.

I'm open to any tips or suggestions. Or at least someone confirming that an overlay might be the right approach here. (We're talking about a large number of pypi packages that are needed to put together the CLI... 129 to be precise)

python package (new)

Most helpful comment

Hey, just wanted to let you know that I've started packaging azure-cli 2, ... the good news is that it's already working: https://github.com/stesie/nixpkgs/tree/azure-cli
... use python36Packages.azure-cli there, $out/bin/az is callable, lists sub-commands and the commands I've tested all worked (though I haven't tested the whole bunch of modules)

Yet packaging needs some more love, currently packaging works only with wheel 0.30.0, hence I've provided a buildPythonPackageOnWheel0_30_0 for the moment, yet I think it's ugly as hell and I wanna get rid of it.

If anyone of you got ideas on how, let me know ...

othrewise feedback welcome :)

All 7 comments

hi @colemickens is there any progress on this? since what I got re recent commit, it removes azure-cli folder in here

No. No update. I will not take the time to package those by hand, and I can't figure out how to get python packaging to play nice in the Nix ecosystem, even after spending the better part of multiple days on it. I don't really see myself revisiting this without help from someone more experienced with python, Nix, or preferably both.

Hey, just wanted to let you know that I've started packaging azure-cli 2, ... the good news is that it's already working: https://github.com/stesie/nixpkgs/tree/azure-cli
... use python36Packages.azure-cli there, $out/bin/az is callable, lists sub-commands and the commands I've tested all worked (though I haven't tested the whole bunch of modules)

Yet packaging needs some more love, currently packaging works only with wheel 0.30.0, hence I've provided a buildPythonPackageOnWheel0_30_0 for the moment, yet I think it's ugly as hell and I wanna get rid of it.

If anyone of you got ideas on how, let me know ...

othrewise feedback welcome :)

Maybe open a PR so some reviewers can offer suggestions? I don't know enough to make many suggestions, unfortunately. Also, congrats and thanks!

For the moment I've opened an issue regarding urllib3, which I need to apply work-arounds against, see https://github.com/NixOS/nixpkgs/issues/46318. I'm not really into python, i.e. don't know how to push that further.

... so there now also is a nixpkgs overlay at https://github.com/stesie/azure-cli-nix. If you need azure-cli urgently you might just want to pick that :)

As the old azure-cli package fails to build since end of July 2019, I opened https://github.com/NixOS/nixpkgs/pull/71170.

71797 has been merged, the "azure-cli v2" python version is now added

Was this page helpful?
0 / 5 - 0 ratings

Related issues

copumpkin picture copumpkin  路  3Comments

vaibhavsagar picture vaibhavsagar  路  3Comments

tomberek picture tomberek  路  3Comments

copumpkin picture copumpkin  路  3Comments

spacekitteh picture spacekitteh  路  3Comments