git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #53599 from jbaum98/poetry

pythonPackages.poetry: init at 0.12.10

commit1b1ea35f74be12102f81eea9b72ccdb47bbb83ff authorworldofpeace <worldofpeace@users.noreply.github.com> dateThu 10 Jan 2019, 17:42 (8 years ago) parentada7cf053b996a
12 files changed+324−4
maintainers/maintainer-list.nix+5 pkgs/development/python-modules/cachy/default.nix+33 pkgs/development/python-modules/cleo/default.nix+30 pkgs/development/python-modules/clikit/default.nix+30 pkgs/development/python-modules/pastel/default.nix+26 pkgs/development/python-modules/poetry/default.nix+76 pkgs/development/python-modules/poetry/jsonschema.nix+37 pkgs/development/python-modules/pylev/default.nix+24 pkgs/development/python-modules/pyrsistent/default.nix+5−4 pkgs/development/python-modules/pyrsistent/no-setup-requires-pytestrunner.patch+15 pkgs/development/python-modules/tomlkit/default.nix+29 pkgs/top-level/python-packages.nix+14
maintainers/maintainer-list.nix+5
@@ -1953,6 +1953,11 @@
19531953 github = "jakelogemann";
19541954 name = "Jake Logemann";
19551955 };
1956+ jakewaksbaum = {
1957+ email = "jake.waksbaum@gmail.com";
1958+ github = "jbaum98";
1959+ name = "Jake Waksbaum";
1960+ };
19561961 jammerful = {
19571962 email = "jammerful@gmail.com";
19581963 github = "jammerful";
pkgs/development/python-modules/cachy/default.nixnew file+33
@@ -0,0 +1,33 @@
1+{ lib, buildPythonPackage, fetchPypi
2+, redis
3+, memcached
4+, msgpack-python
5+}:
6+
7+buildPythonPackage rec {
8+ pname = "cachy";
9+ version = "0.2.0";
10+
11+ src = fetchPypi {
12+ inherit pname version;
13+ sha256 = "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp";
14+ };
15+
16+ propagatedBuildInputs = [
17+ redis
18+ memcached
19+ msgpack-python
20+ ];
21+
22+ # The Pypi tarball doesn't include tests, and the GitHub source isn't
23+ # buildable until we bootstrap poetry, see
24+ # https://github.com/NixOS/nixpkgs/pull/53599#discussion_r245855665
25+ doCheck = false;
26+
27+ meta = with lib; {
28+ homepage = https://github.com/sdispater/cachy;
29+ description = "Cachy provides a simple yet effective caching library";
30+ license = licenses.mit;
31+ maintainers = with maintainers; [ jakewaksbaum ];
32+ };
33+}
pkgs/development/python-modules/cleo/default.nixnew file+30
@@ -0,0 +1,30 @@
1+{ lib, buildPythonPackage, fetchPypi
2+, pylev, pastel, clikit }:
3+
4+buildPythonPackage rec {
5+ pname = "cleo";
6+ version = "0.7.2";
7+
8+ src = fetchPypi {
9+ inherit pname version;
10+ sha256 = "091nzpfp5incd2fzqych78rvyx4i3djr50cnizbjzr3dc7g00l3s";
11+ };
12+
13+ propagatedBuildInputs = [
14+ pylev
15+ pastel
16+ clikit
17+ ];
18+
19+ # The Pypi tarball doesn't include tests, and the GitHub source isn't
20+ # buildable until we bootstrap poetry, see
21+ # https://github.com/NixOS/nixpkgs/pull/53599#discussion_r245855665
22+ doCheck = false;
23+
24+ meta = with lib; {
25+ homepage = https://github.com/sdispater/cleo;
26+ description = "Allows you to create beautiful and testable command-line interfaces";
27+ license = licenses.mit;
28+ maintainers = with maintainers; [ jakewaksbaum ];
29+ };
30+}
pkgs/development/python-modules/clikit/default.nixnew file+30
@@ -0,0 +1,30 @@
1+{ lib, buildPythonPackage, fetchPypi
2+, isPy27, isPy34
3+, pylev, pastel, typing, enum34 }:
4+
5+buildPythonPackage rec {
6+ pname = "clikit";
7+ version = "0.2.3";
8+
9+ src = fetchPypi {
10+ inherit pname version;
11+ sha256 = "0zr1s0xhk62p9a6zcp5whvsb27lddyk8gx03k9l8q18jp7y3igbv";
12+ };
13+
14+ propagatedBuildInputs = [
15+ pylev pastel
16+ ] ++ lib.optional (isPy27 || isPy34) typing
17+ ++ lib.optional isPy27 enum34;
18+
19+ # The Pypi tarball doesn't include tests, and the GitHub source isn't
20+ # buildable until we bootstrap poetry, see
21+ # https://github.com/NixOS/nixpkgs/pull/53599#discussion_r245855665
22+ doCheck = false;
23+
24+ meta = with lib; {
25+ homepage = https://github.com/sdispater/clikit;
26+ description = "A group of utilities to build beautiful and testable command line interfaces";
27+ license = licenses.mit;
28+ maintainers = with maintainers; [ jakewaksbaum ];
29+ };
30+}
pkgs/development/python-modules/pastel/default.nixnew file+26
@@ -0,0 +1,26 @@
1+{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, pytest }:
2+
3+buildPythonPackage rec {
4+ pname = "pastel";
5+ version = "0.1.0";
6+
7+ # No tests in PyPi tarball
8+ src = fetchFromGitHub {
9+ owner = "sdispater";
10+ repo = "pastel";
11+ rev = version;
12+ sha256 = "1b4ag7jr7j0sxly5g29imdq8g0d4ixhbck55dblr45mlsidydx0s";
13+ };
14+
15+ checkInputs = [ pytest ];
16+ checkPhase = ''
17+ pytest tests -sq
18+ '';
19+
20+ meta = with lib; {
21+ homepage = https://github.com/sdispater/pastel;
22+ description = "Bring colors to your terminal";
23+ license = licenses.mit;
24+ maintainers = with maintainers; [ jakewaksbaum ];
25+ };
26+}
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/development/python-modules/pylev/default.nixnew file+24
@@ -0,0 +1,24 @@
1+{ lib, buildPythonPackage, fetchFromGitHub }:
2+
3+buildPythonPackage rec {
4+ pname = "pylev";
5+ version = "1.3.0";
6+
7+ # No tests in PyPi tarball
8+ src = fetchFromGitHub {
9+ owner = "toastdriven";
10+ repo = "pylev";
11+ # Can't use a tag because it's missing
12+ # https://github.com/toastdriven/pylev/issues/10
13+ # rev = "v${version};
14+ rev = "72e3d490515c3188e2acac9c15ea1b466f9ff938";
15+ sha256 = "18dg1rfnqgfl6x4vafiq4la9d7f65xak19gcvngslq0bm1z6hyd8";
16+ };
17+
18+ meta = with lib; {
19+ homepage = https://github.com/toastdriven/pylev;
20+ description = "A pure Python Levenshtein implementation that's not freaking GPL'd";
21+ license = licenses.bsd3;
22+ maintainers = with maintainers; [ jakewaksbaum ];
23+ };
24+}
pkgs/development/python-modules/pyrsistent/default.nix+5−4
@@ -4,6 +4,7 @@
44, six
55, pytest
66, hypothesis
7+, pytestrunner
78}:
89
910buildPythonPackage rec {
@@ -16,11 +17,11 @@ buildPythonPackage rec {
1617 };
1718
1819 propagatedBuildInputs = [ six ];
19− buildInputs = [ pytest hypothesis ];
2020
21− checkPhase = ''
22− py.test
23− '';
21+ checkInputs = [ pytestrunner pytest hypothesis ];
22+
23+ # pytestrunner is only needed to run tests
24+ patches = [ ./no-setup-requires-pytestrunner.patch ];
2425
2526 meta = with stdenv.lib; {
2627 homepage = https://github.com/tobgu/pyrsistent/;
pkgs/development/python-modules/pyrsistent/no-setup-requires-pytestrunner.patchnew file+15
@@ -0,0 +1,15 @@
1+diff --git a/setup.py b/setup.py
2+index 90a39a5..7bf444f 100644
3+--- a/setup.py
4++++ b/setup.py
5+@@ -77,9 +77,8 @@ setup(
6+ 'Programming Language :: Python :: Implementation :: PyPy',
7+ ],
8+ test_suite='tests',
9+- tests_require=['pytest','hypothesis'],
10++ tests_require=['pytest-runner', 'pytest','hypothesis'],
11+ scripts=[],
12+- setup_requires=['pytest-runner'],
13+ ext_modules=extensions,
14+ cmdclass={'build_ext': custom_build_ext},
15+ install_requires=['six'],
pkgs/development/python-modules/tomlkit/default.nixnew file+29
@@ -0,0 +1,29 @@
1+{ lib, buildPythonPackage, fetchPypi, isPy27, isPy34
2+, enum34, functools32, typing
3+}:
4+
5+buildPythonPackage rec {
6+ pname = "tomlkit";
7+ version = "0.5.3";
8+
9+ src = fetchPypi {
10+ inherit pname version;
11+ sha256 = "1hjfzlb6y694pkadygcaq1n63di97pxgq2zpc74in1axc5166l6n";
12+ };
13+
14+ propagatedBuildInputs =
15+ lib.optionals isPy27 [ enum34 functools32 ]
16+ ++ lib.optional (isPy27 || isPy34) typing;
17+
18+ # The Pypi tarball doesn't include tests, and the GitHub source isn't
19+ # buildable until we bootstrap poetry, see
20+ # https://github.com/NixOS/nixpkgs/pull/53599#discussion_r245855665
21+ doCheck = false;
22+
23+ meta = with lib; {
24+ homepage = https://github.com/sdispater/tomlkit;
25+ description = "Style-preserving TOML library for Python";
26+ license = licenses.mit;
27+ maintainers = with maintainers; [ jakewaksbaum ];
28+ };
29+}
pkgs/top-level/python-packages.nix+14
@@ -288,10 +288,16 @@ in {
288288
289289 cachecontrol = callPackage ../development/python-modules/cachecontrol { };
290290
291+ cachy = callPackage ../development/python-modules/cachy { };
292+
291293 cdecimal = callPackage ../development/python-modules/cdecimal { };
292294
293295 chalice = callPackage ../development/python-modules/chalice { };
294296
297+ cleo = callPackage ../development/python-modules/cleo { };
298+
299+ clikit = callPackage ../development/python-modules/clikit { };
300+
295301 clustershell = callPackage ../development/python-modules/clustershell { };
296302
297303 cozy = callPackage ../development/python-modules/cozy { };
@@ -494,6 +500,8 @@ in {
494500
495501 palettable = callPackage ../development/python-modules/palettable { };
496502
503+ pastel = callPackage ../development/python-modules/pastel { };
504+
497505 pathlib = callPackage ../development/python-modules/pathlib { };
498506
499507 pdf2image = callPackage ../development/python-modules/pdf2image { };
@@ -510,6 +518,8 @@ in {
510518
511519 plantuml = callPackage ../tools/misc/plantuml { };
512520
521+ poetry = callPackage ../development/python-modules/poetry { };
522+
513523 progress = callPackage ../development/python-modules/progress { };
514524
515525 pymysql = callPackage ../development/python-modules/pymysql { };
@@ -601,6 +611,8 @@ in {
601611
602612 pykeepass = callPackage ../development/python-modules/pykeepass { };
603613
614+ pylev = callPackage ../development/python-modules/pylev { };
615+
604616 pymatgen = callPackage ../development/python-modules/pymatgen { };
605617
606618 pymatgen-lammps = callPackage ../development/python-modules/pymatgen-lammps { };
@@ -770,6 +782,8 @@ in {
770782
771783 toml = callPackage ../development/python-modules/toml { };
772784
785+ tomlkit = callPackage ../development/python-modules/tomlkit { };
786+
773787 unifi = callPackage ../development/python-modules/unifi { };
774788
775789 vidstab = callPackage ../development/python-modules/vidstab { };