mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-12-04 11:50:01 +00:00
python3Packages.grad-cam: fix build
Assisted-by: Pi (gpt-6.1-sol)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
matplotlib,
|
||||
numpy,
|
||||
opencv-python,
|
||||
opencv-python-headless,
|
||||
pillow,
|
||||
scikit-learn,
|
||||
torch,
|
||||
@@ -19,11 +19,19 @@ buildPythonPackage rec {
|
||||
version = "1.5.7";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-9r4G+CZnei6SLDh535vjlEsUppZD2A577Jrfsm9rXkI=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "jacobgil";
|
||||
repo = "pytorch-grad-cam";
|
||||
rev = "704393448a7b0c620ee2c2b9597723f1d7f17b3d";
|
||||
hash = "sha256-qNmIl+kERDiJeig6A9UjnwUd7VaO91QqhwszaszLAow=";
|
||||
};
|
||||
|
||||
# Runtime sources match the 1.5.7 sdist, but GitHub's setup.py still declares 1.5.5.
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace-fail "version='1.5.5'" "version='${version}'"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
];
|
||||
|
||||
@@ -38,7 +46,7 @@ buildPythonPackage rec {
|
||||
dependencies = [
|
||||
matplotlib
|
||||
numpy
|
||||
opencv-python
|
||||
opencv-python-headless
|
||||
pillow
|
||||
scikit-learn
|
||||
torchvision
|
||||
|
||||
Reference in New Issue
Block a user