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

pythonPackages.dkimpy: 0.6.2 -> 0.7.1 #34980

Closed
wants to merge 2 commits into from
Closed

Conversation

leenaars
Copy link
Contributor

Motivation for this change

Version bump of dkimpy with new dependency (authres) packaged.

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.

, pytest, dnspython, pynacl, authres }:

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.

no name

@@ -1,20 +1,20 @@
{ stdenv, fetchurl, openssl, makeWrapper, buildPythonApplication
, pytest, dnspython }:
, pytest, dnspython, pynacl, authres, python }:

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.

Please get rid of name. It is not needed any more.

for f in $out/bin/*; do
wrapProgram $f --prefix PYTHONPATH ":" $out/${python.sitePackages}/
done
popd
Copy link
Member

Choose a reason for hiding this comment

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

Why were these executables renamed in the first place? Is this done in other distributions too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dotlambda: The man pages refer to dkimverify etc, so that is the rationale...

Authenticated Recieved Chain (ARC) (draft-ietf-dmarc-arc-protocol-08)
'';
homepage = https://launchpad.net/authentication-results-python;
license = licenses.apl2;
Copy link
Member

Choose a reason for hiding this comment

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

licenses.asl20

@leenaars
Copy link
Contributor Author

All comments processed.

sha256 = "1crdff9wa4cma6p4a6ldiffa6c3awxafnv4d207h6z6msc3jb868";
};

buildInputs = [ pytest ];
Copy link
Member

Choose a reason for hiding this comment

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

checkInputs?

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 had not come across that, but that is completely logical.

url = "https://launchpad.net/${pname}/${majorversion}/${majorversion}.${minorversion}/+download/${name}.tar.gz";
sha256 = "1hagz8qk0v4ijfbcdq4z28bpgr2mkpr498z76i1vam2d50chmakl";
url = "https://launchpad.net/${pname}/${majorversion}/${majorversion}.${minorversion}/+download/${pname}-${version}.tar.gz";
sha256 = "13ds5f4vvaq63hnrglficqjpgcfxhzpcbkxhj7gbp51qilh8gqqh";
};

buildInputs = [ pytest ];
Copy link
Member

Choose a reason for hiding this comment

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

checkInputs?

@leenaars leenaars force-pushed the dkimpy-0.7 branch 2 times, most recently from 4548bb8 to 58cf8e2 Compare February 17, 2018 11:30
buildPythonApplication rec {
pname = "authres";
majorversion = "1.0";
minorversion = "1";
Copy link
Member

Choose a reason for hiding this comment

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

these two are not parameters of buildPythonApplication and thus best moved into a let ... in expression.

majorversion = "0.6";
minorversion = "2";
majorversion = "0.7";
minorversion = "0";
Copy link
Member

Choose a reason for hiding this comment

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

same here

@leenaars
Copy link
Contributor Author

Moved version numbers to let statements for both packages.

let
majorversion = "0.7";
minorversion = "0";
in

buildPythonApplication rec {
Copy link
Member

Choose a reason for hiding this comment

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

Could you please change this to buildPythonPackage

minorversion = "1";
in

buildPythonApplication rec {
Copy link
Member

Choose a reason for hiding this comment

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

buildPythonPackage

pname = "authres";
version = "${majorversion}.${minorversion}";

src = fetchurl {
Copy link
Member

Choose a reason for hiding this comment

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

Please use fetchPypi if possible


let
majorversion = "1.0";
minorversion = "1";
Copy link
Member

Choose a reason for hiding this comment

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

1.0.2 has been released: https://pypi.org/project/authres/

pname = "dkimpy";
majorversion = "0.6";
minorversion = "2";
version = "${majorversion}.${minorversion}";

src = fetchurl {
Copy link
Member

Choose a reason for hiding this comment

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

fetchPypi if possible

@dotlambda
Copy link
Member

@leenaars Any progress?

@leenaars leenaars changed the title pythonPackages.dkimpy: 0.6.2 -> 0.7.0 pythonPackages.dkimpy: 0.6.2 -> 0.7.1 Mar 19, 2018
@leenaars
Copy link
Contributor Author

@dotlambda: I upgraded both packages to current version (very rapid pace) and made the rest of the modifications.

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

Please replace python test.py by ${python.interpreter} test.py.

mv dkimverify.py dkimverify
mv dknewkey.py dknewkey
for f in $out/bin/*; do
wrapProgram $f --prefix PYTHONPATH ":" $out/${python.sitePackages}/
Copy link
Member

Choose a reason for hiding this comment

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

Is this wrapping necessary? The binaries should be wrapped by default.

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 removed it.

sha256 = "1mcllhrwr23hwa2jn3m15k29ks1205ymwafjzchh8ma664hnzv6v";
};

checkInputs = [ pytest ];
Copy link
Member

Choose a reason for hiding this comment

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

Ran 0 tests in 0.000s

You might need to specify an appropriate checkPhase.

Copy link
Member

Choose a reason for hiding this comment

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

@leenaars It should be

checkInputs = [ ];
checkPhase = ''
  # run doctests
  python -m authres
'';

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, but the checks are WIP. I cannot see how they should currently work. I suggest leaving as is.

Copy link
Member

Choose a reason for hiding this comment

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

Well, they work if you use what I wrote above.

@leenaars
Copy link
Contributor Author

@dotlambda: All your suggestions processed. Anything else?

RFC 7293 The Require-Recipient-Valid-Since Header Field
RFC 7489 Domain-based Message Authentication, Reporting, and Conformance (DMARC)
Authenticated Recieved Chain (ARC) (draft-ietf-dmarc-arc-protocol-08)
'';
Copy link
Member

Choose a reason for hiding this comment

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

indentation

@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.dkimpy python3.pkgs.dkimpy

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: python2.pkgs.dkimpy, python3.pkgs.dkimpy

Partial log (click to expand)

installing
/tmp/nix-build-python3.6-dkimpy-0.7.1.drv-0/dkimpy-0.7.1/dist /tmp/nix-build-python3.6-dkimpy-0.7.1.drv-0/dkimpy-0.7.1
Processing ./dkimpy-0.7.1-py3-none-any.whl
Installing collected packages: dkimpy
Successfully installed dkimpy-0.7.1
/tmp/nix-build-python3.6-dkimpy-0.7.1.drv-0/dkimpy-0.7.1
rm: missing operand
Try 'rm --help' for more information.
builder for ‘/nix/store/ps51wdk4z0sc8r6b16jkxya00jfll9g6-python3.6-dkimpy-0.7.1.drv’ failed with exit code 1
error: build of ‘/nix/store/ps51wdk4z0sc8r6b16jkxya00jfll9g6-python3.6-dkimpy-0.7.1.drv’ failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: python2.pkgs.dkimpy, python3.pkgs.dkimpy

Partial log (click to expand)

installing
/build/dkimpy-0.7.1/dist /build/dkimpy-0.7.1
Processing ./dkimpy-0.7.1-py3-none-any.whl
Installing collected packages: dkimpy
Successfully installed dkimpy-0.7.1
/build/dkimpy-0.7.1
rm: missing operand
Try 'rm --help' for more information.
builder for '/nix/store/rgvss9zla4rcnn2fnhqvnvks107af778-python3.6-dkimpy-0.7.1.drv' failed with exit code 1
�[31;1merror:�[0m build of '/nix/store/rgvss9zla4rcnn2fnhqvnvks107af778-python3.6-dkimpy-0.7.1.drv' failed

@dotlambda
Copy link
Member

Closing in favor of #43219.

@dotlambda dotlambda closed this Jul 8, 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

4 participants