diff options
author | Jon Banafato <jon@jonafato.com> | 2020-04-11 14:06:39 -0400 |
---|---|---|
committer | Jon <jonringer@users.noreply.github.com> | 2020-04-13 00:26:35 -0700 |
commit | 2da6401bc241fc1a7d1c0138f93eb0e27c9c31b4 (patch) | |
tree | df92492dd40db3e62170542ee8fd343673177043 /pkgs | |
parent | 15f8446bbac9f8f901534592858b86da778d7f6e (diff) |
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]: https://github.com/csingley/ofxtools/commit/8a795787d96244912fd62deda6c2c2c6e92245e8 [0.8.17]: https://github.com/csingley/ofxtools/commit/ddeda980ed5603570bff63f7a5b52c83ff713bdd
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/ofxtools/default.nix | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/ofxtools/default.nix b/pkgs/development/python-modules/ofxtools/default.nix index 1aa6b75e8bfac..da087e8b520f6 100644 --- a/pkgs/development/python-modules/ofxtools/default.nix +++ b/pkgs/development/python-modules/ofxtools/default.nix @@ -1,30 +1,35 @@ { stdenv , buildPythonPackage -, fetchPypi +, fetchFromGitHub +, nose , python -, sqlalchemy +, pythonOlder }: buildPythonPackage rec { pname = "ofxtools"; version = "0.8.20"; - src = fetchPypi { - inherit pname version; - sha256 = "87245679911c0c12429a476fd269611512d3e4b44cb8871159bb76ba70f8a46f"; + disabled = pythonOlder "3.7"; + + # 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 = '' - ${python.interpreter} -m unittest discover -s ofxtools + HOME=$TMPDIR nosetests tests/*.py ''; - buildInputs = [ sqlalchemy ]; - meta = with stdenv.lib; { homepage = "https://github.com/csingley/ofxtools"; description = "Library for working with Open Financial Exchange (OFX) formatted data used by financial institutions"; license = licenses.mit; - broken = true; }; - } |