Skip to content
Snippets Groups Projects
Commit 2586dc50 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

maybe a typing downgrade is easier

other approach fails because we cannot upgrade pytest to fix attrs
incompatiblity because pytest has dropped python 2.7 support in 5.x series
parent 03ee6d72
No related branches found
No related tags found
1 merge request!35An assortment of packaging fixes
......@@ -5,18 +5,20 @@ self: super: {
python27 = super.python27.override {
packageOverrides = python-self: python-super: {
# A newer version of Hypothesis is required for compatibility with the
# typing module which gets pulled in by some dependency or other.
#
# A bug report filed against nixpkgs -
# https://github.com/NixOS/nixpkgs/issues/70431
hypothesis = python-super.callPackage ./hypothesis.nix { };
# The newer hypothesis requires a newer attrs.
attrs = python-super.callPackage ./attrs.nix { };
# The newer hypothesis or attrs breaks the pytest test suite.
pytest = python-super.callPackage ./pytest.nix { };
# # A newer version of Hypothesis is required for compatibility with the
# # typing module which gets pulled in by some dependency or other.
# #
# # A bug report filed against nixpkgs -
# # https://github.com/NixOS/nixpkgs/issues/70431
# hypothesis = python-super.callPackage ./hypothesis.nix { };
# # The newer hypothesis requires a newer attrs.
# attrs = python-super.callPackage ./attrs.nix { };
# # The newer hypothesis or attrs breaks the pytest test suite.
# pytest = python-super.callPackage ./pytest.nix { };
typing = python-super.callPackage ./typing.nix { };
# new tahoe-lafs dependency
eliot = python-super.callPackage ./eliot.nix { };
......
{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy3k, isPyPy, python }:
let
testDir = if isPy3k then "src" else "python2";
in buildPythonPackage rec {
pname = "typing";
version = "3.6.6";
src = fetchPypi {
inherit pname version;
sha256 = "sha256:0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0";
};
# Error for Python3.6: ImportError: cannot import name 'ann_module'
# See https://github.com/python/typing/pull/280
# Also, don't bother on PyPy: AssertionError: TypeError not raised
doCheck = pythonOlder "3.6" && !isPyPy;
checkPhase = ''
cd ${testDir}
${python.interpreter} -m unittest discover
'';
meta = with lib; {
description = "Backport of typing module to Python versions older than 3.5";
homepage = https://docs.python.org/3/library/typing.html;
license = licenses.psfl;
};
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment