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

doitlive: init at 3.0.3 #34361

Merged
merged 1 commit into from Mar 14, 2018
Merged

doitlive: init at 3.0.3 #34361

merged 1 commit into from Mar 14, 2018

Conversation

mbode
Copy link
Contributor

@mbode mbode commented Jan 28, 2018

Motivation for this change

Add package doitlive

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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/)
  • Fits CONTRIBUTING.md.

@fpletz
Copy link
Member

fpletz commented Jan 28, 2018

This should rather be in all-packages.nix and not put in pkgs/development/python-modules as it is an executable tool.

@fpletz
Copy link
Member

fpletz commented Jan 28, 2018

@GrahamcOfBorg build pythonPackages.doitlive

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Failure on aarch64-linux (full log)

Partial log (click to expand)

Reading https://pypi.python.org/simple/pytest/
Download error on https://pypi.python.org/simple/pytest/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'pytest' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or working download links found for pytest
error: Could not find suitable distribution for Requirement.parse('pytest')
builder for '/nix/store/x9d6ixwmqna3f35mg4irq6vwkms1apbc-doitlive-3.0.3.drv' failed with exit code 1
error: build of '/nix/store/x9d6ixwmqna3f35mg4irq6vwkms1apbc-doitlive-3.0.3.drv' failed

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Success on x86_64-darwin (full log)

Partial log (click to expand)

reading manifest file 'doitlive.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'doitlive.egg-info/SOURCES.txt'
running build_ext

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

OK
/nix/store/3dds2kdx2kkwnd01ichfmxb80gbijixk-doitlive-3.0.3

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Failure on x86_64-linux (full log)

Partial log (click to expand)

Reading https://pypi.python.org/simple/pytest/
Download error on https://pypi.python.org/simple/pytest/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'pytest' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or working download links found for pytest
error: Could not find suitable distribution for Requirement.parse('pytest')
builder for ‘/nix/store/7idllqrfw69j5pqmksmmpk7yay60k2ii-doitlive-3.0.3.drv’ failed with exit code 1
error: build of ‘/nix/store/7idllqrfw69j5pqmksmmpk7yay60k2ii-doitlive-3.0.3.drv’ failed


buildPythonApplication rec {
pname = "doitlive";
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.

no name


propagatedBuildInputs = [ click ];

checkInputs = [ ipython ];
Copy link
Member

Choose a reason for hiding this comment

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

Did you try specifying a custom checkPhase such that the tests are run? This should be something like invoke test oder py.test.

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, basically using

checkInputs = with python3Packages; [ pkgs.git ipython pytest ];
LC_ALL="en_US.UTF-8";
checkPhase = "pytest";

Still something like 20 tests were failing due to issues with ipython. Unfortunately could not get it to work. How important is the check phase for python packages?

Copy link
Member

Choose a reason for hiding this comment

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

Okay, let's keep the tests disabled. Please add a comment that there were too many failures or something like that.
However, tests are nice to have for automatic updates.

, pkgs, python3Packages }:

python3Packages.buildPythonApplication rec {
name = "doitlive-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

pname

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

name = "doitlive-${version}";
version = "3.0.3";

src = fetchFromGitHub {
Copy link
Member

Choose a reason for hiding this comment

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

Why not fetchPypi?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

sha256 = "1y1v7f64fhykm7p9yp1ymx1gj6s8qzcq6ygyf3fzwrvw2jjf3n93";
};

propagatedBuildInputs = with python3Packages; [ pkgs.which click ];
Copy link
Member

Choose a reason for hiding this comment

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

  1. which should be an argument, not pkgs.
  2. Is which called by doitlive? In that case, I think it's better to patch the sources or add makeWrapperArgs = ["--prefix PATH : ${which}/bin"];

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed it

{ stdenv, pythonPackages }:

pythonPackages.buildPythonApplication 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.

drop this line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -20134,6 +20134,8 @@ with pkgs;

dbus-map = callPackage ../tools/misc/dbus-map { };

doitlive = callPackage ../tools/misc/doitlive { };
Copy link
Member

Choose a reason for hiding this comment

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

I think the right place would be in the TOOLS section, after dlx.

@dotlambda
Copy link
Member

@GrahamcOfBorg build doitlive

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: doitlive

Partial log (click to expand)

Successfully installed doitlive-3.0.3
/tmp/nix-build-doitlive-3.0.3.drv-0/doitlive-3.0.3
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/a5d3bqg4rq0zgw9rgb271kb12z32ffgz-doitlive-3.0.3
strip is /nix/store/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/a5d3bqg4rq0zgw9rgb271kb12z32ffgz-doitlive-3.0.3/lib  /nix/store/a5d3bqg4rq0zgw9rgb271kb12z32ffgz-doitlive-3.0.3/bin 
patching script interpreter paths in /nix/store/a5d3bqg4rq0zgw9rgb271kb12z32ffgz-doitlive-3.0.3
checking for references to /tmp/nix-build-doitlive-3.0.3.drv-0 in /nix/store/a5d3bqg4rq0zgw9rgb271kb12z32ffgz-doitlive-3.0.3...
wrapping `/nix/store/a5d3bqg4rq0zgw9rgb271kb12z32ffgz-doitlive-3.0.3/bin/doitlive'...
/nix/store/a5d3bqg4rq0zgw9rgb271kb12z32ffgz-doitlive-3.0.3

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: doitlive

Partial log (click to expand)

Successfully installed doitlive-3.0.3
/build/doitlive-3.0.3
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/jqyn5647qjdx1h10i776vpwqga9qzn00-doitlive-3.0.3
strip is /nix/store/lvx1acn1ig1j2km8jds5x3ggh3f2wa8v-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/jqyn5647qjdx1h10i776vpwqga9qzn00-doitlive-3.0.3/lib  /nix/store/jqyn5647qjdx1h10i776vpwqga9qzn00-doitlive-3.0.3/bin
patching script interpreter paths in /nix/store/jqyn5647qjdx1h10i776vpwqga9qzn00-doitlive-3.0.3
checking for references to /build in /nix/store/jqyn5647qjdx1h10i776vpwqga9qzn00-doitlive-3.0.3...
wrapping `/nix/store/jqyn5647qjdx1h10i776vpwqga9qzn00-doitlive-3.0.3/bin/doitlive'...
/nix/store/jqyn5647qjdx1h10i776vpwqga9qzn00-doitlive-3.0.3

@dotlambda dotlambda merged commit 6d661f3 into NixOS:master Mar 14, 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

5 participants