summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schütz <nix@dotlambda.de>2022-05-31 01:31:24 +0000
committerRobert Schütz <nix@dotlambda.de>2022-05-31 23:11:35 +0000
commitecab8dec3b7228c6f8217a16802b189784d40bc5 (patch)
treebfc52f59d5cb1252da2260056011be8b8aa15be5
parentMerge pull request #175645 from NixOS/backport-175546-to-release-22.05 (diff)
downloadnixpkgs-ecab8dec3b7228c6f8217a16802b189784d40bc5.tar.gz
python310Packages.pyfuse3: cythonize before building
(cherry picked from commit a3859b796fea622e4173fa18500842e70b74f2af)
-rw-r--r--pkgs/development/python-modules/pyfuse3/default.nix44
1 files changed, 36 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/pyfuse3/default.nix b/pkgs/development/python-modules/pyfuse3/default.nix
index cb10f07f22aa..bdb420313ba2 100644
--- a/pkgs/development/python-modules/pyfuse3/default.nix
+++ b/pkgs/development/python-modules/pyfuse3/default.nix
@@ -1,22 +1,45 @@
-{ stdenv, lib, buildPythonPackage, fetchPypi, pkg-config, fuse3, trio, pytestCheckHook, pytest-trio, which, pythonAtLeast }:
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+, cython
+, pkg-config
+, fuse3
+, trio
+, python
+, pytestCheckHook
+, pytest-trio
+, which
+}:
buildPythonPackage rec {
pname = "pyfuse3";
version = "3.2.1";
- src = fetchPypi {
- inherit pname version;
- sha256 = "22d146dac59a8429115e9a93317975ea54b35e0278044a94d3fac5b4ad5f7e33";
- };
+ disabled = pythonOlder "3.5";
+
+ format = "setuptools";
- disabled = pythonAtLeast "3.10";
+ src = fetchFromGitHub {
+ owner = "libfuse";
+ repo = "pyfuse3";
+ rev = "release-${version}";
+ hash = "sha256-JGbp2bSI/Rvyys1xMd2o34KlqqBsV6B9LhuuNopayYA=";
+ };
- nativeBuildInputs = [ pkg-config ];
+ nativeBuildInputs = [
+ cython
+ pkg-config
+ ];
buildInputs = [ fuse3 ];
propagatedBuildInputs = [ trio ];
+ preBuild = ''
+ ${python.pythonForBuild.interpreter} setup.py build_cython
+ '';
+
checkInputs = [
pytestCheckHook
pytest-trio
@@ -27,10 +50,15 @@ buildPythonPackage rec {
# Checks if a /usr/bin directory exists, can't work on NixOS
disabledTests = [ "test_listdir" ];
+ pythonImportsCheck = [
+ "pyfuse3"
+ "pyfuse3_asyncio"
+ ];
+
meta = with lib; {
description = "Python 3 bindings for libfuse 3 with async I/O support";
homepage = "https://github.com/libfuse/pyfuse3";
license = licenses.lgpl2Plus;
- maintainers = with maintainers; [ nyanloutre ];
+ maintainers = with maintainers; [ nyanloutre dotlambda ];
};
}