Merge master into staging-next

This commit is contained in:
Frederik Rietdijk
2019-08-02 09:18:37 +02:00
104 changed files with 9648 additions and 15712 deletions

View File

@@ -1,11 +1,16 @@
{ lib
{ blessed
, buildPythonPackage
, fetchPypi
, pythonOlder
, lib
, libcxx
, libcxxabi
, llvm
, typesentry
, blessed
, openmp
, pytest
, pythonOlder
, stdenv
, substituteAll
, typesentry
}:
buildPythonPackage rec {
@@ -17,10 +22,25 @@ buildPythonPackage rec {
sha256 = "1s8z81zffrckvdwrrl0pkjc7gsdvjxw59xgg6ck81dl7gkh5grjk";
};
patches = [
# Disable the compiler monkey patching, and remove the task that's copying
# the native dependencies to the build directory.
./remove-compiler-monkeypatch_disable-native-relocation.patch
] ++ lib.optionals stdenv.isDarwin [
# Replace the library auto-detection with hardcoded paths.
(substituteAll {
src = ./hardcode-library-paths.patch;
libomp_dylib = "${lib.getLib openmp}/lib/libomp.dylib";
libcxx_dylib = "${lib.getLib libcxx}/lib/libc++.1.dylib";
libcxxabi_dylib = "${lib.getLib libcxxabi}/lib/libc++abi.dylib";
})
];
disabled = pythonOlder "3.5";
propagatedBuildInputs = [ typesentry blessed ];
buildInputs = [ llvm ];
buildInputs = [ llvm ] ++ lib.optionals stdenv.isDarwin [ openmp ];
checkInputs = [ pytest ];
LLVM = llvm;

View File

@@ -0,0 +1,43 @@
diff --git a/ci/setup_utils.py b/ci/setup_utils.py
index 66b385a..6255af0 100644
--- a/ci/setup_utils.py
+++ b/ci/setup_utils.py
@@ -600,37 +600,7 @@ def find_linked_dynamic_libraries():
them as a list of absolute paths.
"""
with TaskContext("Find the required dynamic libraries") as log:
- llvm = get_llvm()
- libs = required_link_libraries()
- resolved = []
- for libname in libs:
- if llvm:
- fullpath = os.path.join(llvm, "lib", libname)
- if os.path.isfile(fullpath):
- resolved.append(fullpath)
- log.info("Library `%s` found at %s" % (libname, fullpath))
- continue
- else:
- log.info("%s does not exist" % fullpath)
- # Rely on the shell `locate` command to find the dynamic libraries.
- proc = subprocess.Popen(["locate", libname], stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- stdout, stderr = proc.communicate()
- if proc.returncode == 0:
- results = stdout.decode().strip().split("\n")
- results = [r for r in results if r]
- if results:
- results.sort(key=len)
- fullpath = results[0]
- assert os.path.isfile(fullpath), "Invalid path: %r" % (fullpath,)
- resolved.append(fullpath)
- log.info("Library `%s` found at %s" % (libname, fullpath))
- continue
- else:
- log.fatal("Cannot locate dynamic library `%s`" % libname)
- else:
- log.fatal("`locate` command returned the following error:\n%s"
- % stderr.decode())
+ resolved = ["@libomp_dylib@", "@libcxx_dylib@", "@libcxxabi_dylib@"]
return resolved

View File

@@ -0,0 +1,28 @@
diff --git a/setup.py b/setup.py
index 58fc875..8032561 100644
--- a/setup.py
+++ b/setup.py
@@ -141,23 +141,6 @@ if cmd in ("build", "bdist_wheel", "build_ext", "install"):
extra_link_args = get_extra_link_args()
cpp_files = get_c_sources("c")
- with TaskContext("Copy dynamic libraries") as log:
- # Copy system libraries into the datatable/lib folder, so that they can
- # be packaged with the wheel
- libs = find_linked_dynamic_libraries()
- for libpath in libs:
- trgfile = os.path.join("datatable", "lib",
- os.path.basename(libpath))
- if os.path.exists(trgfile):
- log.info("File %s already exists, skipped" % trgfile)
- else:
- log.info("Copying %s to %s" % (libpath, trgfile))
- shutil.copy(libpath, trgfile)
-
- if ismacos():
- monkey_patch_compiler()
-
-
# Create the git version file
if cmd in ("build", "sdist", "bdist_wheel", "install"):
make_git_version_file(True)

View File

@@ -4,13 +4,13 @@
buildPythonPackage rec {
pname = "mysql-connector";
version = "8.0.16";
version = "8.0.17";
src = fetchFromGitHub {
owner = "mysql";
repo = "mysql-connector-python";
rev = version;
sha256 = "0yl3fkyws24lc2qrbvn42bqy72aqy8q5v8f0j5zy3mkh9a7wlxdp";
sha256 = "1by0g7hrbmb1wj2wh3q9y92mjimck2izh1i4fm1xfbp278p2acbd";
};
propagatedBuildInputs = [ protobuf ];

View File

@@ -0,0 +1,33 @@
{ lib
, buildPythonPackage
, botocore
, fetchPypi
, mock
, mypy
, python-dateutil
, pytest
, requests
}:
buildPythonPackage rec {
pname = "pynamodb";
version = "3.4.1";
src = fetchPypi {
inherit pname version;
sha256 = "1cwgqvpqn59y3zq4wv35m1v4jrh3ih6zbyv30g5nxbw13vddxr92";
};
propagatedBuildInputs = [ python-dateutil botocore ];
checkInputs = [ requests mock pytest mypy ];
meta = with lib; {
description = "A Pythonic interface for Amazons DynamoDB that supports Python 2 and 3.";
longDescription = ''
DynamoDB is a great NoSQL service provided by Amazon, but the API is
verbose. PynamoDB presents you with a simple, elegant API.
'';
homepage = "http://jlafon.io/pynamodb.html";
license = licenses.mit;
};
}

View File

@@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchPypi, python, pkgs, pythonOlder, substituteAll
{ lib, buildPythonPackage, fetchFromGitHub, python, pkgs, pythonOlder, substituteAll
, aenum
, cython
, pytest
@@ -8,11 +8,13 @@
buildPythonPackage rec {
pname = "pyproj";
version = "2.2.1";
version = "2.2.2";
src = fetchPypi {
inherit pname version;
sha256 = "0yigcxwmx5cczipf2mpmy2gq1dnl0635yjvjq86ay47j1j5fd2gc";
src = fetchFromGitHub {
owner = "pyproj4";
repo = "pyproj";
rev = "v${version}rel";
sha256 = "0mb0jczgqh3sma69k7237i38h09gxgmvmddls9hpw4f3131f5ax7";
};
# force pyproj to use ${pkgs.proj}

View File

@@ -1,18 +1,20 @@
{ fetchPypi, buildPythonPackage }:
{ lib, fetchPypi, buildPythonPackage }:
buildPythonPackage rec {
pname = "redis";
version = "3.1.0";
version = "3.3.4";
src = fetchPypi {
inherit pname version;
sha256 = "7ba8612bbfd966dea8c62322543fed0095da2834dbd5a7c124afbc617a156aa7";
sha256 = "18n6k113izfqsm8yysrw1a5ba6kv0vsgfz6ab5n0k6k65yvr690z";
};
# tests require a running redis
doCheck = false;
meta = {
meta = with lib; {
description = "Python client for Redis key-value store";
homepage = "https://pypi.python.org/pypi/redis/";
license = with licenses; [ mit ];
};
}

View File

@@ -25,18 +25,16 @@
buildPythonPackage rec {
pname = "spacy";
version = "2.1.6";
version = "2.1.7";
src = fetchPypi {
inherit pname version;
sha256 = "1s0a0vir9lg5q8n832kkadbajb4i4zl20zmdg3g20qlp4mcbn25p";
sha256 = "0k4kh9jnpdawaqjxwcdi2h01s85s5r338ajgv9kkq59iha4hichh";
};
prePatch = ''
substituteInPlace setup.py \
--replace "plac<1.0.0,>=0.9.6" "plac>=0.9.6" \
--replace "regex==" "regex>=" \
--replace "wheel>=0.32.0,<0.33.0" "wheel>=0.32.0"
--replace "plac<1.0.0,>=0.9.6" "plac>=0.9.6"
'';
propagatedBuildInputs = [

View File

@@ -30,8 +30,6 @@ buildPythonPackage rec {
sha256 = "50402545ac92b1a931c2365e341cb35c4ebe5575525f1dcc5265901ff3895a5f";
};
disabled = isPy27; # 2.7 requires backports.csv
propagatedBuildInputs = [
cachetools
cld2-cffi
@@ -64,5 +62,8 @@ buildPythonPackage rec {
homepage = "http://textacy.readthedocs.io/";
license = licenses.asl20;
maintainers = with maintainers; [ rvl ];
# ftfy and jellyfish no longer support python2
# latest scikitlearn not supported for this: https://github.com/chartbeat-labs/textacy/issues/260
broken = true;
};
}

View File

@@ -3,11 +3,11 @@
buildPythonPackage rec {
pname = "zstd";
version = "1.4.0.0";
version = "1.4.1.0";
src = fetchPypi {
inherit pname version;
sha256 = "01prq9rwz1gh42idnj2162w79dzs8gf3ac8pn12lz347w280kjbk";
sha256 = "0laxg0pag1bzmqmg4x81jb32412pn98p9zg2b0li035m779nka95";
};
postPatch = ''