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.requests-unixsocket: init at 0.1.5 #35056

Merged
merged 1 commit into from Mar 19, 2018

Conversation

catern
Copy link
Contributor

@catern catern commented Feb 16, 2018

No description provided.

meta = {
description = "Use requests to talk HTTP via a UNIX domain socket";
homepage = https://github.com/msabramo/requests-unixsocket;
license = lib.licenses.apache2;
Copy link
Member

Choose a reason for hiding this comment

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

licenses.asl2

# ported to use the now-upstream pytest log capture functionality
doCheck = false;

meta = {
Copy link
Member

Choose a reason for hiding this comment

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

meta = with lib; {

description = "Use requests to talk HTTP via a UNIX domain socket";
homepage = https://github.com/msabramo/requests-unixsocket;
license = lib.licenses.apache2;
maintainers = [ lib.maintainers.catern ];
Copy link
Member

Choose a reason for hiding this comment

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

You can get rid of lib here.


propagatedBuildInputs = [ requests ];

# has unpackaged test dependency pytest-capturelog, should be
Copy link
Member

Choose a reason for hiding this comment

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

Would it be too big an effort to package pytest-capturelog?

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 think it would be unnecessary, since not only is that functionality now upstream, there's a more popular fork "pytest-catchlog" which is packaged. Also, there are other unpackaged test deps besides that one.

@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.requests-unixsocket python3.pkgs.requests-unixsocket

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Partial log (click to expand)

error: while evaluating anonymous function at /home/borg/borg-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/7c6f434c-buildbox/pkgs/stdenv/generic/check-meta.nix:4:1, called from /home/borg/borg-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/7c6f434c-buildbox/pkgs/stdenv/generic/make-derivation.nix:206:18:
while evaluating 'checkValidity' at /home/borg/borg-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/7c6f434c-buildbox/pkgs/stdenv/generic/check-meta.nix:184:19, called from /home/borg/borg-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/7c6f434c-buildbox/pkgs/stdenv/generic/check-meta.nix:199:15:
while evaluating 'hasDeniedUnfreeLicense' at /home/borg/borg-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/7c6f434c-buildbox/pkgs/stdenv/generic/check-meta.nix:59:28, called from /home/borg/borg-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/7c6f434c-buildbox/pkgs/stdenv/generic/check-meta.nix:185:8:
while evaluating 'isUnfree' at /home/borg/borg-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/7c6f434c-buildbox/pkgs/stdenv/generic/check-meta.nix:44:14, called from /home/borg/borg-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/7c6f434c-buildbox/pkgs/stdenv/generic/check-meta.nix:62:5:
while evaluating 'toList' at /home/borg/borg-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/7c6f434c-buildbox/lib/lists.nix:221:12, called from /home/borg/borg-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/7c6f434c-buildbox/pkgs/stdenv/generic/check-meta.nix:62:15:
while evaluating the attribute 'meta.license' at /home/borg/borg-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/7c6f434c-buildbox/pkgs/development/python-modules/requests-unixsocket/default.nix:21:5:
attribute 'asl2' missing, at /home/borg/borg-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/7c6f434c-buildbox/pkgs/development/python-modules/requests-unixsocket/default.nix:21:15

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

�[31;1merror:�[0m while evaluating anonymous function at �[1m/var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/pkgs/stdenv/generic/check-meta.nix�[0m:4:1, called from �[1m/var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/pkgs/stdenv/generic/make-derivation.nix�[0m:206:18:
while evaluating 'checkValidity' at �[1m/var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/pkgs/stdenv/generic/check-meta.nix�[0m:184:19, called from �[1m/var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/pkgs/stdenv/generic/check-meta.nix�[0m:199:15:
while evaluating 'hasDeniedUnfreeLicense' at �[1m/var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/pkgs/stdenv/generic/check-meta.nix�[0m:59:28, called from �[1m/var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/pkgs/stdenv/generic/check-meta.nix�[0m:185:8:
while evaluating 'isUnfree' at �[1m/var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/pkgs/stdenv/generic/check-meta.nix�[0m:44:14, called from �[1m/var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/pkgs/stdenv/generic/check-meta.nix�[0m:62:5:
while evaluating 'toList' at �[1m/var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/lib/lists.nix�[0m:221:12, called from �[1m/var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/pkgs/stdenv/generic/check-meta.nix�[0m:62:15:
while evaluating the attribute 'meta.license' at �[1m/var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/pkgs/development/python-modules/requests-unixsocket/default.nix�[0m:21:5:
attribute 'asl2' missing, at �[1m/var/lib/gc-of-borg/nix-test-rs-3/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-3/pkgs/development/python-modules/requests-unixsocket/default.nix�[0m:21:15

meta = with lib; {
description = "Use requests to talk HTTP via a UNIX domain socket";
homepage = https://github.com/msabramo/requests-unixsocket;
license = licenses.asl2;
Copy link
Member

Choose a reason for hiding this comment

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

Sorry, it should have been asl20.

@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.requests-unixsocket python3.pkgs.requests-unixsocket

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Partial log (click to expand)

    return self.obtain(req, installer)
  File "/nix/store/l6w82h1y7jh6di2h5sxgr8m7rdjykki7-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1158, in obtain
    return installer(requirement)
  File "/nix/store/l6w82h1y7jh6di2h5sxgr8m7rdjykki7-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/setuptools/dist.py", line 528, in fetch_build_egg
    return cmd.easy_install(req)
  File "/nix/store/l6w82h1y7jh6di2h5sxgr8m7rdjykki7-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 667, in easy_install
    raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pbr')
builder for ‘/nix/store/c2ncbgwjldvrrjdxx8bq1bbdf8yxzfg8-python3.6-requests-unixsocket-0.1.5.drv’ failed with exit code 1
error: build of ‘/nix/store/c2ncbgwjldvrrjdxx8bq1bbdf8yxzfg8-python3.6-requests-unixsocket-0.1.5.drv’, ‘/nix/store/f6mkarsan382g02cyf6dl3zd2qiz32kg-python2.7-requests-unixsocket-0.1.5.drv’ failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

    return self.obtain(req, installer)
  File "/nix/store/b0aiccyaw74crz9ibj2g22blw4r414pj-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1158, in obtain
    return installer(requirement)
  File "/nix/store/b0aiccyaw74crz9ibj2g22blw4r414pj-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/setuptools/dist.py", line 528, in fetch_build_egg
    return cmd.easy_install(req)
  File "/nix/store/b0aiccyaw74crz9ibj2g22blw4r414pj-python3.6-bootstrapped-pip-9.0.1/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 667, in easy_install
    raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pbr')
builder for '/nix/store/h5jygnqh8kc7m040db1ngkz2i88b5wdw-python3.6-requests-unixsocket-0.1.5.drv' failed with exit code 1
�[31;1merror:�[0m build of '/nix/store/h5jygnqh8kc7m040db1ngkz2i88b5wdw-python3.6-requests-unixsocket-0.1.5.drv', '/nix/store/r266b6fvzklmqyl0bsz1y69smxgs2l4n-python2.7-requests-unixsocket-0.1.5.drv' failed

@dotlambda
Copy link
Member

nativeBuildInputs = [ pbr ] should do the trick

@dotlambda
Copy link
Member

To enable the tests:

diff --git a/pkgs/development/python-modules/requests-unixsocket/default.nix b/pkgs/development/python-modules/requests-unixsocket/default.nix
index 08e7c9537da..d67e8881110 100644
--- a/pkgs/development/python-modules/requests-unixsocket/default.nix
+++ b/pkgs/development/python-modules/requests-unixsocket/default.nix
@@ -1,4 +1,6 @@
-{ lib, buildPythonPackage, fetchPypi, pbr, requests }:
+{ lib, buildPythonPackage, fetchPypi
+, pbr, requests
+, pytest, pytestpep8, waitress }:
 
 buildPythonPackage rec {
   pname = "requests-unixsocket";
@@ -12,9 +14,11 @@ buildPythonPackage rec {
   nativeBuildInputs = [ pbr ];
   propagatedBuildInputs = [ requests ];
 
-  # has unpackaged test dependency pytest-capturelog, should be
-  # ported to use the now-upstream pytest log capture functionality
-  doCheck = false;
+  checkInputs = [ pytest pytestpep8 waitress ];
+
+  checkPhase = ''
+    py.test
+  '';
 
   meta = with lib; {
     description = "Use requests to talk HTTP via a UNIX domain socket";

@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.requests-unixsocket python3.pkgs.requests-unixsocket

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python2.pkgs.requests-unixsocket, python3.pkgs.requests-unixsocket

Partial log (click to expand)


setup.py .                                                               [ 10%]
requests_unixsocket/__init__.py .                                        [ 20%]
requests_unixsocket/adapters.py .                                        [ 30%]
requests_unixsocket/testutils.py .                                       [ 40%]
requests_unixsocket/tests/test_requests_unixsocket.py ......             [100%]

========================== 10 passed in 1.75 seconds ===========================
/nix/store/11phly3dkfn907gz4shghy2v5hczgp6k-python2.7-requests-unixsocket-0.1.5
/nix/store/aj03pignpj8mv00xlx9f0rjhchnm3m9z-python3.6-requests-unixsocket-0.1.5

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python2.pkgs.requests-unixsocket, python3.pkgs.requests-unixsocket

Partial log (click to expand)


setup.py .                                                               [ 10%]
requests_unixsocket/__init__.py .                                        [ 20%]
requests_unixsocket/adapters.py .                                        [ 30%]
requests_unixsocket/testutils.py .                                       [ 40%]
requests_unixsocket/tests/test_requests_unixsocket.py ......             [100%]

========================== 10 passed in 2.47 seconds ===========================
/nix/store/hm74pras5q2nlq41pqqgzjzd25fqjwp2-python2.7-requests-unixsocket-0.1.5
/nix/store/41zfv6000q7sfh7cgrs4w77cq5gzl67j-python3.6-requests-unixsocket-0.1.5

@dotlambda dotlambda merged commit 196b486 into NixOS:master Mar 19, 2018
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