Merge pull request #37094 from timokau/conan-improvement

conan: Locally pin deps, enable tests
This commit is contained in:
Robert Schütz 2018-03-15 13:54:43 +01:00 committed by GitHub
commit b239b00c48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 46 additions and 69 deletions

View File

@ -1,26 +0,0 @@
{ stdenv, fetchPypi, buildPythonPackage, pytest, pytestcov, tox }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "distro";
version = "1.1.0";
buildInputs = [ pytest pytestcov tox];
checkPhase = ''
touch tox.ini
tox
'';
src = fetchPypi {
inherit pname version;
sha256 = "1vn1db2akw98ybnpns92qi11v94hydwp130s8753k6ikby95883j";
};
meta = with stdenv.lib; {
homepage = https://github.com/nir0s/distro;
description = "Linux Distribution - a Linux OS platform information API.";
license = licenses.asl20;
maintainers = with maintainers; [ nand0p ];
};
}

View File

@ -1,7 +1,6 @@
{ stdenv, fetchPypi, buildPythonPackage, pytest, pytestcov, tox }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "distro";
version = "1.2.0";

View File

@ -1,21 +0,0 @@
{ stdenv, fetchPypi, buildPythonPackage, pytest, tox }:
buildPythonPackage rec {
name = "${pname}-${version}";
version = "0.2.0";
pname = "node-semver";
buildInputs = [ pytest tox ];
src = fetchPypi {
inherit pname version;
sha256 = "1080pdxrvnkr8i7b7bk0dfx6cwrkkzzfaranl7207q6rdybzqay3";
};
meta = with stdenv.lib; {
homepage = https://github.com/podhmo/python-semver;
description = "A port of node-semver";
license = licenses.mit;
platforms = platforms.all;
};
}

View File

@ -1,7 +1,6 @@
{ stdenv, fetchPypi, buildPythonPackage, pytest, tox }:
buildPythonPackage rec {
name = "${pname}-${version}";
version = "0.3.0";
pname = "node-semver";

View File

@ -1,29 +1,59 @@
{ lib, buildPythonApplication, fetchPypi
, requests, fasteners, pyyaml, pyjwt, colorama, patch
, bottle, pluginbase, six, distro11, pylint, node-semver2
, future, pygments, mccabe
, fetchpatch
}:
{ lib, fetchpatch, python }:
buildPythonApplication rec {
version = "1.1.1";
let newPython = python.override {
packageOverrides = self: super: {
distro = super.distro.overridePythonAttrs (oldAttrs: rec {
version = "1.1.0";
src = oldAttrs.src.override {
inherit version;
sha256 = "1vn1db2akw98ybnpns92qi11v94hydwp130s8753k6ikby95883j";
};
});
node-semver = super.node-semver.overridePythonAttrs (oldAttrs: rec {
version = "0.2.0";
src = oldAttrs.src.override {
inherit version;
sha256 = "1080pdxrvnkr8i7b7bk0dfx6cwrkkzzfaranl7207q6rdybzqay3";
};
});
};
};
in newPython.pkgs.buildPythonApplication rec {
version = "1.1.1"; # remove patch below when updating
pname = "conan";
src = fetchPypi {
src = newPython.pkgs.fetchPypi {
inherit pname version;
sha256 = "1k1r401bc9fgmhd5n5f29mjcn346r3zdrm7p28nwpr2r2p3fslrl";
};
propagatedBuildInputs = [
checkInputs = with newPython.pkgs; [
nose
parameterized
mock
webtest
codecov
];
propagatedBuildInputs = with newPython.pkgs; [
requests fasteners pyyaml pyjwt colorama patch
bottle pluginbase six distro11 pylint node-semver2
bottle pluginbase six distro pylint node-semver
future pygments mccabe
];
# enable tests once all of these pythonPackages available:
# [ nose nose_parameterized mock webtest codecov ]
# update 2018-03-11: only nose_parameterized is missing
doCheck = false;
patches = [
# already merged, remove with the next package update
(fetchpatch {
url = "https://github.com/conan-io/conan/commit/51cc4cbd51ac8f9b9efa2bf678a2d7810e273ff3.patch";
sha256 = "0d93g4hjpfk8z870imwdswkw5qba2h5zhfgwwijiqhr2pv7fl1y7";
})
];
preCheck = ''
export HOME="$TMP/conan-home"
mkdir -p "$HOME"
'';
meta = with lib; {
homepage = https://conan.io;

View File

@ -7589,7 +7589,7 @@ with pkgs;
complexity = callPackage ../development/tools/misc/complexity { };
conan = pythonPackages.callPackage ../development/tools/build-managers/conan { };
conan = callPackage ../development/tools/build-managers/conan { };
cookiecutter = pythonPackages.cookiecutter;

View File

@ -20953,12 +20953,8 @@ EOF
node-semver = callPackage ../development/python-modules/node-semver { };
node-semver2 = callPackage ../development/python-modules/node-semver/2.nix { };
distro = callPackage ../development/python-modules/distro { };
distro11 = callPackage ../development/python-modules/distro/11.nix { };
bz2file = callPackage ../development/python-modules/bz2file { };
smart_open = callPackage ../development/python-modules/smart_open { };