mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-13 16:07:30 +03:00
Merge pull request #265801 from robert-manchester/gphoto2_fix_build
python311Packages.gphoto2: fix setuptools.__version__ build breakage
This commit is contained in:
commit
5057d0dfcf
@ -1,22 +1,35 @@
|
||||
{ lib, fetchPypi, buildPythonPackage
|
||||
{ lib, fetchPypi, fetchpatch, buildPythonPackage
|
||||
, pkg-config
|
||||
, libgphoto2 }:
|
||||
, libgphoto2
|
||||
, setuptools
|
||||
, toml
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "gphoto2";
|
||||
version = "2.5.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-l9B6PEIGf8rkUlYApOytW2s9OhgcxMHVlDgfQR5ZnoA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
# only convert first 2 values from setuptools_version to ints to avoid
|
||||
# parse errors if last value is a string.
|
||||
patches = fetchpatch {
|
||||
url = "https://github.com/jim-easterbrook/python-gphoto2/commit/d388971b63fea831eb986d2212d4828c6c553235.patch";
|
||||
hash = "sha256-EXtXlhBx2jCKtMl7HmN87liqiHVAFSeXr11y830AlpY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config setuptools toml ];
|
||||
|
||||
buildInputs = [ libgphoto2 ];
|
||||
|
||||
doCheck = false; # No tests available
|
||||
|
||||
pythonImportsCheck = [ "gphoto2" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python interface to libgphoto2";
|
||||
homepage = "https://github.com/jim-easterbrook/python-gphoto2";
|
||||
|
Loading…
Reference in New Issue
Block a user