3
0
Fork 0
forked from mirrors/nixpkgs

pythonPackages.dendropy: fix build

Build failed after update to 4.4.0 because the tests are incorrectly
packages in the pypi version.
Switch to upstream github repo, fix tests, disable failing test cases
This commit is contained in:
Uli Baum 2018-09-16 17:37:28 +02:00
parent 0e33c56662
commit a66c00d780

View file

@ -1,29 +1,33 @@
{ lib { lib
, pkgs , pkgs
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchFromGitHub
, pytest
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "DendroPy"; pname = "DendroPy";
version = "4.4.0"; version = "4.4.0";
src = fetchPypi { # tests are incorrectly packaged in pypi version
inherit pname version; src = fetchFromGitHub {
sha256 = "f0a0e2ce78b3ed213d6c1791332d57778b7f63d602430c1548a5d822acf2799c"; owner = "jeetsukumaran";
repo = pname;
rev = "v${version}";
sha256 = "097hfyv2kaf4x92i4rjx0paw2cncxap48qivv8zxng4z7nhid0x9";
}; };
prePatch = ''
# Test removed/disabled and reported upstream: https://github.com/jeetsukumaran/DendroPy/issues/74
rm -f dendropy/test/test_dataio_nexml_reader_tree_list.py
'';
preCheck = '' preCheck = ''
# Needed for unicode python tests # Needed for unicode python tests
export LC_ALL="en_US.UTF-8" export LC_ALL="en_US.UTF-8"
cd tests # to find the 'support' module
''; '';
checkInputs = [ pkgs.glibcLocales ]; checkInputs = [ pytest pkgs.glibcLocales ];
checkPhase = ''
pytest -k 'not test_dataio_nexml_reader_tree_list and not test_pscores_with'
'';
meta = { meta = {
homepage = http://dendropy.org/; homepage = http://dendropy.org/;