Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible-lint: explicitly use python2Packages #44413

Closed
wants to merge 1 commit into from

Conversation

dotlambda
Copy link
Member

The README tells us to use pip2. I infer that this package is not python3-compatible.
Also, the build fails when using python3Packages.

Motivation for this change

#18185

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

cc @sengaya

The README tells us to use `pip2`. I infer that this package is not python3-compatible.
Also, the build fails when using `python3Packages`.
@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: ansible-lint

Partial log (click to expand)

  /nix/store/lqr50cgvd0c9h2yiskzhldkr4kwmqb8s-python2.7-ansible-2.5.2
  /nix/store/mxppgv9z6g8m6bn0dcfyr4dwll9cjbwz-python2.7-paramiko-2.1.1
  /nix/store/wasxckwzal39ph216yv3nzjkbfk1892w-python2.7-dnspython-1.15.0
copying path '/nix/store/wasxckwzal39ph216yv3nzjkbfk1892w-python2.7-dnspython-1.15.0' from 'https://cache.nixos.org'...
copying path '/nix/store/j2bicmqm82z7y53piz8m17ahp9w3mfpj-python2.7-httplib2-0.11.3' from 'https://cache.nixos.org'...
copying path '/nix/store/d2q5z72bqv482vhzrwzg6fwb0qapv41h-python2.7-netaddr-0.7.19' from 'https://cache.nixos.org'...
copying path '/nix/store/mxppgv9z6g8m6bn0dcfyr4dwll9cjbwz-python2.7-paramiko-2.1.1' from 'https://cache.nixos.org'...
copying path '/nix/store/lqr50cgvd0c9h2yiskzhldkr4kwmqb8s-python2.7-ansible-2.5.2' from 'https://cache.nixos.org'...
copying path '/nix/store/55j0mjg2x6cpsdbqcxqfijdvh6xc800s-python2.7-ansible-lint-3.4.20' from 'https://cache.nixos.org'...
/nix/store/55j0mjg2x6cpsdbqcxqfijdvh6xc800s-python2.7-ansible-lint-3.4.20

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: ansible-lint

Partial log (click to expand)

copying path '/nix/store/hxrc6lpr5a4d2z59wy9zj19hk34sv0gx-python2.7-dnspython-1.15.0' from 'https://cache.nixos.org'...
copying path '/nix/store/gywk7zbn93rl7xd01nlxjyv3srbw64i7-python2.7-httplib2-0.11.3' from 'https://cache.nixos.org'...
copying path '/nix/store/vdxkp10fl4jl7p6laijxs70ab2mgkxv8-python2.7-httpretty-0.8.10' from 'https://cache.nixos.org'...
copying path '/nix/store/49h73p7lqhy3ip4bwjqv1ixh1dd36hik-python2.7-netaddr-0.7.19' from 'https://cache.nixos.org'...
copying path '/nix/store/1kiwilkhqhbhgjadzgfvb7g0h0r6p2sv-python2.7-boto-2.47.0' from 'https://cache.nixos.org'...
copying path '/nix/store/iypqw2h964lkbiz260k0dn9lrnzqzyf5-python2.7-paramiko-2.1.1' from 'https://cache.nixos.org'...
copying path '/nix/store/md24qy8rykc737fnx876k9a9886dhi79-python2.7-pycrypto-3.6.4' from 'https://cache.nixos.org'...
copying path '/nix/store/61jk05bv9jhbcglx41g80g2f47zsabgi-python2.7-ansible-2.5.2' from 'https://cache.nixos.org'...
copying path '/nix/store/nm4vp6g24r2bcxbswmlc6n31mc3nf5br-python2.7-ansible-lint-3.4.20' from 'https://cache.nixos.org'...
/nix/store/nm4vp6g24r2bcxbswmlc6n31mc3nf5br-python2.7-ansible-lint-3.4.20

@Mic92
Copy link
Member

Mic92 commented Aug 3, 2018

Travis indicates it support both: https://github.com/willthames/ansible-lint/blob/master/.travis.yml

@dotlambda
Copy link
Member Author

Okay, the problem is that ansible-lint must use the same python as ansible.
That means that anyway, we should override ansible in the ansible-lint expression. However, we should probably stick to python2 because ansible deliberately uses python2: #40277 (comment).
Also, it's kind of strange that ansible is in propagatedBuildInputs but not in pythonPackages. We should probably update the ansible expression to use buildPythonApplication and use toPythonModule in ansible-lint. What does @FRidh think?

@xeji
Copy link
Contributor

xeji commented Aug 5, 2018

Arch builds both ansible and ansible-lint with python3.

@dotlambda
Copy link
Member Author

Arch builds both ansible and ansible-lint with python3.

Arch ships ansible 2.6, which has not even been released according to https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#id13 but is nevertheless available on PyPI.
As mentioned in the PR linked to above, we ship 2.4 and 2.5 with 2.4 officially not supporting Python 3.

@xeji
Copy link
Contributor

xeji commented Aug 5, 2018

Ah right, forgot about that.

@sengaya
Copy link
Contributor

sengaya commented Oct 8, 2018

I wonder if we can now that ansible 2.7 is released and 2.4 is out of support move fully to python3?

@Mic92
Copy link
Member

Mic92 commented Oct 9, 2018

@sengaya sounds like a plan

@sengaya sengaya mentioned this pull request Nov 4, 2018
9 tasks
@Mic92
Copy link
Member

Mic92 commented Nov 5, 2018

replaced by #49764

@Mic92 Mic92 closed this Nov 5, 2018
@dotlambda dotlambda deleted the ansible-lint-python2 branch January 17, 2024 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants