Merge branch 'master' into staging
There's been a mass rebuild on master due to python2 update.
This commit is contained in:
91
pkgs/development/python-modules/pandas/default.nix
Normal file
91
pkgs/development/python-modules/pandas/default.nix
Normal file
@@ -0,0 +1,91 @@
|
||||
{ buildPythonPackage
|
||||
, python
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, nose
|
||||
, glibcLocales
|
||||
, cython
|
||||
, dateutil
|
||||
, scipy
|
||||
, numexpr
|
||||
, pytz
|
||||
, xlrd
|
||||
, bottleneck
|
||||
, sqlalchemy
|
||||
, lxml
|
||||
, html5lib
|
||||
, beautifulsoup4
|
||||
, openpyxl
|
||||
, tables
|
||||
, xlwt
|
||||
, darwin ? {}
|
||||
, libcxx ? null
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (stdenv.lib) optional optionalString concatStringsSep;
|
||||
inherit (stdenv) isDarwin;
|
||||
in buildPythonPackage rec {
|
||||
pname = "pandas";
|
||||
version = "0.19.2";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
|
||||
sha256 = "6f0f4f598c2b16746803c8bafef7c721c57e4844da752d36240c0acf97658014";
|
||||
};
|
||||
|
||||
LC_ALL = "en_US.UTF-8";
|
||||
buildInputs = [ nose glibcLocales ] ++ optional isDarwin libcxx;
|
||||
propagatedBuildInputs = [
|
||||
cython
|
||||
dateutil
|
||||
scipy
|
||||
numexpr
|
||||
pytz
|
||||
xlrd
|
||||
bottleneck
|
||||
sqlalchemy
|
||||
lxml
|
||||
html5lib
|
||||
beautifulsoup4
|
||||
openpyxl
|
||||
tables
|
||||
xlwt
|
||||
] ++ optional isDarwin darwin.locale; # provides the locale command
|
||||
|
||||
# For OSX, we need to add a dependency on libcxx, which provides
|
||||
# `complex.h` and other libraries that pandas depends on to build.
|
||||
patchPhase = optionalString isDarwin ''
|
||||
cpp_sdk="${libcxx}/include/c++/v1";
|
||||
echo "Adding $cpp_sdk to the setup.py common_include variable"
|
||||
substituteInPlace setup.py \
|
||||
--replace "['pandas/src/klib', 'pandas/src']" \
|
||||
"['pandas/src/klib', 'pandas/src', '$cpp_sdk']"
|
||||
|
||||
# disable clipboard tests since pbcopy/pbpaste are not open source
|
||||
substituteInPlace pandas/io/tests/test_clipboard.py \
|
||||
--replace pandas.util.clipboard no_such_module \
|
||||
--replace OSError ImportError
|
||||
'';
|
||||
|
||||
# The flag `-A 'not network'` will disable tests that use internet.
|
||||
# The `-e` flag disables a few problematic tests.
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
# The flag `-w` provides the initial directory to search for tests.
|
||||
# The flag `-A 'not network'` will disable tests that use internet.
|
||||
nosetests -w $out/${python.sitePackages}/pandas --no-path-adjustment -A 'not slow and not network' --stop \
|
||||
--verbosity=3
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "http://pandas.pydata.org/";
|
||||
description = "Python Data Analysis Library";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = with stdenv.lib.maintainers; [ raskin fridh ];
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
31
pkgs/development/python-modules/pytest-expect/default.nix
Normal file
31
pkgs/development/python-modules/pytest-expect/default.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ buildPythonPackage
|
||||
, lib
|
||||
, fetchurl
|
||||
, pytest
|
||||
, u-msgpack-python
|
||||
, six
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "pytest-expect";
|
||||
version = "1.1.0";
|
||||
in buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
|
||||
sha256 = "36b4462704450798197d090809a05f4e13649d9cba9acdc557ce9517da1fd847";
|
||||
};
|
||||
|
||||
buildInputs = [ pytest ];
|
||||
propagatedBuildInputs = [ u-msgpack-python six ];
|
||||
|
||||
# Tests in neither the archive nor the repo
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "py.test plugin to store test expectations and mark tests based on them";
|
||||
homepage = https://github.com/gsnedders/pytest-expect;
|
||||
license = lib.licenses.mit;
|
||||
};
|
||||
}
|
||||
33
pkgs/development/python-modules/u-msgpack-python/default.nix
Normal file
33
pkgs/development/python-modules/u-msgpack-python/default.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ buildPythonPackage
|
||||
, lib
|
||||
, fetchurl
|
||||
, glibcLocales
|
||||
, python
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "u-msgpack-python";
|
||||
version = "2.3.0";
|
||||
in buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
|
||||
sha256 = "d8df6bb0e2a838aa227c39cfd14aa147ab32b3df6871001874e9b9da9ce1760c";
|
||||
};
|
||||
|
||||
LC_ALL="en_US.UTF-8";
|
||||
|
||||
buildInputs = [ glibcLocales ];
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} -m unittest discover
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A portable, lightweight MessagePack serializer and deserializer written in pure Python";
|
||||
homepage = https://github.com/vsergeev/u-msgpack-python;
|
||||
license = lib.licenses.mit;
|
||||
};
|
||||
|
||||
}
|
||||
29
pkgs/development/python-modules/webencodings/default.nix
Normal file
29
pkgs/development/python-modules/webencodings/default.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{ buildPythonPackage
|
||||
, lib
|
||||
, fetchurl
|
||||
, pytest
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "webencodings";
|
||||
version = "0.5";
|
||||
in buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
|
||||
sha256 = "a5c55ee93b24e740fe951c37b5c228dccc1f171450e188555a775261cce1b904";
|
||||
};
|
||||
|
||||
buildInputs = [ pytest ];
|
||||
|
||||
checkPhase = ''
|
||||
py.test webencodings/tests.py
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Character encoding aliases for legacy web content";
|
||||
homepage = https://github.com/SimonSapin/python-webencodings;
|
||||
license = lib.licenses.bsd3;
|
||||
};
|
||||
}
|
||||
36
pkgs/development/python-modules/xlwt/default.nix
Normal file
36
pkgs/development/python-modules/xlwt/default.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{ buildPythonPackage
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, nose
|
||||
, lib
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "xlwt";
|
||||
name = "${pname}-${version}";
|
||||
version = "1.1.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
|
||||
sha256 = "aed648c17731f40f84550dd2a1aaa53569f0cbcaf5610ba895cd2632587b723c";
|
||||
};
|
||||
|
||||
# re.LOCALE was removed in Python 3.6
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/python-excel/xlwt/commit/86564ef26341020316cd8a27c704ef1dc5a6129b.patch";
|
||||
sha256 = "0ifavfld3rrqjb0iyriy4c0drw31gszvlg3nmnn9dmfsh91vxhs6";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [ nose ];
|
||||
checkPhase = ''
|
||||
nosetests -v
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Library to create spreadsheet files compatible with MS";
|
||||
homepage = https://github.com/python-excel/xlwt;
|
||||
license = with lib.licenses; [ bsdOriginal bsd3 lgpl21 ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user