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 { buildPythonPackage rec {
pname = "pkgconfig"; pname = "pkgconfig";
version = "1.5.1"; version = "1.5.1";
inherit (pkgconfig) inherit (pkg-config)
setupHooks setupHooks
wrapperName wrapperName
suffixSalt suffixSalt
@ -17,19 +17,18 @@ buildPythonPackage rec {
sha256 = "97bfe3d981bab675d5ea3ef259045d7919c93897db7d3b59d4e8593cba8d354f"; sha256 = "97bfe3d981bab675d5ea3ef259045d7919c93897db7d3b59d4e8593cba8d354f";
}; };
checkInputs = [ nose ];
nativeBuildInputs = [ pkgconfig ]; propagatedNativeBuildInputs = [ pkg-config ];
checkPhase = '' doCheck = false;
nosetests
'';
patches = [ ./executable.patch ]; patches = [ ./executable.patch ];
postPatch = '' 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; { meta = with lib; {
description = "Interface Python with pkg-config"; description = "Interface Python with pkg-config";
homepage = "https://github.com/matze/pkgconfig"; homepage = "https://github.com/matze/pkgconfig";

View file

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

View file

@ -4719,7 +4719,7 @@ in {
inherit (pkgs.libsForQt5) soqt; 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 { }; pkginfo = callPackage ../development/python-modules/pkginfo { };