git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.python-lz4: init at 2.1.0

Fetching from github repository instead of pypi so that all tests can be run. - compatible with 2.7, 3+ - all tests pass

commit3a56e314b85a7bec2d19fb156713562e5ae3a7b1 authorChris Ostrouchov <chris.ostrouchov@gmail.com> dateWed 8 Aug 2018, 15:27 (8 years ago) parent5704642
2 files changed+42
pkgs/development/python-modules/python-lz4/default.nix+40 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/python-lz4/default.nixnew file+40
@@ -0,0 +1,40 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, pytestrunner
5+, pytest
6+, psutil
7+, setuptools_scm
8+, pkgconfig
9+, isPy3k
10+, future
11+}:
12+
13+buildPythonPackage rec {
14+ pname = "python-lz4";
15+ version = "2.1.0";
16+
17+ # get full repository inorder to run tests
18+ src = fetchFromGitHub {
19+ owner = pname;
20+ repo = pname;
21+ rev = "v${version}";
22+ sha256 = "1vjfplj37jcw1mf8l810dv76dx0raia3ylgyfy7sfsb3g17brjq6";
23+ };
24+
25+ buildInputs = [ setuptools_scm pkgconfig pytestrunner ];
26+ checkInputs = [ pytest psutil ];
27+ propagatedBuildInputs = lib.optionals (!isPy3k) [ future ];
28+
29+ # give a hint to setuptools_scm on package version
30+ preBuild = ''
31+ export SETUPTOOLS_SCM_PRETEND_VERSION="v${version}"
32+ '';
33+
34+ meta = {
35+ description = "LZ4 Bindings for Python";
36+ homepage = https://github.com/python-lz4/python-lz4;
37+ license = lib.licenses.bsd0;
38+ maintainers = with lib.maintainers; [ costrouc ];
39+ };
40+}
pkgs/top-level/python-packages.nix+2
@@ -461,6 +461,8 @@ in {
461461
462462 python-hosts = callPackage ../development/python-modules/python-hosts { };
463463
464+ python-lz4 = callPackage ../development/python-modules/python-lz4 { };
465+
464466 python3-openid = callPackage ../development/python-modules/python3-openid { };
465467
466468 python-periphery = callPackage ../development/python-modules/python-periphery { };