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

pythonPackages.pyotp: Disable on Python27 #100023

Merged
merged 1 commit into from Oct 23, 2020

Conversation

IvarWithoutBones
Copy link
Member

@IvarWithoutBones IvarWithoutBones commented Oct 8, 2020

Motivation for this change

This disables tests for python27, as they import urllib in an unsupported way.

ZHF: #97479

Result of nixpkgs-review pr 100023 1

4 packages built:
  • home-assistant
  • python27Packages.pyotp
  • python37Packages.pyotp
  • python38Packages.pyotp
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@risicle
Copy link
Contributor

risicle commented Oct 8, 2020

Could you add a pythonImportsCheck then please?

@IvarWithoutBones
Copy link
Member Author

Could you add a pythonImportsCheck then please?

Quite new to python packaging, was not aware of this being a thing. Thanks. This showed me the application does not work at all with python 2.7, so I've adjusted the PR accordingly. I've still added an pythonImportsCheck, as it can't hurt to check.

Check whether the following modules can be imported: pyotp
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<string>", line 1, in <lambda>
  File "/nix/store/5r503z502ign3045p957svdajs574fny-python-2.7.18/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/nix/store/6mj608cz3749m4vz0b36bzvmbnddhma1-python2.7-pyotp-2.4.0/lib/python2.7/site-packages/pyotp/__init__.py", line 14
    length: int = 16,
          ^
SyntaxError: invalid syntax
builder for '/nix/store/f0nd7gwg3ymrlmd4hfcdpb2x94cgki5a-python2.7-pyotp-2.4.0.drv' failed with exit code 1
error: build of '/nix/store/f0nd7gwg3ymrlmd4hfcdpb2x94cgki5a-python2.7-pyotp-2.4.0.drv' failed

@IvarWithoutBones IvarWithoutBones changed the title pythonPackages.pyotp: fix tests pythonPackages.pyotp: Disable on Python27 Oct 8, 2020
@mweinelt
Copy link
Member

mweinelt commented Oct 8, 2020

Result of nixpkgs-review pr 100023 1

3 packages built:
  • home-assistant
  • python37Packages.pyotp
  • python38Packages.pyotp


src = fetchPypi {
inherit pname version;
sha256 = "01eceab573181188fe038d001e42777884a7f5367203080ef5bda0e30fe82d28";
};

checkInputs = [ urllib3 ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this dependency come from?

Copy link
Member

@mweinelt mweinelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering about the urllib3 dependency.

@IvarWithoutBones
Copy link
Member Author

Wondering about the urllib3 dependency.

Oops, looks like i accidentally left that in. Removed 👍

@mweinelt mweinelt merged commit f235820 into NixOS:master Oct 23, 2020
@IvarWithoutBones IvarWithoutBones deleted the pyotp-fix branch October 23, 2020 02:22
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

3 participants