python3Packages.atom: fix versioning and tests

This commit is contained in:
Martin Weinelt 2022-04-14 05:02:37 +02:00
parent 2dde351eca
commit 8e6075b2ac

View file

@ -1,19 +1,45 @@
{ lib, buildPythonPackage, fetchPypi, future, cppy }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools-scm
, future
, cppy
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "atom";
version = "0.8.0";
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-LnLyNaljNocqAKr85VhIxZqU3KIPAPWnQpazcdoNrXE=";
src = fetchFromGitHub {
owner = "nucleic";
repo = pname;
rev = version;
hash = "sha256-Xby3QopKw7teShMi80RMG8YdhOOvfQb5vwOuFEUTxHQ=";
};
buildInputs = [ cppy ];
propagatedBuildInputs = [ future ];
SETUPTOOLS_SCM_PRETEND_VERSION = version;
# Tests not released to pypi
doCheck = true;
nativeBuildInputs = [
setuptools-scm
];
buildInputs = [
cppy
];
preCheck = ''
rm -rf atom
'';
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"atom.api"
];
meta = with lib; {
description = "Memory efficient Python objects";