natsukium
2024-01-31 22:32:10 +09:00
parent c527a92027
commit e5ced5d0b2
@@ -1,32 +1,29 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchPypi
, pythonOlder
, setuptools
, ipython
, ipython-genutils
, pandas
, prettytable
, pytest
, sqlalchemy
, sqlparse
}:
buildPythonPackage rec {
pname = "ipython-sql";
version = "0.4.0";
format = "setuptools";
version = "0.5.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "catherinedevlin";
repo = "ipython-sql";
rev = "117764caf099d80100ed4b09fc004b55eed6f121";
hash = "sha256-ScQihsvRSnC7VIgy8Tzi1z4x6KIZo0SAeLPvHAVdrfA=";
src = fetchPypi {
inherit pname version;
hash = "sha256-PbPOf5qV369Dh2+oCxa9u5oE3guhIELKsT6fWW/P/b4=";
};
postPatch = ''
substituteInPlace setup.py --replace 'prettytable<1' prettytable
'';
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
ipython
@@ -36,17 +33,8 @@ buildPythonPackage rec {
sqlparse
];
nativeCheckInputs = [ ipython pandas pytest ];
checkPhase = ''
runHook preCheck
# running with ipython is required because the tests use objects available
# only inside of ipython, for example the global `get_ipython()` function
ipython -c 'import pytest; pytest.main()'
runHook postCheck
'';
# pypi tarball has no tests
doCheck = false;
pythonImportsCheck = [ "sql" ];