git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.poetry: init at 0.12.10
commit53b996a62a4d192c873084b6a604db72bd733a38 authorJake Waksbaum <jake.waksbaum@gmail.com> dateMon 7 Jan 2019, 18:25 (8 years ago) parent0756066
3 files changed+115
pkgs/development/python-modules/poetry/default.nix+76 pkgs/development/python-modules/poetry/jsonschema.nix+37 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/poetry/default.nixnew file+76
@@ -0,0 +1,76 @@
1+{ lib, buildPythonPackage, fetchPypi, callPackage
2+, isPy27, isPy34
3+, cleo
4+, requests
5+, cachy
6+, requests-toolbelt
7+, pyrsistent
8+, pyparsing
9+, cachecontrol
10+, pkginfo
11+, html5lib
12+, shellingham
13+, tomlkit
14+, typing
15+, pathlib2
16+, virtualenv
17+, functools32
18+, pytest
19+}:
20+
21+let
22+ cleo6 = cleo.overrideAttrs (oldAttrs: rec {
23+ version = "0.6.8";
24+ src = fetchPypi {
25+ inherit (oldAttrs) pname;
26+ inherit version;
27+ sha256 = "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5";
28+ };
29+ });
30+
31+ jsonschema3 = callPackage ./jsonschema.nix { };
32+
33+in buildPythonPackage rec {
34+ pname = "poetry";
35+ version = "0.12.10";
36+
37+ src = fetchPypi {
38+ inherit pname version;
39+ sha256 = "00npb0jlimnk4r01zkhfmns4843j1hfhd388s326da5pd8n0dq7l";
40+ };
41+
42+ postPatch = ''
43+ substituteInPlace pyproject.toml --replace "3.0a3" "3.0.0a3"
44+ substituteInPlace setup.py --replace "3.0a3" "3.0.0a3"
45+ '';
46+
47+ propagatedBuildInputs = [
48+ cleo6
49+ requests
50+ cachy
51+ requests-toolbelt
52+ jsonschema3
53+ pyrsistent
54+ pyparsing
55+ cachecontrol
56+ pkginfo
57+ html5lib
58+ shellingham
59+ tomlkit
60+ ] ++ lib.optionals (isPy27 || isPy34) [ typing pathlib2 ]
61+ ++ lib.optionals isPy27 [ virtualenv functools32 ];
62+
63+ # No tests in Pypi tarball
64+ doCheck = false;
65+ checkInputs = [ pytest ];
66+ checkPhase = ''
67+ pytest tests
68+ '';
69+
70+ meta = with lib; {
71+ homepage = https://github.com/sdispater/poetry;
72+ description = "Python dependency management and packaging made easy";
73+ license = licenses.mit;
74+ maintainers = with maintainers; [ jakewaksbaum ];
75+ };
76+}
pkgs/development/python-modules/poetry/jsonschema.nixnew file+37
@@ -0,0 +1,37 @@
1+{ lib, buildPythonPackage, fetchPypi, isPy27, callPackage
2+, attrs
3+, pyrsistent
4+, six
5+, functools32
6+, lockfile
7+, setuptools_scm
8+}:
9+
10+buildPythonPackage rec {
11+ pname = "jsonschema";
12+ version = "3.0.0a3";
13+
14+ src = fetchPypi {
15+ inherit pname version;
16+ sha256 = "0pkhsq91rhk6384p0jxjkhc9yml2ya2l0mysyq78sb4981h45n6z";
17+ };
18+
19+ nativeBuildInputs = [ setuptools_scm ];
20+ propagatedBuildInputs = [
21+ attrs
22+ pyrsistent
23+ six
24+ lockfile
25+ ] ++ lib.optional isPy27 functools32;
26+
27+ # tests for latest version rely on custom version of betterpaths that is
28+ # difficult to deal with and isn't used on master
29+ doCheck = false;
30+
31+ meta = with lib; {
32+ homepage = https://github.com/Julian/jsonschema;
33+ description = "An implementation of JSON Schema validation for Python";
34+ license = licenses.mit;
35+ maintainers = with maintainers; [ jakewaksbaum ];
36+ };
37+}
pkgs/top-level/python-packages.nix+2
@@ -512,6 +512,8 @@ in {
512512
513513 plantuml = callPackage ../tools/misc/plantuml { };
514514
515+ poetry = callPackage ../development/python-modules/poetry { };
516+
515517 progress = callPackage ../development/python-modules/progress { };
516518
517519 pymysql = callPackage ../development/python-modules/pymysql { };