diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/tensorboardx/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/tensorboardx/default.nix | 57 |
1 files changed, 13 insertions, 44 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/tensorboardx/default.nix b/nixpkgs/pkgs/development/python-modules/tensorboardx/default.nix index 36992eace585..6097d2ecfd81 100644 --- a/nixpkgs/pkgs/development/python-modules/tensorboardx/default.nix +++ b/nixpkgs/pkgs/development/python-modules/tensorboardx/default.nix @@ -2,88 +2,55 @@ , buildPythonPackage , crc32c , fetchFromGitHub -, fetchpatch , lib , matplotlib , moto , numpy -, pillow , protobuf , pytestCheckHook , torch -, six +, setuptools-scm , soundfile , stdenv , tensorboard , torchvision -, which }: buildPythonPackage rec { pname = "tensorboardx"; - version = "2.5.1"; + version = "2.6.2"; format = "setuptools"; src = fetchFromGitHub { owner = "lanpa"; repo = "tensorboardX"; rev = "refs/tags/v${version}"; - hash = "sha256-Np0Ibn51qL0ORwq1IY8lUle05MQDdb5XkI1uzGOKJno="; + hash = "sha256-m7RLDOMuRNLacnIudptBGjhcTlMk8+v/onz6Amqxb90="; }; - patches = [ - (fetchpatch { - name = "fix-test-multiprocess-fork-on-darwin.patch"; - url = "https://github.com/lanpa/tensorboardX/commit/246a867237ff12893351b9275a1e297ee2861319.patch"; - hash = "sha256-ObUaIi1gFcGZAvDOEtZFd9TjZZUp3k89tYwmDQ5yOWg="; - }) - # https://github.com/lanpa/tensorboardX/pull/706 - (fetchpatch { - name = "fix-test-use-matplotlib-agg-backend.patch"; - url = "https://github.com/lanpa/tensorboardX/commit/751821c7af7f7f2cb724938e36fa04e814c0e4de.patch"; - hash = "sha256-Tu76ZRTh8fGj+/CzpqJO65hKrDFASbmzoLVIZ0kyLQA="; - }) - # https://github.com/lanpa/tensorboardX/pull/707 - (fetchpatch { - name = "fix-test-handle-numpy-float128-missing.patch"; - url = "https://github.com/lanpa/tensorboardX/commit/38f57ffc3b3dd91e76b13ec97404278065fbc782.patch"; - hash = "sha256-5Po41lHiO5hKi4ZtWR98/wwDe9HKZdADNTv40mgIEvk="; - }) - # https://github.com/lanpa/tensorboardX/pull/708 - (fetchpatch { - name = "fix-test-respect-tmpdir.patch"; - url = "https://github.com/lanpa/tensorboardX/commit/b0191d1cfb8a23def76e465d20fd59302c894f32.patch"; - hash = "sha256-6rSncJ16P1u70Cz9nObo8lMD7Go50BR3DZLgP4bODk4="; - }) - ]; - - postPatch = '' - # Version detection seems broken here, the version reported by python is - # newer than the protobuf package itself. - sed -i -e "s/'protobuf[^']*'/'protobuf'/" setup.py - ''; - nativeBuildInputs = [ - which protobuf + setuptools-scm ]; # required to make tests deterministic - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python"; + env.PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = "python"; + + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; propagatedBuildInputs = [ crc32c numpy - six - soundfile ]; + pythonImportsCheck = [ "tensorboardX" ]; + nativeCheckInputs = [ boto3 matplotlib moto - pillow pytestCheckHook + soundfile torch tensorboard torchvision @@ -107,7 +74,9 @@ buildPythonPackage rec { meta = with lib; { description = "Library for writing tensorboard-compatible logs"; - homepage = "https://github.com/lanpa/tensorboardX"; + homepage = "https://tensorboardx.readthedocs.io"; + downloadPage = "https://github.com/lanpa/tensorboardX"; + changelog = "https://github.com/lanpa/tensorboardX/blob/${src.rev}/HISTORY.rst"; license = licenses.mit; maintainers = with maintainers; [ lebastr akamaus ]; platforms = platforms.all; |