Accepting request 793777 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/793777 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-jedi?expand=0&rev=22
This commit is contained in:
commit
ce18c1a345
1
python-jedi-rpmlintrc
Normal file
1
python-jedi-rpmlintrc
Normal file
@ -0,0 +1 @@
|
|||||||
|
addFilter("zero-length.*typeshed.*pyi")
|
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 13 10:01:10 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- 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 <code@bnavigator.de>
|
||||||
|
|
||||||
|
- 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 <code@bnavigator.de>
|
Tue Mar 17 21:45:28 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@ -25,16 +25,14 @@ License: MIT AND Python-2.0
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/davidhalter/jedi
|
URL: https://github.com/davidhalter/jedi
|
||||||
Source0: jedi-%{version}.tar.xz
|
Source0: jedi-%{version}.tar.xz
|
||||||
Patch0: unbundle.patch
|
Source1: %{name}-rpmlintrc
|
||||||
BuildRequires: %{python_module parso >= 0.5.0}
|
BuildRequires: %{python_module parso >= 0.5.0}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module typing}
|
BuildRequires: %{python_module typing}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: python-typeshed
|
|
||||||
Requires: python-parso >= 0.5.0
|
Requires: python-parso >= 0.5.0
|
||||||
Requires: python-typeshed
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@ -53,8 +51,6 @@ implementation as a VIM plugin which uses Jedi's autocompletion.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n jedi-%{version}
|
%setup -q -n jedi-%{version}
|
||||||
%patch0 -p1
|
|
||||||
rm -Rf jedi/third_party
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
@ -66,10 +62,16 @@ rm -Rf jedi/third_party
|
|||||||
%check
|
%check
|
||||||
export PYTHONDONTWRITEBYTECODE=1
|
export PYTHONDONTWRITEBYTECODE=1
|
||||||
export LANG="en_US.UTF-8"
|
export LANG="en_US.UTF-8"
|
||||||
# Do not execute tests
|
skiptests="test_venv_and_pths"
|
||||||
# Reason here is that the upstream uses bundled typeshed of exact revision and we can't guarantee that
|
skiptests+=" or test_sqlite3_conversion"
|
||||||
# Something like 20-30 tests always break with any typeshed change, and as such we can't do much
|
# some architectures are too slow for these optimizer devel checks
|
||||||
# %%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+=" 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}
|
%files %{python_files}
|
||||||
%doc AUTHORS.txt CHANGELOG.rst README.rst
|
%doc AUTHORS.txt CHANGELOG.rst README.rst
|
||||||
|
@ -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',
|
|
Loading…
x
Reference in New Issue
Block a user