diff --git a/python-jedi-rpmlintrc b/python-jedi-rpmlintrc new file mode 100644 index 0000000..c6e9929 --- /dev/null +++ b/python-jedi-rpmlintrc @@ -0,0 +1 @@ +addFilter("zero-length.*typeshed.*pyi") diff --git a/python-jedi.changes b/python-jedi.changes index f898ad5..ba296a3 100644 --- a/python-jedi.changes +++ b/python-jedi.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Mon Apr 13 10:01:10 UTC 2020 - Benjamin Greiner + +- tell Leap 15.1 and SLE 15 SP1 pytest to ignore test/__init__.py + so that a test file with purposely placed syntax errors does not + trip the entire discovery + +------------------------------------------------------------------- +Thu Apr 9 18:59:55 UTC 2020 - Benjamin Greiner + +- reenable (most) unittests +- remove unbundle.patch -- according to upstream, typeshed is meant + to be bundled. + ------------------------------------------------------------------- Tue Mar 17 21:45:28 UTC 2020 - Benjamin Greiner diff --git a/python-jedi.spec b/python-jedi.spec index 7d18672..b35fffb 100644 --- a/python-jedi.spec +++ b/python-jedi.spec @@ -25,16 +25,14 @@ License: MIT AND Python-2.0 Group: Development/Languages/Python URL: https://github.com/davidhalter/jedi Source0: jedi-%{version}.tar.xz -Patch0: unbundle.patch +Source1: %{name}-rpmlintrc BuildRequires: %{python_module parso >= 0.5.0} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module typing} BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildRequires: python-typeshed Requires: python-parso >= 0.5.0 -Requires: python-typeshed BuildArch: noarch %python_subpackages @@ -53,8 +51,6 @@ implementation as a VIM plugin which uses Jedi's autocompletion. %prep %setup -q -n jedi-%{version} -%patch0 -p1 -rm -Rf jedi/third_party %build %python_build @@ -66,10 +62,16 @@ rm -Rf jedi/third_party %check export PYTHONDONTWRITEBYTECODE=1 export LANG="en_US.UTF-8" -# Do not execute tests -# Reason here is that the upstream uses bundled typeshed of exact revision and we can't guarantee that -# Something like 20-30 tests always break with any typeshed change, and as such we can't do much -# %%pytest -k "not (test_venv_and_pths or test_completion or test_builtin_details or test_static_analysis or test_os_path_join or test_import or test_compiled_signature or test_module__file__ or test_sqlite3_conversion)" +skiptests="test_venv_and_pths" +skiptests+=" or test_sqlite3_conversion" +# some architectures are too slow for these optimizer devel checks +skiptests+=" or test_speed" +%if 0%{?sle_version} == 150100 + # the python 2 pytest test discovery in Leap 15.1 and SLE15 SP1 + # trips on purposely placed syntax errors in test/completion/imports.py + %define pytestignore --ignore test/__init__.py +%endif +%pytest -k "not ($skiptests)" %{?pytestignore} %files %{python_files} %doc AUTHORS.txt CHANGELOG.rst README.rst diff --git a/unbundle.patch b/unbundle.patch deleted file mode 100644 index 9fcb7f5..0000000 --- a/unbundle.patch +++ /dev/null @@ -1,34 +0,0 @@ -Index: jedi-0.15.2/setup.py -=================================================================== ---- jedi-0.15.2.orig/setup.py -+++ jedi-0.15.2/setup.py -@@ -2,7 +2,6 @@ - - from setuptools import setup, find_packages - --import os - import ast - - __AUTHOR__ = 'David Halter' -@@ -17,8 +16,6 @@ readme = open('README.rst').read() + '\n - with open('requirements.txt') as f: - install_requires = f.read().splitlines() - --assert os.path.isfile("jedi/third_party/typeshed/LICENSE"), \ -- "Please download the typeshed submodule first (Hint: git submodule update --init)" - - setup(name='jedi', - version=version, -Index: jedi-0.15.2/jedi/inference/gradual/typeshed.py -=================================================================== ---- jedi-0.15.2.orig/jedi/inference/gradual/typeshed.py -+++ jedi-0.15.2/jedi/inference/gradual/typeshed.py -@@ -10,7 +10,7 @@ from jedi.inference.gradual.stub_value i - from jedi.inference.value import ModuleValue - - _jedi_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) --TYPESHED_PATH = os.path.join(_jedi_path, 'third_party', 'typeshed') -+TYPESHED_PATH = "/usr/share/typeshed" - - _IMPORT_MAP = dict( - _collections='collections',