slither-analyzer: add testing in the check phase
- use setuptools-scm
This commit is contained in:
parent
ae93076f57
commit
77e8d6f058
1 changed files with 14 additions and 9 deletions
|
@ -7,7 +7,7 @@
|
|||
, packaging
|
||||
, prettytable
|
||||
, pythonOlder
|
||||
, setuptools
|
||||
, setuptools-scm
|
||||
, solc
|
||||
, web3
|
||||
, withSolc ? false
|
||||
|
@ -31,7 +31,7 @@ buildPythonPackage rec {
|
|||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
setuptools
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -68,14 +68,19 @@ buildPythonPackage rec {
|
|||
"slither.vyper_parsing"
|
||||
];
|
||||
|
||||
# No Python tests
|
||||
doCheck = false;
|
||||
# Test if the binary works during the build phase.
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
passthru.tests = {
|
||||
version = testers.testVersion {
|
||||
HOME="$TEMP" $out/bin/slither --version
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = slither-analyzer;
|
||||
command = "HOME=$TMPDIR slither --version";
|
||||
};
|
||||
version = "${version}";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue