|
| 1 | +# Copyright 1999-2023 Gentoo Authors |
| 2 | +# Distributed under the terms of the GNU General Public License v2 |
| 3 | + |
| 4 | +EAPI=8 |
| 5 | + |
| 6 | +DISTUTILS_USE_PEP517=setuptools |
| 7 | +PYTHON_COMPAT=( python3_{9..11} ) |
| 8 | + |
| 9 | +inherit distutils-r1 |
| 10 | + |
| 11 | +DESCRIPTION="Abstract Syntax Tree for logilab packages" |
| 12 | +HOMEPAGE=" |
| 13 | + https://github.com/PyCQA/astroid/ |
| 14 | + https://pypi.org/project/astroid/ |
| 15 | +" |
| 16 | +SRC_URI=" |
| 17 | + https://github.com/PyCQA/astroid/archive/v${PV}.tar.gz |
| 18 | + -> ${P}.gh.tar.gz |
| 19 | +" |
| 20 | + |
| 21 | +LICENSE="LGPL-2.1+" |
| 22 | +SLOT="0" |
| 23 | +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" |
| 24 | + |
| 25 | +# Version specified in pyproject.toml |
| 26 | +RDEPEND=" |
| 27 | + >=dev-python/lazy-object-proxy-1.4.0[${PYTHON_USEDEP}] |
| 28 | + dev-python/setuptools[${PYTHON_USEDEP}] |
| 29 | + >=dev-python/typing-extensions-3.10[${PYTHON_USEDEP}] |
| 30 | + <dev-python/wrapt-2[${PYTHON_USEDEP}] |
| 31 | +" |
| 32 | +BDEPEND=" |
| 33 | + dev-python/setuptools_scm[${PYTHON_USEDEP}] |
| 34 | + test? ( |
| 35 | + dev-python/numpy[${PYTHON_USEDEP}] |
| 36 | + dev-python/python-dateutil[${PYTHON_USEDEP}] |
| 37 | + ) |
| 38 | +" |
| 39 | + |
| 40 | +distutils_enable_tests pytest |
| 41 | + |
| 42 | +export SETUPTOOLS_SCM_PRETEND_VERSION=${PV} |
| 43 | + |
| 44 | +python_test() { |
| 45 | + local EPYTEST_DESELECT=( |
| 46 | + # no clue why it's broken |
| 47 | + tests/unittest_modutils.py::GetModulePartTest::test_known_values_get_builtin_module_part |
| 48 | + tests/unittest_brain_dataclasses.py::test_pydantic_field |
| 49 | + tests/unittest_brain.py::SixBrainTest::test_from_imports |
| 50 | + tests/unittest_regrtest.py::NonRegressionTests::test_numpy_distutils |
| 51 | + # some problem with warnings (our options?) |
| 52 | + tests/unittest_decorators.py::TestDeprecationDecorators::test_deprecated_default_argument_values_one_arg |
| 53 | + tests/unittest_decorators.py::TestDeprecationDecorators::test_deprecated_default_argument_values_two_args |
| 54 | + tests/unittest_scoped_nodes.py::test_deprecation_of_doc_attribute |
| 55 | + ) |
| 56 | + |
| 57 | + # Faker causes sys.path_importer_cache keys to be overwritten |
| 58 | + # with PosixPaths |
| 59 | + epytest -p no:faker |
| 60 | +} |
0 commit comments