1{ lib, isPy3k, fetchFromGitHub, buildPythonPackage
2, six, enum34, pyasn1, cryptography, singledispatch
3, fetchPypi
4, gpgme, flake8, pytest, pytestcov, pep8-naming, pytest-ordering }:
5
6buildPythonPackage rec {
7 pname = "pgpy";
8 version = "0.5.2";
9
10 src = fetchFromGitHub {
11 owner = "SecurityInnovation";
12 repo = "PGPy";
13 rev = version;
14 sha256 = "1v2b1dyq1sl48d2gw7vn4hv6sasd9ihpzzcq8yvxj9dgfak2y663";
15 };
16
17 propagatedBuildInputs = [
18 six
19 pyasn1
20 cryptography
21 singledispatch
22 ] ++ lib.optional (!isPy3k) enum34;
23
24 checkInputs = [
25 gpgme
26 flake8
27 pytest
28 pytestcov
29 pep8-naming
30 pytest-ordering
31 ];
32
33 checkPhase = ''
34 pytest
35 '';
36
37 meta = with lib; {
38 homepage = "https://github.com/SecurityInnovation/PGPy";
39 description = "Pretty Good Privacy for Python 2 and 3";
40 longDescription = ''
41 PGPy is a Python (2 and 3) library for implementing Pretty Good Privacy
42 into Python programs, conforming to the OpenPGP specification per RFC
43 4880.
44 '';
45 license = licenses.bsd3;
46 maintainers = with maintainers; [ eadwu ];
47 };
48}