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.block-io: init at 1.1.8 #42619

Merged
merged 2 commits into from Sep 23, 2018

Conversation

nyanloutre
Copy link
Member

Motivation for this change

Block.io official python bindings and a missing dependancy (base58)

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.

@nyanloutre
Copy link
Member Author

There may just be a problem with the pycrypto version, please wait before merge

@nyanloutre
Copy link
Member Author

I wrote a small patch as it was an easy fix 👍

@FRidh
Copy link
Member

FRidh commented Jun 29, 2018

@GrahamcOfBorg build python.pkgs.block-io python.pkgs.base58 python3.pkgs.block-io python3.pkgs.base58

{ stdenv, fetchPypi, buildPythonPackage }:

buildPythonPackage rec {
name = "${pname}-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

The name attribute is added by buildPython* and should therefore be removed.

{ stdenv, fetchPypi, buildPythonPackage, base58, ecdsa, pycrypto, requests, six }:

buildPythonPackage rec {
name = "${pname}-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

The name attribute is added by buildPython* and should therefore be removed.

};

patches = [
./patch-pycrypto
Copy link
Member

Choose a reason for hiding this comment

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

Have you submitted the patch upstream?

Copy link
Member Author

Choose a reason for hiding this comment

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

I should maybe :)

Copy link
Member

Choose a reason for hiding this comment

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

Please do that and then best use fetchpatch here.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python.pkgs.block-io, python.pkgs.base58, python3.pkgs.block-io, python3.pkgs.base58

Partial log (click to expand)

running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
/nix/store/335dg1jhjyfv9kga934v701lx4nxx2zz-python2.7-block-io-1.1.6
/nix/store/91x6mbb9mlssfy6jl9q93fmz25y1szgi-python2.7-base58-1.0.0
/nix/store/3l14aj37bgdng10j6965svk1hpa7hbk5-python3.6-block-io-1.1.6
/nix/store/0m8pin56w3q2mk2b8p9mbm0f100bw22d-python3.6-base58-1.0.0

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: python.pkgs.block-io, python.pkgs.base58, python3.pkgs.block-io, python3.pkgs.base58

Partial log (click to expand)

running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
/nix/store/lbk955x2d09wvyrzyn7v5d8sj7xykzx8-python2.7-block-io-1.1.6
/nix/store/97f5niq62dc4sx4a7idjc47mdvl36af4-python2.7-base58-1.0.0
/nix/store/lbn6bfk80xhvfjvcy9mylhzq1gfm3mh7-python3.6-block-io-1.1.6
/nix/store/jqkqlrwahmn00mpbkjmbs8shd71l77jz-python3.6-base58-1.0.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python.pkgs.block-io, python.pkgs.base58, python3.pkgs.block-io, python3.pkgs.base58

Partial log (click to expand)

running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
/nix/store/iqxmfm4vc9qrgr2hcv8y2rkpdq6hqjw9-python2.7-block-io-1.1.6
/nix/store/jcnn0ldyff3z9krkwm5x5s8nbk97r8f7-python2.7-base58-1.0.0
/nix/store/xhlyp7m2sikjz87glwsa5xpc4nwz7xzc-python3.6-block-io-1.1.6
/nix/store/rh7rzy23b0y2b7p2mr4wscf6z75bp4an-python3.6-base58-1.0.0

@FRidh FRidh changed the title Python packages.block io: init at 1.1.6 pythonPackages.block io: init at 1.1.6 Jun 29, 2018
@FRidh
Copy link
Member

FRidh commented Jun 29, 2018

Ran 0 tests in 0.000s

No tests are found. Either the test runner cannot find tests and needs to be patched, or there simply are no tests in which case the tests need to be disabled. Do include a comment explaining why the tests are disabled.

@nyanloutre
Copy link
Member Author

Hi, I added tests for the base58 package and pruned the extra variables.

Unfortunately the block-io package needs an API key to run the tests, so I disabled them with a link to the relevant line upstream.

@dotlambda dotlambda changed the title pythonPackages.block io: init at 1.1.6 pythonPackages.block-io: init at 1.1.6 Jul 7, 2018

buildInputs = [ pytest pytestpep8 pytestflakes pytestcov pyhamcrest ];
checkPhase = ''
pytest --pep8 --flakes --cov=base58
Copy link
Member

Choose a reason for hiding this comment

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

It would be better to remove the flags from this line and appropriate packages from checkInputs. They are not interesting for Nixpkgs.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@nyanloutre
Copy link
Member Author

My patch has been merged and a new version has been released, I will update accordingly later today.

https://github.com/BlockIo/block_io-python/releases/tag/1.1.8

@nyanloutre nyanloutre changed the title pythonPackages.block-io: init at 1.1.6 pythonPackages.block-io: init at 1.1.8 Sep 11, 2018
Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

Please squash your last 3 commits into one.

src = fetchFromGitHub {
owner = "keis";
repo = "base58";
rev = "871dbe14fe8e9675ef262a5e06fbf3874562a28c";
Copy link
Member

Choose a reason for hiding this comment

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

Any reason not to use rev = "v${version}"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Is it a good practice ? While checking on a few existing derivations I figured this was standard.

src = fetchFromGitHub {
owner = "BlockIo";
repo = "block_io-python";
rev = "7d532edcfbcc85da68782d4ec0c7767a0008183f";
Copy link
Member

Choose a reason for hiding this comment

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

Here as well. Also, why don't you use fetchPypi?

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right, I fetched from GitHub so I could apply my patch but now that it's included in the latest version I can use fetchPypi again.

doCheck = false;

meta = with stdenv.lib; {
description = "The easiest way to integrate Bitcoin, Dogecoin and Litecoin in your applications. Sign up at Block.io for your API key.";
Copy link
Member

Choose a reason for hiding this comment

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

@nyanloutre
Copy link
Member Author

@dotlambda : I think I completed your requests 🎉

@nyanloutre
Copy link
Member Author

Hello @FRidh, is something still preventing to merge ?

@FRidh
Copy link
Member

FRidh commented Sep 23, 2018

@GrahamcOfBorg build pythonPackages.block-io pythonPackages.base58 python3Packages.block-io python3Packages.base58

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: pythonPackages.block-io, pythonPackages.base58, python3Packages.block-io, python3Packages.base58

Partial log (click to expand)

Successfully installed block-io-1.1.8
/private/tmp/nix-build-python3.6-block-io-1.1.8.drv-0/block-io-1.1.8
post-installation fixup
strip is /nix/store/df6k4mgdjxciy0f637lryp7c9ln7n1m3-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/hivv4x4fp5y7qicjgnc5ansfbnkg04dw-python3.6-block-io-1.1.8/lib
patching script interpreter paths in /nix/store/hivv4x4fp5y7qicjgnc5ansfbnkg04dw-python3.6-block-io-1.1.8
/nix/store/fsln2hqzqjk4k5nd8rgvy5li0zqkb9vn-python2.7-block-io-1.1.8
/nix/store/l9syzj7wdva8bjfq3x9xyvlfm73wv480-python2.7-base58-1.0.0
/nix/store/hivv4x4fp5y7qicjgnc5ansfbnkg04dw-python3.6-block-io-1.1.8
/nix/store/i8rwpycls0q9rvk7g0lj06mbb3qxf2kr-python3.6-base58-1.0.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: pythonPackages.block-io, pythonPackages.base58, python3Packages.block-io, python3Packages.base58

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/a4yah469vbyf9n1ihsi73nz7y6i63l3d-python3.6-block-io-1.1.8
strip is /nix/store/y4ymnvgxygpq05h03kyzbj572zmh6zla-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/a4yah469vbyf9n1ihsi73nz7y6i63l3d-python3.6-block-io-1.1.8/lib
patching script interpreter paths in /nix/store/a4yah469vbyf9n1ihsi73nz7y6i63l3d-python3.6-block-io-1.1.8
checking for references to /build in /nix/store/a4yah469vbyf9n1ihsi73nz7y6i63l3d-python3.6-block-io-1.1.8...
/nix/store/c1x9f2k4jp3dv4afkb77ngjk6x64djbz-python2.7-block-io-1.1.8
/nix/store/3az36w97m1m3shrpbv0jk1nkix0y9qiy-python2.7-base58-1.0.0
/nix/store/a4yah469vbyf9n1ihsi73nz7y6i63l3d-python3.6-block-io-1.1.8
/nix/store/qcfyb4p59pcr7sc88fg42syy5imvxd7n-python3.6-base58-1.0.0

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: pythonPackages.block-io, pythonPackages.base58, python3Packages.block-io, python3Packages.base58

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/g81k5zj9khwfhq9yqcy05nrqrh867jvv-python3.6-block-io-1.1.8
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/g81k5zj9khwfhq9yqcy05nrqrh867jvv-python3.6-block-io-1.1.8/lib
patching script interpreter paths in /nix/store/g81k5zj9khwfhq9yqcy05nrqrh867jvv-python3.6-block-io-1.1.8
checking for references to /build in /nix/store/g81k5zj9khwfhq9yqcy05nrqrh867jvv-python3.6-block-io-1.1.8...
/nix/store/qf4qziqay2r77rbzgfw92im4m6mjfh73-python2.7-block-io-1.1.8
/nix/store/ibdqbqa2cg15isdrbslhsa829pzw3dic-python2.7-base58-1.0.0
/nix/store/g81k5zj9khwfhq9yqcy05nrqrh867jvv-python3.6-block-io-1.1.8
/nix/store/aljlyml8245dsa0aczgg10bwaqbw9098-python3.6-base58-1.0.0

@FRidh FRidh merged commit 343ac4d into NixOS:master Sep 23, 2018
@nyanloutre nyanloutre deleted the pythonPackages.block-io branch October 2, 2018 07:45
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

4 participants