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.azure-keyvault: init at 1.1.0 #54976

Closed
wants to merge 1 commit into from
Closed

pythonPackages.azure-keyvault: init at 1.1.0 #54976

wants to merge 1 commit into from

Conversation

peterromfeldhk
Copy link
Contributor

@peterromfeldhk peterromfeldhk commented Jan 31, 2019

pythonPackages.msrestazure: init at 0.6.0
pythonPackages.msrest: init at 0.6.4

Motivation for this change
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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@peterromfeldhk
Copy link
Contributor Author

i am getting

collision between `/nix/store/vwxrdazjg2z2v0z2m5njlvysxv3bhg07-python3.7-azure-common-1.1.16/lib/python3.7/site-packages/azure/__init__.py' and `/nix/store/vx993ylcavaphrwz483zp1m01js6wjga-python3.7-azure-keyvault-1.1.0/lib/python3.7/site-packages/azure/__init__.py'

not sure how to fix :(

pkgs/development/python-modules/msrest/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/msrestazure/default.nix Outdated Show resolved Hide resolved
doCheck = false;

meta = with lib; {
description = "MS wrapper around wrapper around requests without description";
Copy link
Member

Choose a reason for hiding this comment

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

It seems to me you have no clue what these libraries do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes they are a dependency of one lib i need :(

@dotlambda
Copy link
Member

Please make separate commits for the three packages.


propagatedBuildInputs = [ azure-common msrest msrestazure ];

# no tests in pypi package, not sure how to do fetchFromGitHub with this monorepo
Copy link
Member

Choose a reason for hiding this comment

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

using sourceRoot

pkgs/development/python-modules/azure-keyvault/default.nix Outdated Show resolved Hide resolved
propagatedBuildInputs = [ isodate requests requests_oauthlib ];

# TypeError: async_poller() missing 4 required positional arguments: 'client',
# 'initial_response', 'deserialization_callback', and 'polling_method'
Copy link
Member

Choose a reason for hiding this comment

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

This looks like it shouldn't happen. Any idea what the problem is? Maybe you have to set a checkPhase?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i tried to add aiodns, tried using 3.6 and looking through the docs and travic-ci.yaml but could not figure out whats missing :(

Traceback (most recent call last):
  File "nix_run_setup", line 8, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 61, in <module>
    'aiodns'
  File "/nix/store/z52q964awi2ix9pivyayx2vkyjhvq6hk-python3.6-bootstrapped-pip-18.1/lib/python3.6/site-packages/setuptools/__init__.py", line 143, in setup
    return distutils.core.setup(**attrs)
  File "/nix/store/9xa9i83pfcbdhnks928h5d24a1ks9d7j-python3-3.6.8/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/nix/store/9xa9i83pfcbdhnks928h5d24a1ks9d7j-python3-3.6.8/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/nix/store/9xa9i83pfcbdhnks928h5d24a1ks9d7j-python3-3.6.8/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/nix/store/z52q964awi2ix9pivyayx2vkyjhvq6hk-python3.6-bootstrapped-pip-18.1/lib/python3.6/site-packages/setuptools/command/test.py", line 228, in run
    self.run_tests()
  File "/nix/store/z52q964awi2ix9pivyayx2vkyjhvq6hk-python3.6-bootstrapped-pip-18.1/lib/python3.6/site-packages/setuptools/command/test.py", line 250, in run_tests
    exit=False,
  File "/nix/store/9xa9i83pfcbdhnks928h5d24a1ks9d7j-python3-3.6.8/lib/python3.6/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/nix/store/9xa9i83pfcbdhnks928h5d24a1ks9d7j-python3-3.6.8/lib/python3.6/unittest/main.py", line 118, in parseArgs
    self._do_discovery(argv[2:])
  File "/nix/store/9xa9i83pfcbdhnks928h5d24a1ks9d7j-python3-3.6.8/lib/python3.6/unittest/main.py", line 229, in _do_discovery
    self.test = loader.discover(self.start, self.pattern, self.top)
  File "/nix/store/9xa9i83pfcbdhnks928h5d24a1ks9d7j-python3-3.6.8/lib/python3.6/unittest/loader.py", line 341, in discover
    tests = list(self._find_tests(start_dir, pattern))
  File "/nix/store/9xa9i83pfcbdhnks928h5d24a1ks9d7j-python3-3.6.8/lib/python3.6/unittest/loader.py", line 398, in _find_tests
    full_path, pattern, namespace)
  File "/nix/store/9xa9i83pfcbdhnks928h5d24a1ks9d7j-python3-3.6.8/lib/python3.6/unittest/loader.py", line 475, in _find_test_path
    tests = self.loadTestsFromModule(package, pattern=pattern)
  File "/nix/store/z52q964awi2ix9pivyayx2vkyjhvq6hk-python3.6-bootstrapped-pip-18.1/lib/python3.6/site-packages/setuptools/command/test.py", line 54, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/nix/store/9xa9i83pfcbdhnks928h5d24a1ks9d7j-python3-3.6.8/lib/python3.6/unittest/loader.py", line 190, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/nix/store/z52q964awi2ix9pivyayx2vkyjhvq6hk-python3.6-bootstrapped-pip-18.1/lib/python3.6/site-packages/setuptools/command/test.py", line 54, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/nix/store/9xa9i83pfcbdhnks928h5d24a1ks9d7j-python3-3.6.8/lib/python3.6/unittest/loader.py", line 204, in loadTestsFromName
    test = obj()
TypeError: async_poller() missing 4 required positional arguments: 'client', 'initial_response', 'deserialization_callback', and 'polling_method'

pkgs/development/python-modules/msrest/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/msrestazure/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/azure-keyvault/default.nix Outdated Show resolved Hide resolved
pythonPackages.msrestazure: init at 0.6.0
pythonPackages.msrest: init at 0.6.4
@dotlambda
Copy link
Member

diff --git a/pkgs/development/python-modules/msrest/default.nix b/pkgs/development/python-modules/msrest/default.nix
index 0abf1508113..7e16d7f5859 100644
--- a/pkgs/development/python-modules/msrest/default.nix
+++ b/pkgs/development/python-modules/msrest/default.nix
@@ -1,5 +1,9 @@
 { lib, buildPythonPackage, fetchFromGitHub
-, isodate, requests, requests_oauthlib }:
+, pythonOlder, pythonAtLeast, isPy3k
+, requests, requests_oauthlib, isodate, certifi
+, enum34, typing, aiohttp, aiodns
+, pytest, httpretty, mock
+}:
 
 buildPythonPackage rec {
   pname = "msrest";
@@ -12,14 +16,20 @@ buildPythonPackage rec {
     sha256 = "0ilrc06qq0dw4qqzq1dq2vs6nymc39h19w52dwcyawwfalalnjzi";
   };
 
-  propagatedBuildInputs = [ isodate requests requests_oauthlib ];
+  propagatedBuildInputs = [ requests requests_oauthlib isodate certifi ]
+    ++ lib.optional (pythonOlder "3.4") enum34
+    ++ lib.optional (pythonOlder "3.5") typing
+    ++ lib.optionals (pythonAtLeast "3.5") [ aiohttp aiodns ];
 
-  # TypeError: async_poller() missing 4 required positional arguments: 'client',
-  # 'initial_response', 'deserialization_callback', and 'polling_method'
-  doCheck = false;
+  checkInputs = [ pytest httpretty ]
+    ++ lib.optional (!isPy3k) mock;
+
+  checkPhase = ''
+    pytest tests/
+  '';
 
   meta = with lib; {
-    description = "Microsoft wrapper around requests";
+    description = "AutoRest swagger generator Python client runtime";
     homepage = https://github.com/Azure/msrest-for-python;
     maintainers = with maintainers; [ peterromfeldhk ];
     license = licenses.mit;

There are still some errors I'll leave to you but that was not very difficult to do.

Also, I found out you didn't add the dependencies for older Python versions: https://github.com/Azure/msrest-for-python/blob/master/setup.py#L57-L58. Please check this for future and existing PRs.

Their setup.py features a description we can use: https://github.com/Azure/msrest-for-python/blob/master/setup.py#L36.

Finally, please make separate commits as I requested and fix the eval failure detected by ofborg: https://gist.github.com/GrahamcOfBorg/e76145b890e5d2a14ea9b2bfe84c6882

@mmahut
Copy link
Member

mmahut commented Aug 20, 2019

Are there any updates on this pull request, please?

@yorickvP
Copy link
Contributor

yorickvP commented Dec 4, 2019

added in #60435

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review-may-2019/3032/87

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/76

@timokau timokau closed this Dec 4, 2019
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

7 participants