python3Packages.django-compat: prevent throw from breaking nix eval

This commit is contained in:
Jonathan Ringer 2020-02-12 21:15:56 -08:00 committed by Jon
parent 6c35347144
commit 5f67b6ad18

View File

@ -1,12 +1,12 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, python, { stdenv, buildPythonPackage, fetchFromGitHub, python,
django, six django, six
}: }:
if stdenv.lib.versionAtLeast django.version "2.0"
then throw "django-compat requires django < 2.0"
else
buildPythonPackage rec { buildPythonPackage rec {
pname = "django-compat"; pname = "django-compat";
version = "1.0.15"; version = "1.0.15";
# django-compat requires django < 2.0
disabled = stdenv.lib.versionAtLeast django.version "2.0";
# the pypi packages don't include everything required for the tests # the pypi packages don't include everything required for the tests
src = fetchFromGitHub { src = fetchFromGitHub {