File python-jedihttp.spec of Package python-jedihttp

#
# spec file for package python-jedihttp
#
# 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/
#


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-jedihttp
Version:        0+git.1497381496.75b8b74
Release:        0
Url:            https://github.com/vheon/JediHTTP
Summary:        HTTP/JSON wrapper around Jedi
License:        Apache-2.0
Group:          Development/Libraries
Source:         %{name}-%{version}.tar.xz
Patch0:         build.patch
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
Requires:       update-alternatives

# For tests
BuildRequires:  %{python_module WebTest}
BuildRequires:  %{python_module bottle}
BuildRequires:  %{python_module flake8}
BuildRequires:  %{python_module hamcrest}
BuildRequires:  %{python_module jedi}
BuildRequires:  %{python_module nose}
BuildRequires:  %{python_module requests}
BuildRequires:  %{python_module waitress}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros

Requires:       python-bottle
Requires:       python-jedi
Requires:       python-waitress
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%python_subpackages

%description
HTTP/JSON wrapper around Jedi primarily created to allow using
jedi for python3 completion in YouCompleteMe.

%prep
%setup -q
%patch0 -p1

%build
%python_build

%install
%python_install
%python_clone %{buildroot}%{_bindir}/jedihttp-server
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%files %python_files
%defattr(-,root,root)
%doc README.md LICENSE NOTICE
%python3_only %{_bindir}/jedihttp-server
%{_bindir}/jedihttp-server-%{python_bin_suffix}
%{python_sitelib}/jedihttp
%{python_sitelib}/jedihttp-*.egg-info

%changelog
openSUSE Build Service is sponsored by