Merge branch 'master' into staging

This commit is contained in:
Vladimír Čunát
2016-11-15 00:20:19 +01:00
286 changed files with 7730 additions and 4394 deletions

View File

@@ -0,0 +1,50 @@
{ stdenv
, fetchurl
, buildPythonPackage
, python
, llvm
, pythonOlder
, isPyPy
, enum34
}:
buildPythonPackage rec {
pname = "llvmlite";
name = "${pname}-${version}";
version = "0.14.0";
disabled = isPyPy;
src = fetchurl {
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
sha256 = "1ybgsmvamj0i51dvrn268ziczpm63y2h4sgagf6fkgkpydrr01g8";
};
propagatedBuildInputs = [ llvm ] ++ stdenv.lib.optional (pythonOlder "3.4") enum34;
# Disable static linking
# https://github.com/numba/llvmlite/issues/93
patchPhase = ''
substituteInPlace ffi/Makefile.linux --replace "-static-libstdc++" ""
substituteInPlace llvmlite/tests/test_binding.py --replace "test_linux" "nope"
'';
# Set directory containing llvm-config binary
preConfigure = ''
export LLVM_CONFIG=${llvm}/bin/llvm-config
'';
checkPhase = ''
${python.executable} runtests.py
'';
__impureHostDeps = stdenv.lib.optionals stdenv.isDarwin [ "/usr/lib/libm.dylib" ];
passthru.llvm = llvm;
meta = {
description = "A lightweight LLVM python binding for writing JIT compilers";
homepage = "http://llvmlite.pydata.org/";
license = stdenv.lib.licenses.bsd2;
maintainers = with stdenv.lib.maintainers; [ fridh ];
};
}

View File

@@ -0,0 +1,43 @@
{ stdenv
, fetchurl
, python
, buildPythonPackage
, isPy27
, isPy33
, isPy3k
, numpy
, llvmlite
, argparse
, funcsigs
, singledispatch
, libcxx
}:
buildPythonPackage rec {
version = "0.29.0";
name = "numba-${version}";
src = fetchurl {
url = "mirror://pypi/n/numba/${name}.tar.gz";
sha256 = "00ae294f3fb3a99e8f0a9f568213cebed26675bacc9c6f8d2e025b6d564e460d";
};
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1";
propagatedBuildInputs = [numpy llvmlite argparse] ++ stdenv.lib.optional (!isPy3k) funcsigs ++ stdenv.lib.optional (isPy27 || isPy33) singledispatch;
# Copy test script into $out and run the test suite.
checkPhase = ''
cp runtests.py $out/${python.sitePackages}/numba/runtests.py
${python.interpreter} $out/${python.sitePackages}/numba/runtests.py
'';
# ImportError: cannot import name '_typeconv'
doCheck = false;
meta = {
homepage = http://numba.pydata.org/;
license = stdenv.lib.licenses.bsd2;
description = "Compiling Python code using LLVM";
maintainers = with stdenv.lib.maintainers; [ fridh ];
};
}

View File

@@ -1,4 +1,5 @@
{ buildPythonPackage
, fetchurl
, fetchFromGitHub
, boost
, numpy
@@ -12,6 +13,7 @@
, mkDerivation
, stdenv
, pythonOlder
, isPy35
}:
let
compyte = import ./compyte.nix {
@@ -19,22 +21,21 @@ let
};
in
buildPythonPackage rec {
name = "pycuda-${version}";
version = "2016.1";
pname = "pycuda";
version = "2016.1.2";
name = "${pname}-${version}";
src = fetchFromGitHub {
owner = "inducer";
repo = "pycuda";
rev = "609817e22c038249f5e9ddd720b3ca5a9d58ca11";
sha256 = "0kg6ayxsw2gja9rqspy6z8ihacf9jnxr8hzywjwmj1izkv24cff7";
};
src = fetchurl {
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
sha256 = "0dvf1cnrlvmrc7i100n2ndrnd7fjm7aq3wpmk2nx5h7hwb3xmnx7";
};
preConfigure = ''
findInputs ${boost.dev} boost_dirs propagated-native-build-inputs
export BOOST_INCLUDEDIR=$(echo $boost_dirs | sed -e s/\ /\\n/g - | grep '\-dev')/include
export BOOST_LIBRARYDIR=$(echo $boost_dirs | sed -e s/\ /\\n/g - | grep -v '\-dev')/lib
${python.interpreter} configure.py --boost-inc-dir=$BOOST_INCLUDEDIR \
--boost-lib-dir=$BOOST_LIBRARYDIR \
--no-use-shipped-boost \
@@ -45,7 +46,12 @@ buildPythonPackage rec {
ln -s ${compyte} $out/${python.sitePackages}/pycuda/compyte
'';
doCheck = pythonOlder "3.5";
# Requires access to libcuda.so.1 which is provided by the driver
doCheck = false;
checkPhase = ''
py.test
'';
propagatedBuildInputs = [
numpy

View File

@@ -0,0 +1,39 @@
{ stdenv
, fetchurl
, buildPythonPackage
, Mako
, pytest
, numpy
, cffi
, pytools
, decorator
, appdirs
, six
, opencl-headers
, opencl-icd
}:
buildPythonPackage rec {
pname = "pyopencl";
version = "2016.2";
name = "${pname}-${version}";
buildInputs = [ pytest opencl-headers opencl-icd ];
propagatedBuildInputs = [ numpy cffi pytools decorator appdirs six Mako ];
src = fetchurl {
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
sha256 = "1b94540cf59ea71a3ef234a8f1d0eb2b4633c112f0f554fb69e52b4a0337d82b";
};
# gcc: error: pygpu_language_opencl.cpp: No such file or directory
doCheck = false;
meta = {
description = "Python wrapper for OpenCL";
homepage = https://github.com/pyopencl/pyopencl;
license = stdenv.lib.licenses.mit;
maintainer = stdenv.lib.maintainers.fridh;
};
}

View File

@@ -0,0 +1,45 @@
{ stdenv
, fetchurl
, buildPythonPackage
, sphinx
, pytestcov
, pytest
, Mako
, numpy
, funcsigs
, withCuda ? false, pycuda
, withOpenCL ? true, pyopencl
}:
buildPythonPackage rec {
pname = "reikna";
name = "${pname}-${version}";
version = "0.6.7";
src = fetchurl {
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
sha256 = "810b349eb9339aa0d13bca99a3d8a380972708474b8c0990d188ec6074358d62";
};
buildInputs = [ sphinx pytestcov pytest ];
propagatedBuildInputs = [ Mako numpy funcsigs ]
++ stdenv.lib.optional withCuda pycuda
++ stdenv.lib.optional withOpenCL pyopencl;
checkPhase = ''
py.test
'';
# Requires device
doCheck = false;
meta = {
description = "GPGPU algorithms for PyCUDA and PyOpenCL";
homepage = http://github.com/fjarri/reikna;
license = stdenv.lib.licenses.mit;
maintainer = stdenv.lib.maintainers.fridh;
};
}