diff --git a/pkgs/development/python-modules/paddle_bfloat/binary-hashes.nix b/pkgs/development/python-modules/paddle_bfloat/binary-hashes.nix new file mode 100644 index 000000000000..602f1759bc5c --- /dev/null +++ b/pkgs/development/python-modules/paddle_bfloat/binary-hashes.nix @@ -0,0 +1,11 @@ +{ + cp39 = { + hash = "sha256-qD94RBvzlCDf0mXSszmZw0ilN8p4/5gDpDbBRgEMHZs="; + }; + cp310 = { + hash = "sha256-vjUVESLiqPY+r7K5eUlYPX3hK3QtQ8/H1LIz5lZtrMg="; + }; + cp311 = { + hash = "sha256-6IVD8DjTMHqD+yZPXP16Do9QQzJbOPxSEbHXVAJbQp8="; + }; +} diff --git a/pkgs/development/python-modules/paddle_bfloat/default.nix b/pkgs/development/python-modules/paddle_bfloat/default.nix new file mode 100644 index 000000000000..263485187a03 --- /dev/null +++ b/pkgs/development/python-modules/paddle_bfloat/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, pythonAtLeast +, python +}: +let + pname = "paddle_bfloat"; + version = "0.1.7"; + format = "wheel"; + pyShortVersion = "cp${builtins.replaceStrings ["."] [""] python.pythonVersion}"; + binary-hash = (import ./binary-hashes.nix)."${pyShortVersion}" or {}; + src = fetchPypi ({ + inherit pname version format; + dist = pyShortVersion; + python = pyShortVersion; + abi = pyShortVersion; + platform = "manylinux_2_17_x86_64.manylinux2014_x86_64"; + } // binary-hash); +in +buildPythonPackage { + inherit pname version format src; + + disabled = pythonOlder "3.9" || pythonAtLeast "3.12"; + + propagatedBuildInputs = [ + ]; + + meta = with lib; { + description = "Paddle numpy bfloat16 package"; + homepage = "https://pypi.org/project/paddle-bfloat"; + license = licenses.asl20; + maintainers = with maintainers; [ happysalada ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 136d6642638e..b694d50a62d5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1163,6 +1163,8 @@ self: super: with self; { pad4pi = callPackage ../development/python-modules/pad4pi { }; + paddle_bfloat = callPackage ../development/python-modules/paddle_bfloat { }; + pulumi = callPackage ../development/python-modules/pulumi { inherit (pkgs) pulumi; }; pulumi-aws = callPackage ../development/python-modules/pulumi-aws { };