From 0b5153787439d64c728364160a972ffe8c2f716b Mon Sep 17 00:00:00 2001 From: Carl George Date: Apr 03 2017 14:04:24 +0000 Subject: Align spec with Python packaging guidelines --- diff --git a/python-jedi.spec b/python-jedi.spec index 43cbd46..5931e7f 100644 --- a/python-jedi.spec +++ b/python-jedi.spec @@ -1,101 +1,88 @@ -# Created by pyp2rpm-0.5.2 %global pypi_name jedi -%global with_python3 1 Name: python-%{pypi_name} Version: 0.10.0 Release: 1%{?dist} Summary: An auto completion tool for Python that can be used for text editors -Group: Development/Languages License: MIT and Python URL: https://jedi.readthedocs.org/en/latest/index.html Source0: https://github.com/davidhalter/%{pypi_name}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch - + + +%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 is fast and is very well tested. It understands Python on a deeper level +than all other static analysis frameworks for Python. + + +%package -n python2-%{pypi_name} +Summary: %{summary} BuildRequires: python2-devel -BuildRequires: python-setuptools -%if 0%{?with_python3} +BuildRequires: python%{?fedora:2}-setuptools +%{?python_provide:%python_provide python2-%{pypi_name}} + + +%description -n python2-%{pypi_name} +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 is fast and is very well tested. It understands Python on a deeper level +than all other static analysis frameworks for Python. + + +%if 0%{?fedora} +%package -n python3-%{pypi_name} +Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3-setuptools -%endif # with_python3 - -%description -Jedi is an auto completion tool for Python. -It works. With and without syntax -errors. Sometimes it sucks, but that's normal -in dynamic languages. But it -sucks less than other tools. It understands almost -all of the basic Python -syntax elements including many built-ins. - -Jedi uses a very simple -interface to connect with IDE's. As an reference, there -is a VIM -implementation, which uses Jedi's auto completion. However, I encourage -you to -use Jedi in your IDEs. Start writing plugins! If there are problems with -licensing, just contact me. - -%if 0%{?with_python3} -%package -n python3-jedi -Summary: An auto completion tool for Python that can be used for text editors -Group: Development/Languages - -%description -n python3-jedi -Jedi is an auto completion tool for Python. -It works. With and without syntax -errors. Sometimes it sucks, but that's normal -in dynamic languages. But it -sucks less than other tools. It understands almost -all of the basic Python -syntax elements including many built-ins. - -Jedi uses a very simple -interface to connect with IDE's. As an reference, there -is a VIM -implementation, which uses Jedi's auto completion. However, I encourage -you to -use Jedi in your IDEs. Start writing plugins! If there are problems with -licensing, just contact me. -%endif # with_python3 +%{?python_provide:%python_provide python3-%{pypi_name}} + + +%description -n python3-%{pypi_name} +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 is fast and is very well tested. It understands Python on a deeper level +than all other static analysis frameworks for Python. +%endif + %prep %setup -q -n %{pypi_name}-%{version} -# Remove bundled egg-info -rm -rf %{pypi_name}.egg-info + %build -%{__python2} setup.py build +%py2_build +%{?fedora:%py3_build} -%if 0%{?with_python3} -%{__python3} setup.py build -%endif # with_python3 %install -# Must do the subpackages' install first because the scripts in /usr/bin are -# overwritten with every setup.py install (and we want the python2 version -# to be the default for now). -%{__python2} setup.py install --skip-build --root %{buildroot} -%if 0%{?with_python3} -%{__python3} setup.py install --skip-build --root %{buildroot} -%endif # with_python3 - -%files -%doc README.rst LICENSE.txt +%py2_install +%{?fedora:%py3_install} + + +%files -n python2-%{pypi_name} +%license LICENSE.txt +%doc AUTHORS.txt CHANGELOG.rst README.rst %{python2_sitelib}/%{pypi_name} %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info -%if 0%{?with_python3} -%files -n python3-jedi + +%if 0%{?fedora} +%files -n python3-%{pypi_name} +%license LICENSE.txt +%doc AUTHORS.txt CHANGELOG.rst README.rst %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info -%endif # with_python3 +%endif + %changelog * Mon Apr 03 2017 Carl George - 0.10.0-1 - Latest upstream - Upstream license changed to MIT and Python +- Align spec with Python packaging guidelines * Sat Feb 11 2017 Fedora Release Engineering - 0.9.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild