[PATCH] gnu: Add python-asn1crypto.

  • Done
  • quality assurance status badge
Details
3 participants
  • Arun Isaac
  • Leo Famulari
  • Marius Bakke
Owner
unassigned
Submitted by
Leo Famulari
Severity
normal
L
L
Leo Famulari wrote on 23 May 2017 21:42
(address . guix-patches@gnu.org)
112e5a50205629b8d4c5de726c45f6c2f1666699.1495568547.git.leo@famulari.name
* gnu/packages/crypto.scm (python-asn1crypto, python2-asn1crypto): New variables.
---
gnu/packages/crypto.scm | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)

Toggle diff (44 lines)
diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 856308afe..86cd777ef 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -51,7 +51,8 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
- #:use-module (guix build-system gnu))
+ #:use-module (guix build-system gnu)
+ #:use-module (guix build-system python))
(define-public libsodium
(package
@@ -414,3 +415,27 @@ utility as a demonstration of the @code{scrypt} key derivation function.
@code{Scrypt} is designed to be far more resistant against hardware brute-force
attacks than alternative functions such as @code{PBKDF2} or @code{bcrypt}.")
(license license:bsd-2)))
+
+(define-public python-asn1crypto
+ (package
+ (name "python-asn1crypto")
+ (version "0.22.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "asn1crypto" version))
+ (sha256
+ (base32
+ "06pd1bglyisjnjkgc5dc24b498q9r8fmvwkfn0janr9i1mjdvfnb"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f)) ; Tests are not distributed via PyPi.
+ (home-page "https://github.com/wbond/asn1crypto")
+ (synopsis "ASN.1 parser and serializer in Python")
+ (description "Fast ASN.1 parser and serializer with definitions for private
+keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8,
+PKCS#12, PKCS#5, X.509 and TSP.")
+ (license license:expat)))
+
+(define-public python2-asn1crypto
+ (package-with-python2 python-asn1crypto))
--
2.13.0
A
A
Arun Isaac wrote on 24 May 2017 09:54
(name . Leo Famulari)(address . leo@famulari.name)(address . 27043@debbugs.gnu.org)
563924e5.AEEAK7CSRGkAAAAAAAAAAAPEZ0kAAAACwQwAAAAAAAW9WABZJTxG@mailjet.com
Thanks for the patch! :-)

Leo Famulari writes:

Toggle quote (2 lines)
> * gnu/packages/crypto.scm (python-asn1crypto, python2-asn1crypto): New variables.

I think we should put this package in gnu/packages/python.scm. Packages
like python-cryptography are in python.scm.

Toggle quote (9 lines)
> +(define-public python-asn1crypto
> + (package
> + (name "python-asn1crypto")
> + (version "0.22.0")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (pypi-uri "asn1crypto" version))

Release tarballs are availabe on the project's github page. Why not use
those?

Toggle quote (3 lines)
> + (arguments
> + '(#:tests? #f)) ; Tests are not distributed via PyPi.

The github release tarballs have tests. Could you package them?

Toggle quote (6 lines)
> + (synopsis "ASN.1 parser and serializer in Python")
> + (description "Fast ASN.1 parser and serializer with definitions for private
> +keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8,
> +PKCS#12, PKCS#5, X.509 and TSP.")

The description should be in full sentences.
M
M
Marius Bakke wrote on 24 May 2017 18:13
(address . 27043@debbugs.gnu.org)
87shjuw7uh.fsf@fastmail.com
Arun Isaac <arunisaac@systemreboot.net> writes:

Toggle quote (7 lines)
> Leo Famulari writes:
>
>> * gnu/packages/crypto.scm (python-asn1crypto, python2-asn1crypto): New variables.
>
> I think we should put this package in gnu/packages/python.scm. Packages
> like python-cryptography are in python.scm.

I think crypto.scm is fine. "python.scm" is already rather bloated, so
it's good to add new libraries in topic-specific modules.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlklsUYACgkQoqBt8qM6
VPrLEQf8DId/ogHtOEiZf/2e8TNLPHEdF6KBETI1Yi0l5rIfizeysjLwNGzI1hwL
NvPIpJEY7dypUt9B+xBzyKYCdDgfrS+98cxPf9KCqd2KZg2doUJQOFEfRMpzC5Li
VAXFEkVH/yWbCYnn/wVNqk+Kp7LCcwpRMlazsojwHLChGfgFHL7dpGXZ71OzWdJk
oPQoLbA5h4JGOqRpAol4Ev1qK3IrOxd9hPlpJu+3+gax5rfGYat6OQVzo89UEkGn
+XQDC0fMEWsazFCBLzos0XjaaSNA8VT76GWteOKsWfPJ89BTmM24LRbJECJ8cQsD
xvA3dSY75AxjL6mw7vQ6giax+tHE4A==
=qO6S
-----END PGP SIGNATURE-----

L
L
Leo Famulari wrote on 25 May 2017 21:44
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 27043-done@debbugs.gnu.org)
20170525194429.GA977@jasmine
On Wed, May 24, 2017 at 01:24:41PM +0530, Arun Isaac wrote:
Toggle quote (6 lines)
> Leo Famulari writes:
> > * gnu/packages/crypto.scm (python-asn1crypto, python2-asn1crypto): New variables.
>
> I think we should put this package in gnu/packages/python.scm. Packages
> like python-cryptography are in python.scm.

There are performance issues with Guile 2.2, and the huge (gnu packages
python) module is really a pathological case [0]. So, if a new package
makes sense in other modules, I'll be adding them in those other
modules, at least until the compiler performance is improved.


Toggle quote (10 lines)
> > + (uri (pypi-uri "asn1crypto" version))
>
> Release tarballs are availabe on the project's github page. Why not use
> those?
>
> > + (arguments
> > + '(#:tests? #f)) ; Tests are not distributed via PyPi.
>
> The github release tarballs have tests. Could you package them?

Aha! Good catch.

Toggle quote (7 lines)
>
> > + (description "Fast ASN.1 parser and serializer with definitions for private
> > +keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8,
> > +PKCS#12, PKCS#5, X.509 and TSP.")
>
> The description should be in full sentences.

Indeed, fixed!

Thanks for the review!

Pushed as 10e65d5e5adde4e17bae47f0b59b36df264ded39
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlknNB0ACgkQJkb6MLrK
fwgo7BAAtYXGNs98T4EHirD2jSXADesX2Xc2Aml7b3miTohpJ7T6WLc7wwt/6Qpp
vQBy5BKMp1j7yGxo0/jUpPRRGcZ7QzH9Ya5MGckC5FZGttong/RfnYeQfCAS4nox
nnEk0Q5yAObNAPRlaoasV1LMA7YD316zc7oUvdYjO6vWq29jR3XoAAdkz2YoOo38
nd6TZmTcNixE6uxfjFqt/0dfFaDSNcEiaGL6yHvT8re10oXGNaCAlENYSwVKYAHE
7nxPqd/GXoMMrCJY0KSWZ8ssYfvPmMmLXEF68DgTyW9cDYZ0eYRZdiS+9wSRYM4/
90Qgokd9BlLvcw7/M0Lo6gj/sFmacpXktrB4n5WANUKFqz7j065meTArQLydWpe2
KTw9a6xdYoBcWg6bpxFTsr+O5A6AjYKA2GAtNznpl+9mId3oDhG58ZLn+2yz9jIx
fVUqkRBBoMZWuxbRCoHh8sHx1w0I3BnvT8y0llTpWQig6H/azqN9N/ub+xnFfidy
dJhAt+SbE5YzN2mrGYNp9bUF+aHDqgdXdEHUCrU1FYwuJRF78YYw0dYrrhYH8HLn
IqytO2bqX5qWz9aBSP4QQwMOnBTewBCUKUfuZHBHFxfRAcMbxHMa8pIlIgX+CpQf
yPs8Sa+/99/GMGM9/InVkcU759Ey05n/K6V5MPFQ4r4XadagKhs=
=dDv0
-----END PGP SIGNATURE-----


Closed
?