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
bitmath: init at 1.3.1.2 #37462
bitmath: init at 1.3.1.2 #37462
Conversation
11fcde1
to
338453a
Compare
buildPythonPackage rec { | ||
pname = "bitmath"; | ||
version = "1.3.1.2"; | ||
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.
The name
attribute is added by buildPython*
and should therefore be removed.
|
||
meta = with stdenv.lib; { | ||
description = '' | ||
module for representing and manipulating file sizes with different prefix |
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.
Start with a capital letter. The part within parentheses can be dropped.
}; | ||
|
||
doCheck = ! isPy36; # progressbar is incompatible with Py3? | ||
buildInputs = if doCheck then [ progressbar mock ] else [ ]; |
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.
checkInputs
''; | ||
homepage = "https://github.com/tbielawa/bitmath"; | ||
license = licenses.mit; | ||
platforms = platforms.all; |
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.
should be dropped
Thanks! |
Is this okay? |
No, obviously not: |
Failure on x86_64-linux (full log) Attempted: python3.pkgs.progressbar Partial log (click to expand)
|
Failure on aarch64-linux (full log) Attempted: python3.pkgs.progressbar Partial log (click to expand)
|
Seems like it should be disabled for Python 3. |
But their |
It might just not support Python 3.6 — the last commit was a couple of years ago. |
Apparently it's a known problem. There's a fork with Python 3 support, but it doesn't seem to be on PyPI. There's also I've just disabled |
Sorry I forgot about this one. |
sha256 = "1k8d1wmxqjc8cqzaixpxf45k6dl1kqhblr0g4wyjl0qa18q8wasd"; | ||
}; | ||
|
||
doCheck = ! isPy36; # progressbar is incompatible with Py3? |
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.
Not necessary because progressbar is now disabled on python3.
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.
I believe it's still necessary, because this package's tests expect progressbar, so if it's disabled on Py3 the tests will fail.
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.
It won't even be built on Python 3, so no tests will be run. Just rebase on staging and you'll see what I mean.
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.
In fact it doesn't even get to failing the tests — it will try to load progressbar
for checkInputs
and immediately fail.
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.
That's what I meant with "it won't be built". Please just remove that doCheck = false
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.
I see. Looking at https://github.com/tbielawa/bitmath/blob/master/requirements.txt and https://github.com/tbielawa/bitmath/blob/master/requirements-py3.txt, it seems like progressbar231
is required for Python 2 and progressbar33
for Python 3. At least the latter should be packaged so that tests can be enabled for Python 3.
Btw, please use isPy3k
instead of isPy36
.
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.
I must admit, I'm a bit confused about the difference between progressbar
, progressbar231
, and progressbar33
. They seem to be just different versions of the same package? Their description text is exactly the same. Is this a Python convention I'm unaware of?
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.
It's because progressbar
has been abandoned by its maintainer. Other people created newer versions, which diverged from each other.
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.
Well, I've packaged them up anyway. bitmath
now tests with 3.6; thanks for the pointer!
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.
Thanks a lot!
description = '' | ||
Module for representing and manipulating file sizes with different prefix | ||
notations | ||
''; |
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 "
and a single 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.
The line is 94 characters long if I stuff it all onto a single line; is that okay?
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.
It's okay for me. I don't think there's a general limit of 80 characters for nixpkgs.
Module for representing and manipulating file sizes with different prefix | ||
notations | ||
''; | ||
homepage = "https://github.com/tbielawa/bitmath"; |
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
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.
Fixed.
79e1db8
to
f69d09b
Compare
@GrahamcOfBorg build python2.pkgs.progressbar231 python2.pkgs.progressbar33 python3.pkgs.progressbar33 python2.pkgs.bitmath python3.pkgs.bitmath |
Success on x86_64-linux (full log) Attempted: python2.pkgs.progressbar231, python2.pkgs.progressbar33, python3.pkgs.progressbar33, python2.pkgs.bitmath, python3.pkgs.bitmath Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: python2.pkgs.progressbar231, python2.pkgs.progressbar33, python3.pkgs.progressbar33, python2.pkgs.bitmath, python3.pkgs.bitmath Partial log (click to expand)
|
inherit pname version; | ||
sha256 = "0j0ifxk87xz3wkyacxaiqygghn27wwz6y5pj9k8j2yq7n33fbdam"; | ||
}; | ||
|
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 tests implemented
doCheck = false;
inherit pname version; | ||
sha256 = "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"; | ||
}; | ||
|
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 tests implemented
doCheck = false;
pkgs/top-level/python-packages.nix
Outdated
@@ -11480,6 +11482,9 @@ in { | |||
|
|||
progressbar2 = callPackage ../development/python-modules/progressbar2 { }; | |||
|
|||
progressbar231 = callPackage ../development/python-modules/progressbar231 { }; | |||
progressbar33 = callPackage ../development/python-modules/progressbar33 { }; |
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 add an empty line.
Done! |
Thanks a lot! |
Motivation for this change
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)