pythonPackages.django-polymorphic: fix tests

This commit is contained in:
Robert Schütz 2018-03-02 03:05:55 +01:00
parent 7b525acee2
commit ae56cc1f30

View File

@ -1,18 +1,24 @@
{ stdenv, buildPythonPackage, fetchPypi, django }:
{ stdenv, buildPythonPackage, fetchFromGitHub, python, django, dj-database-url }:
buildPythonPackage rec {
pname = "django-polymorphic";
version = "2.0.2";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "e1821d7b5874509a158a0f22bebf544330e0944c481c5a3e6da6cac8887e4e88";
# PyPI tarball is missing some test files
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "18p84kdwpfp423vb2n38h840mj3bq0j57jx3cry7c8dznpi0vfi2";
};
checkInputs = [ django ];
checkInputs = [ dj-database-url ];
propagatedBuildInputs = [ django ];
checkPhase = ''
${python.interpreter} runtests.py
'';
meta = {
homepage = https://github.com/django-polymorphic/django-polymorphic;
description = "Improved Django model inheritance with automatic downcasting";