Merge pull request #106541 from marsam/sqlparse-install-manpage
python38Packages.sqlparse: install manpage
This commit is contained in:
commit
dde8dce285
@ -1,7 +1,8 @@
|
|||||||
{ stdenv
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, pytest
|
, installShellFiles
|
||||||
|
, pytestCheckHook
|
||||||
, isPy3k
|
, isPy3k
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -9,20 +10,22 @@ buildPythonPackage rec {
|
|||||||
pname = "sqlparse";
|
pname = "sqlparse";
|
||||||
version = "0.4.1";
|
version = "0.4.1";
|
||||||
|
|
||||||
|
disabled = !isPy3k;
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "0f91fd2e829c44362cbcfab3e9ae12e22badaa8a29ad5ff599f9ec109f0454e8";
|
sha256 = "0f91fd2e829c44362cbcfab3e9ae12e22badaa8a29ad5ff599f9ec109f0454e8";
|
||||||
};
|
};
|
||||||
|
|
||||||
checkInputs = [ pytest ];
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
checkPhase = ''
|
|
||||||
py.test
|
checkInputs = [ pytestCheckHook ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
installManPage docs/sqlformat.1
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Package supports 3.x, but tests are clearly 2.x only.
|
meta = with lib; {
|
||||||
doCheck = !isPy3k;
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
description = "Non-validating SQL parser for Python";
|
description = "Non-validating SQL parser for Python";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Provides support for parsing, splitting and formatting SQL statements.
|
Provides support for parsing, splitting and formatting SQL statements.
|
||||||
@ -30,5 +33,4 @@ buildPythonPackage rec {
|
|||||||
homepage = "https://github.com/andialbrecht/sqlparse";
|
homepage = "https://github.com/andialbrecht/sqlparse";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, python3Packages }:
|
{ lib, python3Packages, fetchpatch }:
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
pname = "litecli";
|
pname = "litecli";
|
||||||
@ -13,6 +13,14 @@ python3Packages.buildPythonApplication rec {
|
|||||||
sha256 = "FARWjtbS5zi/XQDyAVImUmArLj8xATz1jZ4jnXFdq1w=";
|
sha256 = "FARWjtbS5zi/XQDyAVImUmArLj8xATz1jZ4jnXFdq1w=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Fix compatibility with sqlparse >= 0.4.0. Remove with the next release
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/dbcli/litecli/commit/37957e401d22f88800bbdec2c690e731f2cc13bd.patch";
|
||||||
|
sha256 = "1x82s2h1rzflyiahyd8pfya30rzs6yx6ij4a4s16f8iix5x35zv9";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [
|
propagatedBuildInputs = with python3Packages; [
|
||||||
cli-helpers
|
cli-helpers
|
||||||
click
|
click
|
||||||
|
Loading…
x
Reference in New Issue
Block a user