diff --git a/pkgs/development/python-modules/fastparquet/default.nix b/pkgs/development/python-modules/fastparquet/default.nix index 593d677ca2f3..05cb76f1dd48 100644 --- a/pkgs/development/python-modules/fastparquet/default.nix +++ b/pkgs/development/python-modules/fastparquet/default.nix @@ -3,8 +3,9 @@ , fetchFromGitHub , python , cython +, oldest-supported-numpy , setuptools -, substituteAll +, setuptools-scm , numpy , pandas , cramjam @@ -14,6 +15,7 @@ , pytestCheckHook , pythonOlder , packaging +, wheel }: buildPythonPackage rec { @@ -30,24 +32,23 @@ buildPythonPackage rec { hash = "sha256-pJ0zK0upEV7TyuNMIcozugkwBlYpK/Dg6BdB0kBpn9k="; }; + SETUPTOOLS_SCM_PRETEND_VERSION = version; + nativeBuildInputs = [ cython + oldest-supported-numpy setuptools - ]; - - patches = [ - (substituteAll { - src = ./version.patch; - inherit version; - }) + setuptools-scm + wheel ]; postPatch = '' - substituteInPlace setup.py \ - --replace "'pytest-runner'," "" \ - --replace "oldest-supported-numpy" "numpy" + substituteInPlace pyproject.toml \ + --replace '"pytest-runner"' "" - sed -i '/"git", "status"/d' setup.py + sed -i \ + -e "/pytest-runner/d" \ + -e '/"git", "status"/d' setup.py ''; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/fastparquet/version.patch b/pkgs/development/python-modules/fastparquet/version.patch deleted file mode 100644 index 86d80e2a411b..000000000000 --- a/pkgs/development/python-modules/fastparquet/version.patch +++ /dev/null @@ -1,7 +0,0 @@ -diff --git a/fastparquet/_version.py b/fastparquet/_version.py -new file mode 100644 -index 0000000..eb2c9c9 ---- /dev/null -+++ b/fastparquet/_version.py -@@ -0,0 +1 @@ -+__version__ = "@version@"