Unverified Commit 0dbfd0e7 authored by Robert Schütz's avatar Robert Schütz Committed by GitHub
Browse files

Merge pull request #56312 from costrouc/python-unstable

Fixes several broken python packages for python-unstable
parents 8dccb065 8effff1d
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
{ stdenv
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
@@ -15,24 +15,28 @@

buildPythonPackage rec {
  pname = "gidgethub";
  version = "3.0.0";
  format = "flit";
  version = "3.1.0";

  disabled = pythonOlder "3.6";

  src = fetchPypi {
    inherit pname version;
    sha256 = "1ebe79cf80ad64cb78c880efc7f30ac664e18b80dfd18ee201bf8685cf029628";
    sha256 = "52119435ba73ddd5e697dae7bec8b93a048bc738720b81691ebd4b4d81d2d762";
  };

  buildInputs = [ setuptools pytestrunner ];
  nativeBuildInputs = [ setuptools pytestrunner ];
  checkInputs = [ pytest pytest-asyncio twisted treq tornado aiohttp ];
  propagatedBuildInputs = [ uritemplate ];

  postPatch = ''
    substituteInPlace setup.py \
      --replace "extras_require=extras_require," "extras_require=None,"
  '';

  # requires network (reqests github.com)
  doCheck = false;

  meta = with stdenv.lib; {
  meta = with lib; {
    description = "An async GitHub API library";
    homepage = https://github.com/brettcannon/gidgethub;
    license = licenses.asl20;
+15 −3
Original line number Diff line number Diff line
{ stdenv, buildPythonPackage, fetchPypi
, six, requests-cache, pygments, pyquery }:
{ lib
, buildPythonPackage
, fetchPypi
, six
, requests-cache
, pygments
, pyquery
, python
}:

buildPythonPackage rec {
  pname = "howdoi";
@@ -12,9 +19,14 @@ buildPythonPackage rec {

  propagatedBuildInputs = [ six requests-cache pygments pyquery ];

  meta = with stdenv.lib; {
  preCheck = ''
    export HOME=$(mktemp -d)
  '';

  meta = with lib; {
    description = "Instant coding answers via the command line";
    homepage = https://pypi.python.org/pypi/howdoi;
    license = licenses.mit;
    maintainers = [ maintainers.costrouc ];
  };
}
+22 −14
Original line number Diff line number Diff line
{ stdenv, buildPythonPackage, fetchFromGitHub, nose, numpy, six, ruamel_yaml, msgpack-python, coverage, coveralls, pymongo, lsof }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, nose
, numpy
, six
, ruamel_yaml
, msgpack-python
, coverage
, coveralls
, pymongo
, lsof
}:

buildPythonPackage rec {
  pname = "monty";
  version = "1.0.2";
  version = "1.0.4";

  # No tests in Pypi
  src = fetchFromGitHub {
    owner = "materialsvirtuallab";
    repo = pname;
    rev = "v${version}";
    sha256 = "0ss70fanavqdpj56yymj06lacgnknb4ap39m2q28v9lz32cs6xdg";
    sha256 = "0vqaaz0dw0ypl6sfwbycpb0qs3ap04c4ghbggklxih66spdlggh6";
  };

  propagatedBuildInputs = [ nose numpy six ruamel_yaml msgpack-python coverage coveralls pymongo lsof ];
  checkInputs = [ lsof nose numpy msgpack-python coverage coveralls pymongo];
  propagatedBuildInputs = [ six ruamel_yaml ];

  preCheck = ''
    substituteInPlace tests/test_os.py \
      --replace 'def test_which(self):' '#' \
      --replace 'py = which("python")' '#' \
      --replace 'self.assertEqual(os.path.basename(py), "python")' '#' \
      --replace 'self.assertEqual("/usr/bin/find", which("/usr/bin/find"))' '#' \
      --replace 'self.assertIs(which("non_existent_exe"), None)' '#' \
      --replace 'self.assertEqual("/usr/bin/find", which("/usr/bin/find"))' '#'
  '';

  meta = with stdenv.lib; {
  meta = with lib; {
    description = "Serves as a complement to the Python standard library by providing a suite of tools to solve many common problems";
    longDescription = "
      Monty implements supplementary useful functions for Python that are not part of the
@@ -35,4 +44,3 @@ buildPythonPackage rec {
    maintainers = with maintainers; [ psyanticy ];
  };
}
+9 −3
Original line number Diff line number Diff line
{ stdenv
{ lib
, buildPythonPackage
, fetchPypi
, isPy27
, funcsigs
}:

buildPythonPackage rec {
@@ -8,14 +10,18 @@ buildPythonPackage rec {
  version = "0.9";

  src = fetchPypi {
    inherit pname version;
    inherit version;
    pname = "Pint";
    sha256 = "32d8a9a9d63f4f81194c0014b3b742679dce81a26d45127d9810a68a561fe4e2";
  };

  meta = with stdenv.lib; {
  propagatedBuildInputs = lib.optional isPy27 funcsigs;

  meta = with lib; {
    description = "Physical quantities module";
    license = licenses.bsd3;
    homepage = "https://github.com/hgrecco/pint/";
    maintainers = [ maintainers.costrouc ];
  };

}
+22 −7
Original line number Diff line number Diff line
{ stdenv, buildPythonPackage, fetchFromGitHub, pytest, libsodium, cffi, six, hypothesis}:
{ stdenv
, buildPythonPackage
, fetchPypi
, pytest
, libsodium
, cffi
, six
, hypothesis
}:

buildPythonPackage rec {
  pname = "pynacl";
  version = "1.3.0";

  src = fetchFromGitHub {
    owner = "pyca";
    repo = pname;
    rev = version;
    sha256 = "0ac00d5bfdmz1x428h2scq5b34llp61yhxradl94qjwz7ikqv052";
  src = fetchPypi {
    inherit version;
    pname = "PyNaCl";
    sha256 = "0c6100edd16fefd1557da078c7a31e7b7d7a52ce39fdca2bec29d4f7b6e7600c";
  };

  checkInputs = [ pytest hypothesis ];
  propagatedBuildInputs = [ libsodium cffi six ];
  buildInputs = [ libsodium ];
  propagatedBuildInputs = [ cffi six ];

  SODIUM_INSTALL = "system";

  # fixed in next release 1.3.0+
  # https://github.com/pyca/pynacl/pull/480
  postPatch = ''
    substituteInPlace tests/test_bindings.py \
      --replace "average_size=128," ""
  '';

  checkPhase = ''
    py.test
  '';
Loading