lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

pythonPackages.pycairo: 1.10.0 → 1.15.4

+17 -49
+17 -39
pkgs/development/python-modules/pycairo/default.nix
··· 1 - { lib, fetchurl, fetchpatch, python, buildPythonPackage, pkgconfig, cairo, xlibsWrapper, isPyPy, isPy35, isPy36, isPy3k }: 2 - 3 - if (isPyPy) then throw "pycairo not supported for interpreter ${python.executable}" else let 4 - 5 - patch_waf = fetchpatch { 6 - url = http://www.linuxfromscratch.org/patches/blfs/8.0/pycairo-1.10.0-waf_python_3_4-1.patch; 7 - sha256 = "0xfl1i9dips2nykyg91f5h5r3xpk2hp1js1gq5z0hwjr0in55id4"; 8 - }; 9 - patch_waf-py3_5 = ./waf-py3_5.patch; 1 + { lib, fetchFromGitHub, python, buildPythonPackage, pytest, pkgconfig, cairo, xlibsWrapper, isPyPy }: 10 2 11 - in buildPythonPackage rec { 3 + buildPythonPackage rec { 12 4 pname = "pycairo"; 13 - version = "1.10.0"; 5 + version = "1.15.4"; 14 6 name = "${pname}-${version}"; 15 - format = "other"; 16 7 17 - src = if isPy3k 18 - then fetchurl { 19 - url = "http://cairographics.org/releases/pycairo-${version}.tar.bz2"; 20 - sha256 = "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s"; 21 - } 22 - else fetchurl { 23 - url = "http://cairographics.org/releases/py2cairo-${version}.tar.bz2"; 24 - sha256 = "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k"; 25 - }; 8 + disabled = isPyPy; 26 9 27 - patches = [ 28 - (fetchpatch { 29 - url = http://www.linuxfromscratch.org/patches/blfs/8.0/pycairo-1.10.0-waf_unpack-1.patch; 30 - sha256 = "1bmrhq2nmhx4l5glvyi59r0hc7w5m56kz41frx7v3dcp8f91p7xd"; 31 - }) 32 - ]; 10 + src = fetchFromGitHub { 11 + owner = "pygobject"; 12 + repo = "pycairo"; 13 + rev = "v${version}"; 14 + sha256 = "02vzmfxx8nl6dbwzc911wcj7hqspgqz6v9xmq6579vwfla0vaglv"; 15 + }; 16 + 17 + postPatch = '' 18 + # we are unable to pass --prefix to bdist_wheel 19 + # see https://github.com/NixOS/nixpkgs/pull/32034#discussion_r153285955 20 + substituteInPlace setup.py --replace '"prefix": self.install_base' "'prefix': '$out'" 21 + ''; 33 22 34 23 nativeBuildInputs = [ pkgconfig ]; 35 24 buildInputs = [ python cairo xlibsWrapper ]; 36 - 37 - configurePhase = '' 38 - ( 39 - cd $(${python.executable} waf unpack) 40 - patch -p1 < ${patch_waf} 41 - ${lib.optionalString (isPy35 || isPy36) "patch -p1 < ${patch_waf-py3_5}"} 42 - ) 43 - 44 - ${python.executable} waf configure --prefix=$out 45 - ''; 46 - buildPhase = "${python.executable} waf"; 47 - installPhase = "${python.executable} waf install"; 25 + checkInputs = [ pytest ]; 48 26 49 27 meta.platforms = lib.platforms.linux ++ lib.platforms.darwin; 50 28 }
-10
pkgs/development/python-modules/pycairo/waf-py3_5.patch
··· 1 - --- a/waflib/Build.py 2 - +++ b/waflib/Build.py 3 - @@ -151,6 +151,7 @@ class BuildContext(Context.Context): 4 - f.close() 5 - self.init_dirs() 6 - def store(self): 7 - + return 8 - data={} 9 - for x in SAVED_ATTRS: 10 - data[x]=getattr(self,x)