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
django-simple-captcha: init at 0.5.6 #64523
Conversation
5320c61
to
5fa2b44
Compare
If you're adding a bunch of inter-related packages, it's probably a better idea to combine them all into a single PR. |
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.
Hi,
Thanks for the PR
As already mentioned, you should include the commits of other PRs you depend on here.
Finally, I think the commit message should be pythonPackages.django-simple-captcha: init at 0.5.6
instead of django-simple-captcha: init at 0.5.6
(it is easier to follow git log that way)
|
||
buildPythonPackage rec { | ||
pname = "django-simple-captcha"; | ||
version = "0.5.6"; |
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.
There is a 0.5.11
version available, why not upgrade to it now (https://pypi.org/project/django-simple-captcha/)?
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.
Sure, I'll change it. The latest version doesn't work with some of the older django versions though. What is your policy on packaging multiple different versions (like in django's case)? Can I package both 0.5.6
and 0.5.11
, making 0.5.11
the default one?
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, please see pg8000
and pg8000_1_12
as an example.
pname = "django-simple-captcha"; | ||
version = "0.5.6"; | ||
|
||
src = fetchurl { |
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.
Since the package is available on pypi, I think fetchPypi
should be prefered.
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 tried PyPi, but there's no .tar.gz
file available for 0.5.6
and I wasn't able to build from the .whl
yet :(
sha256 = "02sbbsjlxa445hdfpxj4wmy1ynfj1vj0xblqhs7r05a2pbl3dzfn"; | ||
}; | ||
|
||
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.
Could you add an explanation why the tests are disabled?
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.
There's no much to explain, I just wasn't able to run them :)
Updated the code as per this suggestion
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.
We should try to make them work, what was the problem?
sha256 = "02sbbsjlxa445hdfpxj4wmy1ynfj1vj0xblqhs7r05a2pbl3dzfn"; | ||
}; | ||
|
||
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.
checkInputs = [ testfixtures ];
checkPhase = ''
cd testproject
${python.interpreter} manage.py test captcha
'';
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.
oh, thanks!
|
||
doCheck = false; | ||
|
||
buildInputs = [ mock ]; |
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.
Again, I can't see a need for this, and in fact having it obscures the fact that django-simple-captcha
actually depends on six
, which it's only seeing incidentally as it's brought in by this mock
dependency - but of course it isn't propagated
so it won't get picked up as a proper dependency of the nix package.
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 for the explanation!
doCheck = false; | ||
|
||
buildInputs = [ mock ]; | ||
propagatedBuildInputs = [ django django-ranged-response pillow ]; |
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.
Needs six
too.
5fa2b44
to
4f61537
Compare
attached the |
Don't try and build from wheel packages - I don't think it's possible. If there's a version you can't find a tarball for, try and get it using |
4f61537
to
f35088f
Compare
done! |
@GrahamcOfBorg eval |
@MrMebelMan Any news on this? I need django-simple-captcha myself and started packaging it, but you seem to already have made more progress than I did. |
@MrMebelMan Did you ever manage to get the tests to pass? For me they don't. The trick for fetching the sources from PyPI is specifiying a custom extension as for whatever reason the sources are only available as zip. I took the liberty to adapt your nix expression at schmittlauch@708d6be . |
Sorry, @schmittlauch, I don't think my Nix-fu is good enough to fix it :( Btw, your tests seem to pass!
|
I created a superseding PR for this as #76515 |
Merged in #76515. |
Motivation for this change
Adding a missing Django package. It depends on django-ranged-response.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)