From fb7acdec80e946c0a45231a1147a99e7c76a54b7 Mon Sep 17 00:00:00 2001 From: Jake Waksbaum Date: Tue, 8 Jan 2019 21:29:33 +0000 Subject: [PATCH 1/9] Add jakewaksbaum as a maintainer --- maintainers/maintainer-list.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index c76210d86a46..03753ca93f89 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1953,6 +1953,11 @@ github = "jakelogemann"; name = "Jake Logemann"; }; + jakewaksbaum = { + email = "jake.waksbaum@gmail.com"; + github = "jbaum98"; + name = "Jake Waksbaum"; + }; jammerful = { email = "jammerful@gmail.com"; github = "jammerful"; From e77c10db63af32fc1217b6931f55f2395039bdea Mon Sep 17 00:00:00 2001 From: Jake Waksbaum Date: Mon, 7 Jan 2019 16:41:26 +0000 Subject: [PATCH 2/9] pythonPackages.pylev: init at 1.3.0 --- .../python-modules/pylev/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/python-modules/pylev/default.nix diff --git a/pkgs/development/python-modules/pylev/default.nix b/pkgs/development/python-modules/pylev/default.nix new file mode 100644 index 000000000000..895171ff7138 --- /dev/null +++ b/pkgs/development/python-modules/pylev/default.nix @@ -0,0 +1,24 @@ +{ lib, buildPythonPackage, fetchFromGitHub }: + +buildPythonPackage rec { + pname = "pylev"; + version = "1.3.0"; + + # No tests in PyPi tarball + src = fetchFromGitHub { + owner = "toastdriven"; + repo = "pylev"; + # Can't use a tag because it's missing + # https://github.com/toastdriven/pylev/issues/10 + # rev = "v${version}; + rev = "72e3d490515c3188e2acac9c15ea1b466f9ff938"; + sha256 = "18dg1rfnqgfl6x4vafiq4la9d7f65xak19gcvngslq0bm1z6hyd8"; + }; + + meta = with lib; { + homepage = https://github.com/toastdriven/pylev; + description = "A pure Python Levenshtein implementation that's not freaking GPL'd"; + license = licenses.bsd3; + maintainers = with maintainers; [ jakewaksbaum ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d0d12d2ca729..7e7caa6d179c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -595,6 +595,8 @@ in { pykeepass = callPackage ../development/python-modules/pykeepass { }; + pylev = callPackage ../development/python-modules/pylev { }; + pymatgen = callPackage ../development/python-modules/pymatgen { }; pymatgen-lammps = callPackage ../development/python-modules/pymatgen-lammps { }; From 1b221099042d18d454649ca74838858d5d5a8f42 Mon Sep 17 00:00:00 2001 From: Jake Waksbaum Date: Mon, 7 Jan 2019 16:57:30 +0000 Subject: [PATCH 3/9] pythonPackages.pastel: init at 0.1.0 --- .../python-modules/pastel/default.nix | 26 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/development/python-modules/pastel/default.nix diff --git a/pkgs/development/python-modules/pastel/default.nix b/pkgs/development/python-modules/pastel/default.nix new file mode 100644 index 000000000000..2d99447f724f --- /dev/null +++ b/pkgs/development/python-modules/pastel/default.nix @@ -0,0 +1,26 @@ +{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, pytest }: + +buildPythonPackage rec { + pname = "pastel"; + version = "0.1.0"; + + # No tests in PyPi tarball + src = fetchFromGitHub { + owner = "sdispater"; + repo = "pastel"; + rev = version; + sha256 = "1b4ag7jr7j0sxly5g29imdq8g0d4ixhbck55dblr45mlsidydx0s"; + }; + + checkInputs = [ pytest ]; + checkPhase = '' + pytest tests -sq + ''; + + meta = with lib; { + homepage = https://github.com/sdispater/pastel; + description = "Bring colors to your terminal"; + license = licenses.mit; + maintainers = with maintainers; [ jakewaksbaum ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7e7caa6d179c..ff81e9bc5b6c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -488,6 +488,8 @@ in { palettable = callPackage ../development/python-modules/palettable { }; + pastel = callPackage ../development/python-modules/pastel { }; + pathlib = callPackage ../development/python-modules/pathlib { }; pdf2image = callPackage ../development/python-modules/pdf2image { }; From 8aa6c116f21c7c815e32f3ce0a55fddd3c638fd6 Mon Sep 17 00:00:00 2001 From: Jake Waksbaum Date: Mon, 7 Jan 2019 17:06:48 +0000 Subject: [PATCH 4/9] pythonPackages.clikit: init at 0.2.3 --- .../python-modules/clikit/default.nix | 30 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/python-modules/clikit/default.nix diff --git a/pkgs/development/python-modules/clikit/default.nix b/pkgs/development/python-modules/clikit/default.nix new file mode 100644 index 000000000000..0d5247c02e05 --- /dev/null +++ b/pkgs/development/python-modules/clikit/default.nix @@ -0,0 +1,30 @@ +{ lib, buildPythonPackage, fetchPypi +, isPy27, isPy34 +, pylev, pastel, typing, enum34 }: + +buildPythonPackage rec { + pname = "clikit"; + version = "0.2.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "0zr1s0xhk62p9a6zcp5whvsb27lddyk8gx03k9l8q18jp7y3igbv"; + }; + + propagatedBuildInputs = [ + pylev pastel + ] ++ lib.optional (isPy27 || isPy34) typing + ++ lib.optional isPy27 enum34; + + # The Pypi tarball doesn't include tests, and the GitHub source isn't + # buildable until we bootstrap poetry, see + # https://github.com/NixOS/nixpkgs/pull/53599#discussion_r245855665 + doCheck = false; + + meta = with lib; { + homepage = https://github.com/sdispater/clikit; + description = "A group of utilities to build beautiful and testable command line interfaces"; + license = licenses.mit; + maintainers = with maintainers; [ jakewaksbaum ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ff81e9bc5b6c..86603b5ebc7a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -290,6 +290,8 @@ in { chalice = callPackage ../development/python-modules/chalice { }; + clikit = callPackage ../development/python-modules/clikit { }; + clustershell = callPackage ../development/python-modules/clustershell { }; cozy = callPackage ../development/python-modules/cozy { }; From 9f6a76b95bbcfecf0e162a0ea9bac9663d10e44f Mon Sep 17 00:00:00 2001 From: Jake Waksbaum Date: Mon, 7 Jan 2019 17:13:19 +0000 Subject: [PATCH 5/9] pythonPackages.cleo: init at 0.7.2 --- .../python-modules/cleo/default.nix | 30 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/python-modules/cleo/default.nix diff --git a/pkgs/development/python-modules/cleo/default.nix b/pkgs/development/python-modules/cleo/default.nix new file mode 100644 index 000000000000..31a33b73c2bc --- /dev/null +++ b/pkgs/development/python-modules/cleo/default.nix @@ -0,0 +1,30 @@ +{ lib, buildPythonPackage, fetchPypi +, pylev, pastel, clikit }: + +buildPythonPackage rec { + pname = "cleo"; + version = "0.7.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "091nzpfp5incd2fzqych78rvyx4i3djr50cnizbjzr3dc7g00l3s"; + }; + + propagatedBuildInputs = [ + pylev + pastel + clikit + ]; + + # The Pypi tarball doesn't include tests, and the GitHub source isn't + # buildable until we bootstrap poetry, see + # https://github.com/NixOS/nixpkgs/pull/53599#discussion_r245855665 + doCheck = false; + + meta = with lib; { + homepage = https://github.com/sdispater/cleo; + description = "Allows you to create beautiful and testable command-line interfaces"; + license = licenses.mit; + maintainers = with maintainers; [ jakewaksbaum ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 86603b5ebc7a..d8703b35ca20 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -290,6 +290,8 @@ in { chalice = callPackage ../development/python-modules/chalice { }; + cleo = callPackage ../development/python-modules/cleo { }; + clikit = callPackage ../development/python-modules/clikit { }; clustershell = callPackage ../development/python-modules/clustershell { }; From a9ced39e88335b7318b2297cacf61e88508365e5 Mon Sep 17 00:00:00 2001 From: Jake Waksbaum Date: Mon, 7 Jan 2019 17:27:11 +0000 Subject: [PATCH 6/9] pythonPackages.cachy: init at 0.2.0 --- .../python-modules/cachy/default.nix | 33 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/development/python-modules/cachy/default.nix diff --git a/pkgs/development/python-modules/cachy/default.nix b/pkgs/development/python-modules/cachy/default.nix new file mode 100644 index 000000000000..029a18644846 --- /dev/null +++ b/pkgs/development/python-modules/cachy/default.nix @@ -0,0 +1,33 @@ +{ lib, buildPythonPackage, fetchPypi +, redis +, memcached +, msgpack-python +}: + +buildPythonPackage rec { + pname = "cachy"; + version = "0.2.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"; + }; + + propagatedBuildInputs = [ + redis + memcached + msgpack-python + ]; + + # The Pypi tarball doesn't include tests, and the GitHub source isn't + # buildable until we bootstrap poetry, see + # https://github.com/NixOS/nixpkgs/pull/53599#discussion_r245855665 + doCheck = false; + + meta = with lib; { + homepage = https://github.com/sdispater/cachy; + description = "Cachy provides a simple yet effective caching library"; + license = licenses.mit; + maintainers = with maintainers; [ jakewaksbaum ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d8703b35ca20..78997b6536b9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -286,6 +286,8 @@ in { cachecontrol = callPackage ../development/python-modules/cachecontrol { }; + cachy = callPackage ../development/python-modules/cachy { }; + cdecimal = callPackage ../development/python-modules/cdecimal { }; chalice = callPackage ../development/python-modules/chalice { }; From 33f486f456ab6675cbe0436f71309d4d5ce67f64 Mon Sep 17 00:00:00 2001 From: Jake Waksbaum Date: Mon, 7 Jan 2019 19:13:42 +0000 Subject: [PATCH 7/9] pythonPackages.tomlkit: init at 0.5.3 --- .../python-modules/tomlkit/default.nix | 29 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/development/python-modules/tomlkit/default.nix diff --git a/pkgs/development/python-modules/tomlkit/default.nix b/pkgs/development/python-modules/tomlkit/default.nix new file mode 100644 index 000000000000..47cf737f1889 --- /dev/null +++ b/pkgs/development/python-modules/tomlkit/default.nix @@ -0,0 +1,29 @@ +{ lib, buildPythonPackage, fetchPypi, isPy27, isPy34 +, enum34, functools32, typing +}: + +buildPythonPackage rec { + pname = "tomlkit"; + version = "0.5.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "1hjfzlb6y694pkadygcaq1n63di97pxgq2zpc74in1axc5166l6n"; + }; + + propagatedBuildInputs = + lib.optionals isPy27 [ enum34 functools32 ] + ++ lib.optional (isPy27 || isPy34) typing; + + # The Pypi tarball doesn't include tests, and the GitHub source isn't + # buildable until we bootstrap poetry, see + # https://github.com/NixOS/nixpkgs/pull/53599#discussion_r245855665 + doCheck = false; + + meta = with lib; { + homepage = https://github.com/sdispater/tomlkit; + description = "Style-preserving TOML library for Python"; + license = licenses.mit; + maintainers = with maintainers; [ jakewaksbaum ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 78997b6536b9..5bab0ace12b8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -774,6 +774,8 @@ in { toml = callPackage ../development/python-modules/toml { }; + tomlkit = callPackage ../development/python-modules/tomlkit { }; + unifi = callPackage ../development/python-modules/unifi { }; vidstab = callPackage ../development/python-modules/vidstab { }; From 0756066b1b5d9d4d7a4da2fcc157a07ef4bc3c6d Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Tue, 8 Jan 2019 00:02:12 -0500 Subject: [PATCH 8/9] pythonPackages.pyristent: add pytestrunner, fix build --- .../python-modules/pyrsistent/default.nix | 9 +++++---- .../no-setup-requires-pytestrunner.patch | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 pkgs/development/python-modules/pyrsistent/no-setup-requires-pytestrunner.patch diff --git a/pkgs/development/python-modules/pyrsistent/default.nix b/pkgs/development/python-modules/pyrsistent/default.nix index 0c32c4ef3865..ceb0d718a403 100644 --- a/pkgs/development/python-modules/pyrsistent/default.nix +++ b/pkgs/development/python-modules/pyrsistent/default.nix @@ -4,6 +4,7 @@ , six , pytest , hypothesis +, pytestrunner }: buildPythonPackage rec { @@ -16,11 +17,11 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ six ]; - buildInputs = [ pytest hypothesis ]; - checkPhase = '' - py.test - ''; + checkInputs = [ pytestrunner pytest hypothesis ]; + + # pytestrunner is only needed to run tests + patches = [ ./no-setup-requires-pytestrunner.patch ]; meta = with stdenv.lib; { homepage = https://github.com/tobgu/pyrsistent/; diff --git a/pkgs/development/python-modules/pyrsistent/no-setup-requires-pytestrunner.patch b/pkgs/development/python-modules/pyrsistent/no-setup-requires-pytestrunner.patch new file mode 100644 index 000000000000..74d85dc42931 --- /dev/null +++ b/pkgs/development/python-modules/pyrsistent/no-setup-requires-pytestrunner.patch @@ -0,0 +1,15 @@ +diff --git a/setup.py b/setup.py +index 90a39a5..7bf444f 100644 +--- a/setup.py ++++ b/setup.py +@@ -77,9 +77,8 @@ setup( + 'Programming Language :: Python :: Implementation :: PyPy', + ], + test_suite='tests', +- tests_require=['pytest','hypothesis'], ++ tests_require=['pytest-runner', 'pytest','hypothesis'], + scripts=[], +- setup_requires=['pytest-runner'], + ext_modules=extensions, + cmdclass={'build_ext': custom_build_ext}, + install_requires=['six'], From 53b996a62a4d192c873084b6a604db72bd733a38 Mon Sep 17 00:00:00 2001 From: Jake Waksbaum Date: Mon, 7 Jan 2019 18:25:57 +0000 Subject: [PATCH 9/9] pythonPackages.poetry: init at 0.12.10 --- .../python-modules/poetry/default.nix | 76 +++++++++++++++++++ .../python-modules/poetry/jsonschema.nix | 37 +++++++++ pkgs/top-level/python-packages.nix | 2 + 3 files changed, 115 insertions(+) create mode 100644 pkgs/development/python-modules/poetry/default.nix create mode 100644 pkgs/development/python-modules/poetry/jsonschema.nix diff --git a/pkgs/development/python-modules/poetry/default.nix b/pkgs/development/python-modules/poetry/default.nix new file mode 100644 index 000000000000..6f7ebc4cbc92 --- /dev/null +++ b/pkgs/development/python-modules/poetry/default.nix @@ -0,0 +1,76 @@ +{ lib, buildPythonPackage, fetchPypi, callPackage +, isPy27, isPy34 +, cleo +, requests +, cachy +, requests-toolbelt +, pyrsistent +, pyparsing +, cachecontrol +, pkginfo +, html5lib +, shellingham +, tomlkit +, typing +, pathlib2 +, virtualenv +, functools32 +, pytest +}: + +let + cleo6 = cleo.overrideAttrs (oldAttrs: rec { + version = "0.6.8"; + src = fetchPypi { + inherit (oldAttrs) pname; + inherit version; + sha256 = "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"; + }; + }); + + jsonschema3 = callPackage ./jsonschema.nix { }; + +in buildPythonPackage rec { + pname = "poetry"; + version = "0.12.10"; + + src = fetchPypi { + inherit pname version; + sha256 = "00npb0jlimnk4r01zkhfmns4843j1hfhd388s326da5pd8n0dq7l"; + }; + + postPatch = '' + substituteInPlace pyproject.toml --replace "3.0a3" "3.0.0a3" + substituteInPlace setup.py --replace "3.0a3" "3.0.0a3" + ''; + + propagatedBuildInputs = [ + cleo6 + requests + cachy + requests-toolbelt + jsonschema3 + pyrsistent + pyparsing + cachecontrol + pkginfo + html5lib + shellingham + tomlkit + ] ++ lib.optionals (isPy27 || isPy34) [ typing pathlib2 ] + ++ lib.optionals isPy27 [ virtualenv functools32 ]; + + # No tests in Pypi tarball + doCheck = false; + checkInputs = [ pytest ]; + checkPhase = '' + pytest tests + ''; + + meta = with lib; { + homepage = https://github.com/sdispater/poetry; + description = "Python dependency management and packaging made easy"; + license = licenses.mit; + maintainers = with maintainers; [ jakewaksbaum ]; + }; +} diff --git a/pkgs/development/python-modules/poetry/jsonschema.nix b/pkgs/development/python-modules/poetry/jsonschema.nix new file mode 100644 index 000000000000..9f7cf34b9416 --- /dev/null +++ b/pkgs/development/python-modules/poetry/jsonschema.nix @@ -0,0 +1,37 @@ +{ lib, buildPythonPackage, fetchPypi, isPy27, callPackage +, attrs +, pyrsistent +, six +, functools32 +, lockfile +, setuptools_scm +}: + +buildPythonPackage rec { + pname = "jsonschema"; + version = "3.0.0a3"; + + src = fetchPypi { + inherit pname version; + sha256 = "0pkhsq91rhk6384p0jxjkhc9yml2ya2l0mysyq78sb4981h45n6z"; + }; + + nativeBuildInputs = [ setuptools_scm ]; + propagatedBuildInputs = [ + attrs + pyrsistent + six + lockfile + ] ++ lib.optional isPy27 functools32; + + # tests for latest version rely on custom version of betterpaths that is + # difficult to deal with and isn't used on master + doCheck = false; + + meta = with lib; { + homepage = https://github.com/Julian/jsonschema; + description = "An implementation of JSON Schema validation for Python"; + license = licenses.mit; + maintainers = with maintainers; [ jakewaksbaum ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5bab0ace12b8..6e846e1f3089 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -512,6 +512,8 @@ in { plantuml = callPackage ../tools/misc/plantuml { }; + poetry = callPackage ../development/python-modules/poetry { }; + progress = callPackage ../development/python-modules/progress { }; pymysql = callPackage ../development/python-modules/pymysql { };