2018-10-27 22:45:54 +01:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytest
|
|
|
|
, isPy3k
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sqlparse";
|
2019-10-05 20:48:36 +01:00
|
|
|
version = "0.3.0";
|
2018-10-27 22:45:54 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-10-05 20:48:36 +01:00
|
|
|
sha256 = "0wxqrm9fpn4phz6rqm7kfd1wwkwzx376gs27nnalwx12q0lwlgbw";
|
2018-10-27 22:45:54 +01:00
|
|
|
};
|
|
|
|
|
2019-01-05 10:54:27 +00:00
|
|
|
checkInputs = [ pytest ];
|
2018-10-27 22:45:54 +01:00
|
|
|
checkPhase = ''
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Package supports 3.x, but tests are clearly 2.x only.
|
|
|
|
doCheck = !isPy3k;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Non-validating SQL parser for Python";
|
|
|
|
longDescription = ''
|
|
|
|
Provides support for parsing, splitting and formatting SQL statements.
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/andialbrecht/sqlparse";
|
2018-10-27 22:45:54 +01:00
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|