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.opentracing: init at 2.2.0 #67760

Merged
merged 2 commits into from Oct 31, 2019

Conversation

Rakesh4G
Copy link
Contributor

@Rakesh4G Rakesh4G commented Aug 30, 2019

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 nix-review --run "nix-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.
Notify maintainers

cc @CMCDragonkai

maintainers/maintainer-list.nix Show resolved Hide resolved
pkgs/development/python-modules/opentracing/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/opentracing/default.nix Outdated Show resolved Hide resolved
pkgs/top-level/python-packages.nix Outdated Show resolved Hide resolved
Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

need futures for python2, and the tests were meant to be used with pytest. I would do something like:

{ lib, buildPythonPackage, fetchPypi, isPy27
, futures
, gevent
, mock
, pytest
, tornado
}:

buildPythonPackage rec {
  pname = "opentracing";
  version = "2.2.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "cfd231ba5c58f90bc277787e62861eb0c6e4af76e42957bec240bbdf71fb7e0e";
  };

  propagatedBuildInputs = lib.optional isPy27 futures;

  checkInputs = [ gevent mock pytest tornado ];
  checkPhase = ''
    pytest
  '';

  meta = with lib; {
    description = "This library is a Python platform API for OpenTracing";
    homepage = "https://github.com/opentracing/opentracing-python";
    license = licenses.asl20;
    maintainers = with maintainers; [ rakesh4g ];
  };
}

@Rakesh4G
Copy link
Contributor Author

{ lib, buildPythonPackage, fetchPypi, isPy27
, futures
, gevent
, mock
, pytest
, tornado
}:

buildPythonPackage rec {
pname = "opentracing";
version = "2.2.0";

src = fetchPypi {
inherit pname version;
sha256 = "cfd231ba5c58f90bc277787e62861eb0c6e4af76e42957bec240bbdf71fb7e0e";
};

propagatedBuildInputs = lib.optional isPy27 futures;

checkInputs = [ gevent mock pytest tornado ];
checkPhase = ''
pytest
'';

meta = with lib; {
description = "This library is a Python platform API for OpenTracing";
homepage = "https://github.com/opentracing/opentracing-python";
license = licenses.asl20;
maintainers = with maintainers; [ rakesh4g ];
};
}

Thanks @jonringer. Yes it looks more appropriate. I will test this in my environment and update.

@Rakesh4G Rakesh4G marked this pull request as ready for review September 2, 2019 06:50
@Rakesh4G Rakesh4G requested a review from FRidh as a code owner September 2, 2019 06:50
@Rakesh4G Rakesh4G changed the title python3Packages.opentracing: init at 2.2.0 pythonPackages.opentracing: init at 2.2.0 Sep 2, 2019
@Rakesh4G
Copy link
Contributor Author

Rakesh4G commented Sep 2, 2019

attaching the build_output along with test phase.
opentracing_build_with_tests.txt

@wd15
Copy link
Contributor

wd15 commented Sep 3, 2019

I think you'll probably need to make the 7225cff commit (where you add yourself as maintainer) to be the first commit and then squash the rest into a second commit.

Build works for me though.

Result of nix-review pr 67760 1

2 packages were built:
  • python27Packages.opentracing
  • python37Packages.opentracing

@Rakesh4G
Copy link
Contributor Author

Rakesh4G commented Sep 4, 2019

I think you'll probably need to make the 7225cff commit (where you add yourself as maintainer) to be the first commit and then squash the rest into a second commit.

Build works for me though.

Result of nix-review pr 67760 1

2 packages were built:

Hi @wd15 , I have tried to update as suggested. Thanks.

@wd15
Copy link
Contributor

wd15 commented Sep 4, 2019

Hi @wd15 , I have tried to update as suggested. Thanks.

You could also swap the order of the two remaining commits.

@Rakesh4G
Copy link
Contributor Author

Rakesh4G commented Sep 5, 2019

Hi @wd15 , I have tried to update as suggested. Thanks.

You could also swap the order of the two remaining commits.

ok @wd15 , Thanks i will do this.

@Rakesh4G
Copy link
Contributor Author

Rakesh4G commented Sep 5, 2019

Hi @wd15 , I have tried to update as suggested. Thanks.

You could also swap the order of the two remaining commits.

Hi @wd15, When i went to reverse the commit order, I realised that the order in my branch is already in reverse order (add maintainer first). But may be due to date difference it is not shown properly here.

> git log 
commit b871d8dd24451234f5db620873d3c4a40d00c7d3 (HEAD -> opentracing_python)
Author: Rakesh4G <rakeshgupta4u@gmail.com>
Date:   Fri Aug 30 20:44:50 2019 +1000

    python3Packages.opentracing: init at 2.2.0

commit 68fa9b6defa50ea19bfc16f0141a889a93c24fb0
Author: Rakesh4G <rakeshgupta4u@gmail.com>
Date:   Mon Sep 2 16:12:16 2019 +1000

    maintainers: add rakesh4g


@wd15
Copy link
Contributor

wd15 commented Sep 5, 2019

Hi @wd15, When i went to reverse the commit order, I realised that the order in my branch is already in reverse order (add maintainer first). But may be due to date difference it is not shown properly here.

No worries then.

@CMCDragonkai
Copy link
Member

Is this ready to be merged?

@Rakesh4G
Copy link
Contributor Author

@CMCDragonkai Yes, This is ready to be merged.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

nix-review passes on NixOS
diff LGTM
leaf package

@CMCDragonkai
Copy link
Member

Hey can we get this merged?

@jonringer
Copy link
Contributor

to fix the commit history, please do:

git rebase -i HEAD~3
# then delete the middle wrong commit, and switch the other two lines/commits
git pull -r origin master  # to rebase on top of current master
# resolve conflicts
git add .
git rebase --continue

@Rakesh4G
Copy link
Contributor Author

to fix the commit history, please do:

git rebase -i HEAD~3
# then delete the middle wrong commit, and switch the other two lines/commits
git pull -r origin master  # to rebase on top of current master
# resolve conflicts
git add .
git rebase --continue

OK, Thanks.

@jonringer
Copy link
Contributor

@GrahamcOfBorg build python27Packages.opentracing python37Packages.opentracing python38Packages.opentracing

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

nix-review passes on NixOS
diff LGTM
commits LGTM
outputs LGTM

[5 built, 0.0 MiB DL]
https://github.com/NixOS/nixpkgs/pull/67760
3 package were build:
python27Packages.opentracing python37Packages.opentracing python38Packages.opentracing

@jonringer jonringer merged commit e5236a1 into NixOS:master Oct 31, 2019
@Rakesh4G Rakesh4G deleted the opentracing_python branch December 10, 2019 06:13
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

6 participants