Merge pull request #108088 from lukeadams/pycapnp-fixes

This commit is contained in:
Sandro 2021-01-06 02:09:21 +01:00 committed by GitHub
commit 454329cfc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 24 deletions

View file

@ -1,10 +1,10 @@
{ lib, buildPythonPackage, fetchPypi, nose, pkgconfig }:
{ lib, buildPythonPackage, fetchPypi, pkg-config }:
buildPythonPackage rec {
pname = "pkgconfig";
version = "1.5.1";
inherit (pkgconfig)
inherit (pkg-config)
setupHooks
wrapperName
suffixSalt
@ -17,19 +17,18 @@ buildPythonPackage rec {
sha256 = "97bfe3d981bab675d5ea3ef259045d7919c93897db7d3b59d4e8593cba8d354f";
};
checkInputs = [ nose ];
nativeBuildInputs = [ pkgconfig ];
propagatedNativeBuildInputs = [ pkg-config ];
checkPhase = ''
nosetests
'';
doCheck = false;
patches = [ ./executable.patch ];
postPatch = ''
substituteInPlace pkgconfig/pkgconfig.py --replace 'PKG_CONFIG_EXE = "pkg-config"' 'PKG_CONFIG_EXE = "${pkgconfig}/bin/${pkgconfig.targetPrefix}pkg-config"'
substituteInPlace pkgconfig/pkgconfig.py --replace 'PKG_CONFIG_EXE = "pkg-config"' 'PKG_CONFIG_EXE = "${pkg-config}/bin/${pkg-config.targetPrefix}pkg-config"'
'';
pythonImportsCheck = [ "pkgconfig" ];
meta = with lib; {
description = "Interface Python with pkg-config";
homepage = "https://github.com/matze/pkgconfig";

View file

@ -1,34 +1,35 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, capnproto
, cython
, fetchFromGitHub
, isPy27
, isPyPy
, isPy3k
, pkgconfig
}:
buildPythonPackage rec {
pname = "pycapnp";
version = "1.0.0";
disabled = isPyPy || isPy3k;
disabled = isPyPy || isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "9f6fcca349ebf2ec04ca7eacb076aea3e4fcdc010ac33c98b54f0a19d4e5d3e0";
src = fetchFromGitHub {
owner = "capnproto";
repo = pname;
rev = "v${version}";
sha256 = "1n6dq2fbagi3wvrpkyb7wx4y15nkm2grln4y75hrqgmnli8ggi9v";
};
buildInputs = [ capnproto cython ];
buildInputs = [ capnproto cython pkgconfig ];
# import setuptools as soon as possible, to minimize monkeypatching mayhem.
postConfigure = ''
sed -i '3iimport setuptools' setup.py
'';
# Tests disabled due to dependency on jinja and various other libraries.
doCheck = false;
pythonImportsCheck = [ "capnp" ];
meta = with stdenv.lib; {
maintainers = with maintainers; [ cstrahan ];
maintainers = with maintainers; [ cstrahan lukeadams ];
license = licenses.bsd2;
homepage = "http://jparyani.github.io/pycapnp/index.html";
broken = true; # 2018-04-11
homepage = "https://capnproto.github.io/pycapnp/";
};
}

View file

@ -4719,7 +4719,7 @@ in {
inherit (pkgs.libsForQt5) soqt;
};
pkgconfig = callPackage ../development/python-modules/pkgconfig { inherit (pkgs) pkgconfig; };
pkgconfig = callPackage ../development/python-modules/pkgconfig { inherit (pkgs) pkg-config; };
pkginfo = callPackage ../development/python-modules/pkginfo { };