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.voltron: init at 0.1.7 #21398
Conversation
@psychomario, thanks for your PR! By analyzing the history of the files in this pull request, we identified @FRidh to be a potential reviewer. |
Hi @psychomario. This looks good.
Nowadays all Python interpreters in Nixpkgs come with
Good! Did you also check whether the tests are actually run? After building and "installing" a test runner is automatically run. The default runner doesn't always detect tests, and if that's the case the |
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.
Could you also add yourself as maintainer of these packages?
version = "0.3.7"; | ||
format = "wheel"; | ||
src = pkgs.fetchurl { | ||
url = "https://pypi.python.org/packages/6c/73/18d180df19d55e8803731ad638513038906914063bd9bde8eea3cfa1ece5/${name}-py2.py3-none-any.whl"; |
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 url's like
url = "mirror://pypi/a/${pname}/${name}.tar.gz";
or, even better,
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
The one you use now consists of a big hash which changes with every version requiring updating the url.
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 two libraries I've not done this for only offer .whl
files on pypi, and I couldn't find any examples of the hashless url, do you know the correct format for this?
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're right, then its fine!
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.
While its possible to install wheels, the original source is still preferred. I've looked at the two packages, and they have repo's on GitHub and use setuptools.
Then I have one more request (we don't have a guideline on this matter yet). Please put each expression in a |
Hi @FRidh, thanks for the feedback. I'll make these changes when I can, but it will likely be tomorrow as today is Christmas day. |
meta = { | ||
description = "Use requests to talk HTTP via a UNIX domain socket"; | ||
homepage = "https://github.com/msabramo/requests-unixsocket"; | ||
license = licenses.apache; |
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.
licenses.asl20
Test statusI will fill this out as I verify each package.
++ fails |
I've noticed some inconsistencies in the way Which is the preferred method which I should apply to |
For Python packages the preferred name is the one used by upstream, which we consider PyPI, and if the package is not on PyPI then its the name given by the author. |
For those two examples, PyPI has the
|
Correct. The general guidelines for Nixpkgs are different. |
Ok so I think I've implemented all of your feedback, and I've rebuilt with Python27 and Python3{3,4,5,6} to verify nothing has broken. A few of the packages have broken tests so the testing has been disabled, I'm not sure if this is Ok or not. I've opened an issue against |
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.
Some of my comments apply to all expressions.
license = licenses.bsd3; | ||
platforms = platforms.linux; | ||
}; | ||
propagatedBuildInputs = [ flask pytz six aniso8601 itsdangerous click jinja2 werkzeug dateutil nose ]; |
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.
does it have a runtime dependency on nose
? That's unlikely.
@@ -0,0 +1,23 @@ | |||
{ | |||
stdenv, pkgs, python, wrapPython, 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.
just pass lib
instead of stdenv
. Furthermore, never pass the whole package set pkgs
, instead pass individual applications/libraries, like in this case fetchurl
. wrapPython
is not used so you don't need to pass it, and neither should you pass python
.
meta = with stdenv.lib; { | ||
description = "Simple framework for creating REST APIs"; | ||
homepage = "https://github.com/flask-restful/flask-restful/"; | ||
license = 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.
lib.licenses.bsd3
(or stdenv.lib.licenses.bsd3
should you choose to keep stdenv
in)
description = "Simple framework for creating REST APIs"; | ||
homepage = "https://github.com/flask-restful/flask-restful/"; | ||
license = licenses.bsd3; | ||
platforms = platforms.linux; |
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.
lib.platforms.linux
url = "mirror://pypi/b/${pname}/${name}.tar.gz"; | ||
sha256 = "0wy0na399swybp5bzys31pn57vg34bjsl0kv5zf496996gc8k8jq"; | ||
}; | ||
doCheck = false; |
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.
Don't just disable tests. Always include a comment explaining why they're disabled.
license = licenses.mit; | ||
platforms = platforms.linux; | ||
}; | ||
propagatedBuildInputs = [ pyyaml six nose ]; |
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.
nose as runtime dependency (read: install_requires)? Or only for tests?
# $HOME is by default not a valid dir, so we have to set that too | ||
# https://github.com/NixOS/nixpkgs/issues/12591 | ||
# taken from the voltron .travis.yml | ||
checkPhase = '' |
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.
postPatch = ''
ping |
Sorry, I forgot about this and I don't currently have the time to fix and support this. I'm sorry for wasting your time. |
This is almost there. I'd like to try and package this soon. |
Motivation for this change
Add the voltron package and required dependencies:
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)Note that for testing purposes I had to recompile my gdb to use the full version of python27 due to the curses library not being there. This is likely due to my own stupidity.
Python27, Python3{3,4,5,6} all compile, fully tested with Python27.
Apologies if I've done this completely wrong, I'm very new to this packaging format.