python-jedi/python-jedi.spec

87 lines
2.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-jedi
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%bcond_without tests
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-jedi
Version: 0.10.2
Release: 0
Summary: An autocompletion tool for Python
License: MIT
Group: Development/Languages/Python
Url: https://github.com/davidhalter/jedi
Source0: https://files.pythonhosted.org/packages/source/j/jedi/jedi-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
%if %{with tests}
# Test requirements
BuildRequires: %{python_module colorama}
BuildRequires: %{python_module docopt}
BuildRequires: %{python_module pytest >= 2.3.5}
BuildRequires: %{python_module pytest-cache}
BuildRequires: %{python_module typing}
BuildRequires: python3-tox
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
Jedi is a static analysis tool for Python that can be used in
IDEs/editors. Its historic focus is autocompletion, but does static
analysis for now as well.
Jedi has support for two different goto functions. Its possible to
search for related names and to list all names in a Python file and
infer them. Jedi understands docstrings and you can use Jedi
autocompletion in your REPL as well.
Jedi uses a very simple API to connect with IDEs. Theres a reference
implementation as a VIM-Plugin, which uses Jedis autocompletion.
%prep
%setup -q -n jedi-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with tests}
%check
export PYTHONDONTWRITEBYTECODE=1
export LANG="en_US.UTF-8"
pushd docs
# we don't care about the speed, just that it works
tox --sitepackages --skip-missing-interpreters
# %%python_expand py.test-%{$python_bin_suffix} -p "no:doctest" -k "not test_speed" --ignore=test/test_integration_import.py --ignore=test/test_evaluate/test_extension.py
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc AUTHORS.txt CHANGELOG.rst LICENSE.txt README.rst
%{python_sitelib}/jedi-%{version}-py*.egg-info
%{python_sitelib}/jedi/
%changelog