pythonPackages.ofxtools: unbreak
- Remove `sqlalchemy` from `buildInputs`. This dependency was removed in [0.7.0]. Per the project's readme, `ofxtools` only depends on the standard library. - Disable for Python versions older than 3.7, the minimum Python version supported by `ofxtools` starting with the [0.8.17] release. - Fix the `checkPhase` by fetching from GitHub instead of PyPI to get a distribution that includes tests, overriding the home directory to allow tests that depend on it being writeable, and switching to `nosetests` to match the upstream project's test setup. [0.7.0]:8a795787d9
[0.8.17]:ddeda980ed
This commit is contained in:
parent
15f8446bba
commit
2da6401bc2
@ -1,30 +1,35 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchFromGitHub
|
||||||
|
, nose
|
||||||
, python
|
, python
|
||||||
, sqlalchemy
|
, pythonOlder
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "ofxtools";
|
pname = "ofxtools";
|
||||||
version = "0.8.20";
|
version = "0.8.20";
|
||||||
|
|
||||||
src = fetchPypi {
|
disabled = pythonOlder "3.7";
|
||||||
inherit pname version;
|
|
||||||
sha256 = "87245679911c0c12429a476fd269611512d3e4b44cb8871159bb76ba70f8a46f";
|
# PyPI distribution does not include tests
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "csingley";
|
||||||
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
sha256 = "1s3fhhmj1acnmqglh39003db0bi451m4hcrkcpyrkqf5m32lslz8";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
checkInputs = [ nose ];
|
||||||
|
# override $HOME directory:
|
||||||
|
# error: [Errno 13] Permission denied: '/homeless-shelter'
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
${python.interpreter} -m unittest discover -s ofxtools
|
HOME=$TMPDIR nosetests tests/*.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [ sqlalchemy ];
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "https://github.com/csingley/ofxtools";
|
homepage = "https://github.com/csingley/ofxtools";
|
||||||
description = "Library for working with Open Financial Exchange (OFX) formatted data used by financial institutions";
|
description = "Library for working with Open Financial Exchange (OFX) formatted data used by financial institutions";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
broken = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user