Merge pull request #113197 from fabaff/fix-modeled

This commit is contained in:
Sandro 2021-02-16 22:05:03 +01:00 committed by GitHub
commit e7b055d5ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 21 deletions

View File

@ -24,9 +24,11 @@ buildPythonPackage rec {
checkInputs = [ pytestCheckHook ]; checkInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "modeled" ];
meta = with lib; { meta = with lib; {
description = "Universal data modeling for Python"; description = "Universal data modeling for Python";
homepage = "https://bitbucket.org/userzimmermann/python-modeled"; homepage = "https://github.com/modeled/modeled";
license = licenses.lgpl3Only; license = licenses.lgpl3Only;
maintainers = [ maintainers.costrouc ]; maintainers = [ maintainers.costrouc ];
}; };

View File

@ -8,7 +8,7 @@
, six , six
, zetup , zetup
, modeled , modeled
, pytest , pytestCheckHook
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -20,9 +20,7 @@ buildPythonPackage rec {
sha256 = "0377ikajf6c3zcy3lc0kh4w9zmlqyplk2c2hb0yyc7h3jnfnya96"; sha256 = "0377ikajf6c3zcy3lc0kh4w9zmlqyplk2c2hb0yyc7h3jnfnya96";
}; };
nativeBuildInputs = [ nativeBuildInputs = [ zetup ];
zetup
];
propagatedBuildInputs = [ propagatedBuildInputs = [
robotframework robotframework
@ -32,19 +30,21 @@ buildPythonPackage rec {
modeled modeled
]; ];
checkInputs = [ postPatch = ''
pytest # Remove upstream's selfmade approach to collect the dependencies
]; # https://github.com/userzimmermann/robotframework-tools/issues/1
substituteInPlace setup.py --replace \
checkPhase = '' "setup_requires=SETUP_REQUIRES + (zfg.SETUP_REQUIRES or [])," ""
# tests require network
pytest test --ignore test/remote/test_remote.py
''; '';
checkInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "test" ];
pythonImportsCheck = [ "robottools" ];
meta = with lib; { meta = with lib; {
description = "Python Tools for Robot Framework and Test Libraries"; description = "Python Tools for Robot Framework and Test Libraries";
homepage = "https://bitbucket.org/userzimmermann/robotframework-tools"; homepage = "https://github.com/userzimmermann/robotframework-tools";
license = licenses.gpl3; license = licenses.gpl3Plus;
maintainers = [ maintainers.costrouc ]; maintainers = [ maintainers.costrouc ];
}; };
} }

View File

@ -1,6 +1,11 @@
{ lib, buildPythonPackage, fetchPypi { lib
, setuptools_scm, pathpy, nbconvert , buildPythonPackage
, pytest }: , fetchPypi
, nbconvert
, pathpy
, pytestCheckHook
, setuptools-scm
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "zetup"; pname = "zetup";
@ -11,18 +16,25 @@ buildPythonPackage rec {
sha256 = "b8a9bdcfa4b705d72b55b218658bc9403c157db7b57a14158253c98d03ab713d"; sha256 = "b8a9bdcfa4b705d72b55b218658bc9403c157db7b57a14158253c98d03ab713d";
}; };
# Python 3.8 compatibility # Python > 3.7 compatibility
postPatch = '' postPatch = ''
substituteInPlace zetup/zetup_config.py \ substituteInPlace zetup/zetup_config.py \
--replace "'3.7']" "'3.7', '3.8']" --replace "'3.7']" "'3.7', '3.8', '3.9', '3.10']"
''; '';
checkPhase = '' checkPhase = ''
py.test test -k "not TestObject" --deselect=test/test_zetup_config.py::test_classifiers py.test test -k "not TestObject" --deselect=test/test_zetup_config.py::test_classifiers
''; '';
checkInputs = [ pytest pathpy nbconvert ]; propagatedBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [ setuptools_scm ];
checkInputs = [
pathpy
nbconvert
pytestCheckHook
];
pythonImportsCheck = [ "zetup" ];
meta = with lib; { meta = with lib; {
description = "Zimmermann's Extensible Tools for Unified Project setups"; description = "Zimmermann's Extensible Tools for Unified Project setups";