pythonPackages.sqlalchemy-imageattach: refactor move to python-modules

This commit is contained in:
Chris Ostrouchov
2018-10-27 17:44:08 -04:00
parent e186e5a5ed
commit 0f2194508c
2 changed files with 43 additions and 30 deletions

View File

@@ -0,0 +1,42 @@
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, pytest
, Wand
, webob
, sqlalchemy
, isPyPy
, pkgs
}:
buildPythonPackage rec {
pname = "SQLAlchemy-ImageAttach";
version = "1.0.0";
src = pkgs.fetchFromGitHub {
repo = "sqlalchemy-imageattach";
owner = "dahlia";
rev = "${version}";
sha256 = "0ba97pn5dh00qvxyjbr0mr3pilxqw5kb3a6jd4wwbsfcv6nngqig";
};
checkInputs = [ pytest Wand.imagemagick webob ];
propagatedBuildInputs = [ sqlalchemy Wand ];
checkPhase = ''
cd tests
export MAGICK_HOME="${pkgs.imagemagick.dev}"
export PYTHONPATH=$PYTHONPATH:../
py.test
cd ..
'';
doCheck = !isPyPy; # failures due to sqla version mismatch
meta = with stdenv.lib; {
homepage = https://github.com/dahlia/sqlalchemy-imageattach;
description = "SQLAlchemy extension for attaching images to entity objects";
license = licenses.mit;
};
}