Merge #32034: pygobject: 3.24.1 -> 3.26.1

This commit is contained in:
Vladimír Čunát 2017-12-01 08:00:24 +01:00
commit 542adbdd05
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
3 changed files with 20 additions and 52 deletions

View File

@ -1,50 +1,28 @@
{ lib, fetchurl, fetchpatch, python, buildPythonPackage, pkgconfig, cairo, xlibsWrapper, isPyPy, isPy35, isPy36, isPy3k }:
{ lib, fetchFromGitHub, python, buildPythonPackage, pytest, pkgconfig, cairo, xlibsWrapper, isPyPy }:
if (isPyPy) then throw "pycairo not supported for interpreter ${python.executable}" else let
patch_waf = fetchpatch {
url = http://www.linuxfromscratch.org/patches/blfs/8.0/pycairo-1.10.0-waf_python_3_4-1.patch;
sha256 = "0xfl1i9dips2nykyg91f5h5r3xpk2hp1js1gq5z0hwjr0in55id4";
};
patch_waf-py3_5 = ./waf-py3_5.patch;
in buildPythonPackage rec {
buildPythonPackage rec {
pname = "pycairo";
version = "1.10.0";
version = "1.15.4";
name = "${pname}-${version}";
format = "other";
src = if isPy3k
then fetchurl {
url = "http://cairographics.org/releases/pycairo-${version}.tar.bz2";
sha256 = "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s";
}
else fetchurl {
url = "http://cairographics.org/releases/py2cairo-${version}.tar.bz2";
sha256 = "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k";
};
disabled = isPyPy;
patches = [
(fetchpatch {
url = http://www.linuxfromscratch.org/patches/blfs/8.0/pycairo-1.10.0-waf_unpack-1.patch;
sha256 = "1bmrhq2nmhx4l5glvyi59r0hc7w5m56kz41frx7v3dcp8f91p7xd";
})
];
src = fetchFromGitHub {
owner = "pygobject";
repo = "pycairo";
rev = "v${version}";
sha256 = "02vzmfxx8nl6dbwzc911wcj7hqspgqz6v9xmq6579vwfla0vaglv";
};
postPatch = ''
# we are unable to pass --prefix to bdist_wheel
# see https://github.com/NixOS/nixpkgs/pull/32034#discussion_r153285955
substituteInPlace setup.py --replace '"prefix": self.install_base' "'prefix': '$out'"
'';
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ python cairo xlibsWrapper ];
configurePhase = ''
(
cd $(${python.executable} waf unpack)
patch -p1 < ${patch_waf}
${lib.optionalString (isPy35 || isPy36) "patch -p1 < ${patch_waf-py3_5}"}
)
${python.executable} waf configure --prefix=$out
'';
buildPhase = "${python.executable} waf";
installPhase = "${python.executable} waf install";
checkInputs = [ pytest ];
meta.platforms = lib.platforms.linux ++ lib.platforms.darwin;
}

View File

@ -1,10 +0,0 @@
--- a/waflib/Build.py
+++ b/waflib/Build.py
@@ -151,6 +151,7 @@ class BuildContext(Context.Context):
f.close()
self.init_dirs()
def store(self):
+ return
data={}
for x in SAVED_ATTRS:
data[x]=getattr(self,x)

View File

@ -1,7 +1,7 @@
{ stdenv, fetchurl, buildPythonPackage, python, pkgconfig, glib, gobjectIntrospection, pycairo, cairo, which, ncurses}:
buildPythonPackage rec {
major = "3.24";
major = "3.26";
minor = "1";
version = "${major}.${minor}";
format = "other";
@ -10,7 +10,7 @@ buildPythonPackage rec {
src = fetchurl {
url = "mirror://gnome/sources/pygobject/${major}/${name}.tar.xz";
sha256 = "1zdzznrj2s1gsrv2z4r0n88fzba8zjc1n2r313xi77lhl1daja56";
sha256 = "1afi0jdjd9sanrzjwhv7z1k7qxlb91fqa6yqc2dbpjkhkjdpnmzm";
};
outputs = [ "out" "dev" ];
@ -21,7 +21,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [ pycairo cairo ];
meta = {
homepage = http://live.gnome.org/PyGObject;
homepage = https://pygobject.readthedocs.io/;
description = "Python bindings for Glib";
platforms = stdenv.lib.platforms.unix;
};