From af21353c41b10498fdcfd99e2d7ede2c1debbb60 Mon Sep 17 00:00:00 2001 From: Carl George Date: Jun 15 2018 14:10:39 +0000 Subject: Add patch0 to parse correct AST entry for version on Python 3.7.0b5 --- diff --git a/parse-correct-ast-entry-for-version.patch b/parse-correct-ast-entry-for-version.patch new file mode 100644 index 0000000..84b2c30 --- /dev/null +++ b/parse-correct-ast-entry-for-version.patch @@ -0,0 +1,23 @@ +diff -Nurp jedi-0.12.0.orig/setup.py jedi-0.12.0/setup.py +--- jedi-0.12.0.orig/setup.py 2018-06-15 09:03:12.570433099 -0500 ++++ jedi-0.12.0/setup.py 2018-06-15 09:03:59.328580935 -0500 +@@ -3,7 +3,6 @@ + from setuptools import setup, find_packages + + import ast +-import sys + + __AUTHOR__ = 'David Halter' + __AUTHOR_EMAIL__ = 'davidhalter88@gmail.com' +@@ -11,10 +10,7 @@ __AUTHOR_EMAIL__ = 'davidhalter88@gmail. + # Get the version from within jedi. It's defined in exactly one place now. + with open('jedi/__init__.py') as f: + tree = ast.parse(f.read()) +-if sys.version_info > (3, 7): +- version = tree.body[0].value.s +-else: +- version = tree.body[1].value.s ++version = tree.body[1].value.s + + readme = open('README.rst').read() + '\n\n' + open('CHANGELOG.rst').read() + with open('requirements.txt') as f: diff --git a/python-jedi.spec b/python-jedi.spec index 9ef77e6..7625f47 100644 --- a/python-jedi.spec +++ b/python-jedi.spec @@ -10,11 +10,13 @@ than all other static analysis frameworks for Python. Name: python-%{pypi_name} Version: 0.12.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: An auto completion tool for Python that can be used for text editors License: MIT and Python URL: https://jedi.readthedocs.org Source0: https://github.com/davidhalter/%{pypi_name}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz +# https://github.com/davidhalter/jedi/pull/971#issuecomment-397630845 +Patch0: parse-correct-ast-entry-for-version.patch BuildArch: noarch @@ -52,7 +54,7 @@ Requires: python%{python3_pkgversion}-parso >= 0.2.0 %prep -%setup -q -n %{pypi_name}-%{version} +%autosetup -n %{pypi_name}-%{version} -p 1 %build @@ -87,6 +89,9 @@ py.test-%{python3_version} --verbose %changelog +* Fri Jun 15 2018 Carl George - 0.12.0-3 +- Add patch0 to parse correct AST entry for version on Python 3.7.0b5 + * Fri Jun 15 2018 Miro HronĨok - 0.12.0-2 - Rebuilt for Python 3.7