[PATCH 00/10] Add Python packages for Sourcehut

  • Open
  • quality assurance status badge
Details
One participant
  • Alexandru-Sergiu Marton
Owner
unassigned
Submitted by
Alexandru-Sergiu Marton
Severity
normal
A
A
Alexandru-Sergiu Marton wrote on 9 Jul 2020 21:14
(address . guix-patches@gnu.org)(name . Alexandru-Sergiu Marton)(address . brown121407@posteo.ro)
cover.1594321515.git.brown121407@posteo.ro
Hi,

This patch series adds some Python packages that I could see we were
missing to be able to package Sourcehut. (We're missing some go packages
too, but that's another story.)

Some packages (python-minio, python-hglib, python-sshpubkeys,
python-atpublic, python-aiosmtpd) have failing tests, and I'm not
knowledgeable enough to debug those. Any help would be appreciated. For
the time being, I disabled tests for those packages.

Alexandru-Sergiu Marton (10):
gnu: Add hg-evolve.
gnu: Add python-pgpy.
gnu: Add python-minio.
gnu: Add python-hglib.
gnu: Add python-unidiff.
gnu: Add python-emailthreads.
gnu: Add python-zxcvbn.
gnu: Add python-sshpubkeys.
gnu: Add python-atpublic.
gnu: Add python-aiosmtpd.

gnu/packages/python-crypto.scm | 25 ++++
gnu/packages/python-xyz.scm | 230 +++++++++++++++++++++++++++++++
gnu/packages/version-control.scm | 35 +++++
3 files changed, 290 insertions(+)

--
2.27.0
A
A
Alexandru-Sergiu Marton wrote on 9 Jul 2020 21:19
[PATCH 01/10] gnu: Add hg-evolve.
(address . 42297@debbugs.gnu.org)(name . Alexandru-Sergiu Marton)(address . brown121407@posteo.ro)
395cba14f2d2998dc300c547c884eddda2e39598.1594321515.git.brown121407@posteo.ro
* gnu/packages/version-control.scm (hg-evolve): New variable.
---
gnu/packages/version-control.scm | 35 ++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 5151e63ee1..1f37623ee2 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2517,3 +2517,38 @@ package is provided for users who need to recover @code{tla} repositories and
for historians.")
(home-page "https://www.gnu.org/software/gnu-arch/")
(license license:gpl2))) ;version 2 only
+
+(define-public hg-evolve
+ (package
+ (name "hg-evolve")
+ (version "10.0.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "hg-evolve" version))
+ (sha256
+ (base32
+ "03kn1c62y6rb851wjhsaxkrwq223hkc4ij59i85999byyb2hyqad"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("mercurial" ,mercurial)))
+ (home-page
+ "https://www.mercurial-scm.org/doc/evolution/")
+ (synopsis
+ "Flexible evolution of Mercurial history")
+ (description
+ "This Mercurial provides faster and safer mutable history. It
+implements the changeset evolution concept for Mercurial.
+
+@enumerate
+@item It offers a safe and simple way to refine changesets locally and
+propagate those changes to other repositories.
+@item It can automatically detect and handle the complex issues that can
+arise from exchanging draft changesets.
+@item It even makes it possible for multiple developers to safely rewrite
+the same parts of history in a distributed way.
+@item It fully respects the Phases concept so users will only be able to
+rewrite parts of the history that are safe to change. Phases have been
+part of Mercurial since early 2012.
+@end enumerate\n")
+ (license license:gpl2+)))
--
2.27.0
A
A
Alexandru-Sergiu Marton wrote on 9 Jul 2020 21:19
[PATCH 02/10] gnu: Add python-pgpy.
(address . 42297@debbugs.gnu.org)(name . Alexandru-Sergiu Marton)(address . brown121407@posteo.ro)
874f8136b19b7f04b0790a1e795beaef876de0a0.1594321515.git.brown121407@posteo.ro
* gnu/packages/python-crypto.scm (python-pgpy): New variable.
---
gnu/packages/python-crypto.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index 5c9c251c01..f91e1e0999 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -1429,3 +1429,28 @@ can decide how long it takes to hash a password and how much memory is required.
data such as API keys, cryptocurrency wallets, or seeds for digital
signatures.")
(license (list license:expat license:asl2.0)))) ; dual licensed
+
+(define-public python-pgpy
+ (package
+ (name "python-pgpy")
+ (version "0.5.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "PGPy" version))
+ (sha256
+ (base32
+ "0i4lqhzdwkjkim3wab0kqadx28z3r5ixlh6qxj4lif4gif56c0m7"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-cryptography" ,python-cryptography)
+ ("python-pyasn1" ,python-pyasn1)
+ ("python-six" ,python-six)))
+ (home-page
+ "https://github.com/SecurityInnovation/PGPy")
+ (synopsis "Pretty Good Privacy for Python")
+ (description
+ "PGPy is a Python (2 and 3) library for implementing Pretty Good
+Privacy into Python programs, conforming to the OpenPGP specification
+per RFC 4880.")
+ (license license:bsd-3)))
--
2.27.0
A
A
Alexandru-Sergiu Marton wrote on 9 Jul 2020 21:19
[PATCH 03/10] gnu: Add python-minio.
(address . 42297@debbugs.gnu.org)(name . Alexandru-Sergiu Marton)(address . brown121407@posteo.ro)
a6cca7e3d3ecc2785c08092383108dab715febfb.1594321515.git.brown121407@posteo.ro
* gnu/packages/python-xyz.scm (python-minio): New variable.
---
gnu/packages/python-xyz.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (43 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 98db6d9e51..5ce34cd738 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20472,3 +20472,36 @@ For the most part it's transliterated from C, the major differences are:
@end itemize
")
(license license:gpl3+)))
+
+(define-public python-minio
+ (package
+ (name "python-minio")
+ (version "5.0.10")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "minio" version))
+ (sha256
+ (base32
+ "05xl6ifzyvy8nnigv6267my8v9crlp7yl4nix4rng02zlcvpdjvf"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f)) ;; FIXME 4 tests fail
+ (propagated-inputs
+ `(("python-certifi" ,python-certifi)
+ ("python-configparser" ,python-configparser)
+ ("python-dateutil" ,python-dateutil)
+ ("python-future" ,python-future)
+ ("python-pytz" ,python-pytz)
+ ("python-urllib3" ,python-urllib3)))
+ (native-inputs
+ `(("python-nose" ,python-nose)
+ ("python-mock" ,python-mock)
+ ("python-faker" ,python-faker)))
+ (home-page "https://github.com/minio/minio-py")
+ (synopsis
+ "MinIO Python Library for Amazon S3 Compatible Cloud Storage for Python")
+ (description
+ "The MinIO Python Client SDK provides simple APIs to access any Amazon S3
+compatible object storage server.")
+ (license license:asl2.0)))
--
2.27.0
A
A
Alexandru-Sergiu Marton wrote on 9 Jul 2020 21:19
[PATCH 04/10] gnu: Add python-hglib.
(address . 42297@debbugs.gnu.org)(name . Alexandru-Sergiu Marton)(address . brown121407@posteo.ro)
4345d5a5b07443a5bb91d656537096ba1ecd615f.1594321515.git.brown121407@posteo.ro
* gnu/packages/python-xyz.scm (python-hglib): New variable.
---
gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5ce34cd738..c97f2bf331 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20505,3 +20505,29 @@ For the most part it's transliterated from C, the major differences are:
"The MinIO Python Client SDK provides simple APIs to access any Amazon S3
compatible object storage server.")
(license license:asl2.0)))
+
+(define-public python-hglib
+ (package
+ (name "python-hglib")
+ (version "2.6.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "python-hglib" version))
+ (sha256
+ (base32
+ "1cm3din9j2xbgipnay5kgzlj6imsrs3lgc09hkndcb9k9p5s07vw"))))
+ (build-system python-build-system)
+ (arguments
+ ;; FIXME: Fails a lot of tests
+ `(#:tests? #f))
+ (propagated-inputs
+ `(("mercurial" ,mercurial)))
+ (native-inputs
+ `(("python-nose" ,python-nose)))
+ (home-page
+ "https://www.mercurial-scm.org/wiki/PythonHglib")
+ (synopsis "Mercurial Python library")
+ (description "A Python library for interfacing with Mercurial's
+CommandServer.")
+ (license license:expat)))
--
2.27.0
A
A
Alexandru-Sergiu Marton wrote on 9 Jul 2020 21:19
[PATCH 05/10] gnu: Add python-unidiff.
(address . 42297@debbugs.gnu.org)(name . Alexandru-Sergiu Marton)(address . brown121407@posteo.ro)
b79c0646dada06251f0e2202dcbd7e665658306d.1594321515.git.brown121407@posteo.ro
* gnu/packages/python-xyz.scm (python-unidiff): New variable.
---
gnu/packages/python-xyz.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (31 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c97f2bf331..20abc1a9d3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20531,3 +20531,24 @@ compatible object storage server.")
(description "A Python library for interfacing with Mercurial's
CommandServer.")
(license license:expat)))
+
+(define-public python-unidiff
+ (package
+ (name "python-unidiff")
+ (version "0.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "unidiff" version))
+ (sha256
+ (base32
+ "07wqva9lxsh5jhnp6ajr00z8wqq6fzkr37g1zsrg8zrmk9723ich"))))
+ (build-system python-build-system)
+ (home-page
+ "https://github.com/matiasb/python-unidiff")
+ (synopsis
+ "Unified diff parsing/metadata extraction library")
+ (description
+ "Unidiff is a simple Python library to parse and interact with unified
+diff data.")
+ (license license:expat)))
--
2.27.0
A
A
Alexandru-Sergiu Marton wrote on 9 Jul 2020 21:19
[PATCH 06/10] gnu: Add python-emailthreads.
(address . 42297@debbugs.gnu.org)(name . Alexandru-Sergiu Marton)(address . brown121407@posteo.ro)
cd51e808502c3b5db57f7ebc62627c6b44583830.1594321515.git.brown121407@posteo.ro
* gnu/packages/python-xyz.scm (python-emailthreads): New variable.
---
gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 20abc1a9d3..b3dddc57c1 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20552,3 +20552,33 @@ CommandServer.")
"Unidiff is a simple Python library to parse and interact with unified
diff data.")
(license license:expat)))
+
+(define-public python-emailthreads
+ (package
+ (name "python-emailthreads")
+ (version "v0.1.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "emailthreads" version))
+ (sha256
+ (base32
+ "128by819l2awvs3gvlcs75s0k8lfl8420s9khjh8bfk8p780rlfm"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:modules ((guix build utils)
+ (guix build python-build-system))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'prepare-for-tests
+ (lambda _
+ (setenv "PKGVER" (version)))))))
+ (home-page
+ "https://github.com/emersion/python-emailthreads")
+ (synopsis
+ "Parses email threads into conversation trees")
+ (description
+ "Python library to parse and format email threads. Give it a list
+of emails that are part of the same thread and it'll build a tree of
+responses to the original message.")
+ (license license:expat)))
--
2.27.0
A
A
Alexandru-Sergiu Marton wrote on 9 Jul 2020 21:19
[PATCH 07/10] gnu: Add python-zxcvbn.
(address . 42297@debbugs.gnu.org)(name . Alexandru-Sergiu Marton)(address . brown121407@posteo.ro)
cb4f1e26de9d22dcc75505d9439a20b9d80d1e07.1594321515.git.brown121407@posteo.ro
* gnu/packages/python-xyz.scm (python-zxcvbn): New variable.
---
gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b3dddc57c1..e6a11182a1 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20582,3 +20582,33 @@ diff data.")
of emails that are part of the same thread and it'll build a tree of
responses to the original message.")
(license license:expat)))
+
+(define-public python-zxcvbn
+ (package
+ (name "python-zxcvbn")
+ (version "4.4.28")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "zxcvbn" version))
+ (sha256
+ (base32
+ "1hbxxxsylwv8zghkpji06gm3flgq8hsv2m63cj85wr3yh4bdh6qm"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (home-page
+ "https://github.com/dwolfhub/zxcvbn-python")
+ (synopsis "Realistic password strenght estimator")
+ (description
+ "Zxcvbn is realistic password strength estimator. Some of its
+features are:
+@enumerate
+@item Accepts user data to be added to the dictionaries that are tested
+ against (name, birthdate, etc)
+@item Gives a score to the password, from 0 (terrible) to 4 (great)
+@item Provides feedback on the password and ways to improve it
+@item Returns time estimates on how long it would take to guess the
+ password in different situations
+@end enumerate\n")
+ (license license:expat)))
--
2.27.0
A
A
Alexandru-Sergiu Marton wrote on 9 Jul 2020 21:19
[PATCH 08/10] gnu: Add python-sshpubkeys.
(address . 42297@debbugs.gnu.org)(name . Alexandru-Sergiu Marton)(address . brown121407@posteo.ro)
b38009d5fdfac6539a97ee68be145116fd91da1c.1594321515.git.brown121407@posteo.ro
* gnu/packages/python-xyz.scm (python-sshpubkeys): New variable.
---
gnu/packages/python-xyz.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e6a11182a1..4caf29169b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20612,3 +20612,35 @@ features are:
password in different situations
@end enumerate\n")
(license license:expat)))
+
+(define-public python-sshpubkeys
+ (package
+ (name "python-sshpubkeys")
+ (version "3.1.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "sshpubkeys" version))
+ (sha256
+ (base32
+ "105g2li04nm1hb15a2y6hm9m9k7fbrkd5l3gy12w3kgcmsf3k25k"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (delete 'check))))
+ (propagated-inputs
+ `(("python-cryptography" ,python-cryptography)
+ ("python-ecdsa" ,python-ecdsa)))
+ (native-inputs
+ `(("python-twine" ,python-twine)
+ ("python-wheel" ,python-wheel)))
+ (home-page
+ "https://github.com/ojarva/python-sshpubkeys")
+ (synopsis "SSH public key parser")
+ (description
+ "Native implementation for validating OpenSSH public keys.
+
+Currently ssh-rsa, ssh-dss (DSA), ssh-ed25519 and ecdsa keys with NIST
+curves are supported.")
+ (license license:bsd-3)))
--
2.27.0
A
A
Alexandru-Sergiu Marton wrote on 9 Jul 2020 21:19
[PATCH 09/10] gnu: Add python-atpublic.
(address . 42297@debbugs.gnu.org)(name . Alexandru-Sergiu Marton)(address . brown121407@posteo.ro)
aa6bc572e9f612cc0b948d5f276eb8cce951d3fe.1594321515.git.brown121407@posteo.ro
* gnu/packages/python-xyz.scm (python-atpublic): New variable.
---
gnu/packages/python-xyz.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4caf29169b..d8270edca1 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20644,3 +20644,26 @@ features are:
Currently ssh-rsa, ssh-dss (DSA), ssh-ed25519 and ecdsa keys with NIST
curves are supported.")
(license license:bsd-3)))
+
+(define-public python-atpublic
+ (package
+ (name "python-atpublic")
+ (version "1.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "atpublic" version))
+ (sha256
+ (base32
+ "0i3sbxkdlbb4560rrlmwwd5y4ps7k73lp4d8wnmd7ag9k426gjkx"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f)) ;; FIXME
+ (home-page "https://gitlab.com/warsaw/public")
+ (synopsis
+ "Decorator for populating __all__")
+ (description
+ "This is a very simple decorator and function which populates a
+module's __all__ and optionally the module globals. This provides
+both a pure-Python implementation and an optional C implementation.")
+ (license license:asl2.0)))
--
2.27.0
A
A
Alexandru-Sergiu Marton wrote on 9 Jul 2020 21:19
[PATCH 10/10] gnu: Add python-aiosmtpd.
(address . 42297@debbugs.gnu.org)(name . Alexandru-Sergiu Marton)(address . brown121407@posteo.ro)
dfd2434a3fc246917ec9ad79d0db54cb4d205c45.1594321515.git.brown121407@posteo.ro
* gnu/packages/python-xyz.scm (python-aiosmtpd): New variable.
---
gnu/packages/python-xyz.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d8270edca1..6371d75205 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20667,3 +20667,38 @@ curves are supported.")
module's __all__ and optionally the module globals. This provides
both a pure-Python implementation and an optional C implementation.")
(license license:asl2.0)))
+
+(define-public python-aiosmtpd
+ (package
+ (name "python-aiosmtpd")
+ (version "1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "aiosmtpd" version))
+ (sha256
+ (base32
+ "1xdfk741pjmz1cm8dsi4n5vq4517i175rm94696m3f7kcgk7xsmp"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f)) ;; FIXME Tests fail due to network error (Errno 111)
+ (propagated-inputs
+ `(("python-atpublic" ,python-atpublic)))
+ (home-page "https://github.com/aio-libs/aiosmtpd")
+ (synopsis "Asyncio based SMTP server")
+ (description
+ "The Python standard library includes a basic SMTP server in the
+smtpd module, based on the old asynchronous libraries asyncore and
+asynchat. These modules are quite old and are definitely showing their
+age. asyncore and asynchat are difficult APIs to work with, understand,
+extend, and fix.
+
+With the introduction of the asyncio module in Python 3.4, a much better
+way of doing asynchronous I/O is now available. It seems obvious that
+an asyncio-based version of the SMTP and related protocols are needed for
+Python 3. This project brings together several highly experienced Python
+developers collaborating on this reimplementation.
+
+This package provides such an implementation of both the SMTP and LMTP
+protocols.")
+ (license license:asl2.0)))
--
2.27.0
?