-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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.uproot: init at 2.8.23. #39120
Conversation
@@ -1976,6 +1976,11 @@ | |||
github = "kristoff3r"; | |||
name = "Kristoffer Søholm"; | |||
}; | |||
ktf = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
separate commit
{lib, fetchFromGitHub, buildPythonPackage, numpy }: | ||
|
||
buildPythonPackage rec { | ||
name = "uproot-${version}"; |
There was a problem hiding this comment.
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*
when pname
is added, and should therefore be removed.
|
||
meta = with lib; { | ||
homepage = "https://github.com/scikit-hep/uproot"; | ||
description = "ROOT I/O in pure Python and Numpy."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no dot at the end
@GrahamcOfBorg build python3.pkgs.uproot |
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: python3.pkgs.uproot Partial log (click to expand)
|
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: python3.pkgs.uproot Partial log (click to expand)
|
I think I've addressed all the comments. Can you please check again? |
The expression needs to be called from |
done. This is my first real contribution, sorry for being sloppy... |
@GrahamcOfBorg build python3.pkgs.uproot |
Success on aarch64-linux (full log) Attempted: python3.pkgs.uproot Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: python3.pkgs.uproot Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: python3.pkgs.uproot Partial log (click to expand)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you intentionally not include the dependencies listed here?
sha256 = "07f6h7zcvjc4ynqydp12cbq8c6bb8964s1i65cc25py4mg46f4my"; | ||
}; | ||
|
||
# Why does it propagate packages that are used for testing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
numpy is listed in install_requires, you're sure it isn't a runtime dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't do anything sensible in uproot without Numpy. It's an absolute requirement. I hope the setup.py reflects that.
Many of the other libraries that uproot might use are optional, particularly compression codecs that aren't found in all ROOT files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, setup.py reflects this. But the comment
Why does it propagate packages that are used for testing?
doesn't make sense in that case.
buildPythonPackage rec { | ||
pname = "uproot"; | ||
version = "2.8.16"; | ||
src = fetchFromGitHub { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use fetchPypi
instead: https://pypi.org/project/uproot/. This allows easier automatic updating.
doCheck = false; | ||
|
||
meta = with lib; { | ||
homepage = "https://github.com/scikit-hep/uproot"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no quotes
numpy | ||
]; | ||
|
||
#Checks are failing due to missing TTY, which won't exist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests run just fine for me. Can you please check again?
I've done the requested changes. @dotlambda I've tried adding
and I of course added |
If it's Python 3, there might not be an lzma package because that's in the standard library now. |
@jpivarski in my test it's |
buildPythonPackage rec { | ||
pname = "uproot"; | ||
version = "2.8.18"; | ||
name = "${pname}-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean the name
one? If I do I get an error. Am I using a too old version of buildPythonPackage
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buildPython*
has been setting name
automatically for quite some time. Which error are you getting?
By looking at the code, e.g. https://github.com/scikit-hep/uproot/blob/47b981e6ce0b5913a763d379eae1c0337a898a01/tests/test_compression.py#L34-L41, it should just work when adding the lz4 (and lzma in the case of python 2) python packages to |
meta = with lib; { | ||
homepage = https://github.com/scikit-hep/uproot; | ||
description = "ROOT I/O in pure Python and Numpy"; | ||
license = with licenses; [ bsd3 ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just licenses.bsd3
I think I've addressed the comments. lz4 / lzma does not work (I get an import error) but that could be something to followup upstream and I'd rather add in a subsequent PR. |
@ktf Now what's left to do is naming your second commit (and your PR) @GrahamcOfBorg build python2.pkgs.uproot python3.pkgs.uproot |
Success on x86_64-linux (full log) Attempted: python2.pkgs.uproot, python3.pkgs.uproot Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: python2.pkgs.uproot, python3.pkgs.uproot Partial log (click to expand)
|
@dotlambda done. |
Thanks a lot! |
Motivation for this change
Package uproot is missing from the distribution.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)