mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-08 05:03:40 +00:00
python3Packages.flask-migrate: fix build
Test data was not part of the PyPi release. Closes: #138330
This commit is contained in:
parent
e77de1ec57
commit
38d1ee33e9
@ -1,25 +1,51 @@
|
|||||||
{ lib, buildPythonPackage, fetchPypi, isPy3k, glibcLocales, flask, flask_sqlalchemy, flask_script, alembic }:
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, isPy27
|
||||||
|
, alembic
|
||||||
|
, flask
|
||||||
|
, flask_script
|
||||||
|
, flask_sqlalchemy
|
||||||
|
, python
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "Flask-Migrate";
|
pname = "Flask-Migrate";
|
||||||
version = "3.1.0";
|
version = "3.1.0";
|
||||||
|
format = "setuptools";
|
||||||
|
disabled = isPy27;
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchFromGitHub {
|
||||||
inherit pname version;
|
owner = "miguelgrinberg";
|
||||||
sha256 = "57d6060839e3a7f150eaab6fe4e726d9e3e7cffe2150fb223d73f92421c6d1d9";
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "0zj7qpknvlhrh4fsp5sx4fwyx3sp41ynclka992zympm3xym9zyq";
|
||||||
};
|
};
|
||||||
|
|
||||||
checkInputs = [ flask_script ] ++ lib.optional isPy3k glibcLocales;
|
propagatedBuildInputs = [
|
||||||
propagatedBuildInputs = [ flask flask_sqlalchemy alembic ];
|
alembic
|
||||||
|
flask
|
||||||
|
flask_sqlalchemy
|
||||||
|
];
|
||||||
|
|
||||||
# tests invoke the flask cli which uses click and therefore has py3k encoding troubles
|
pythonImportsCheck = [
|
||||||
preCheck = lib.optionalString isPy3k ''
|
"flask_migrate"
|
||||||
export LANG="en_US.UTF-8"
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
flask_script
|
||||||
|
];
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
runHook preCheck
|
||||||
|
${python.interpreter} -m unittest discover
|
||||||
|
runHook postCheck
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "SQLAlchemy database migrations for Flask applications using Alembic";
|
description = "SQLAlchemy database migrations for Flask applications using Alembic";
|
||||||
license = licenses.mit;
|
|
||||||
homepage = "https://github.com/miguelgrinberg/Flask-Migrate";
|
homepage = "https://github.com/miguelgrinberg/Flask-Migrate";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user