diff --git a/fish-use-usrbinpython3.patch b/fish-use-usrbinpython3.patch new file mode 100644 index 0000000..6ae8acb --- /dev/null +++ b/fish-use-usrbinpython3.patch @@ -0,0 +1,27 @@ +diff -up fish-2.1.0/share/tools/create_manpage_completions.py.orig fish-2.1.0/share/tools/create_manpage_completions.py +--- fish-2.1.0/share/tools/create_manpage_completions.py.orig 2013-10-19 13:10:26.000000000 -0700 ++++ fish-2.1.0/share/tools/create_manpage_completions.py 2013-12-13 09:35:05.528351152 -0800 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + + # Run me like this: ./create_manpage_completions.py /usr/share/man/man{1,8}/* > man_completions.fish +diff -up fish-2.1.0/share/tools/deroff.py.orig fish-2.1.0/share/tools/deroff.py +--- fish-2.1.0/share/tools/deroff.py.orig 2013-10-19 13:10:26.000000000 -0700 ++++ fish-2.1.0/share/tools/deroff.py 2013-12-13 09:35:26.421351108 -0800 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + + """ Deroff.py, ported to Python from the venerable deroff.c """ +diff -up fish-2.1.0/share/tools/web_config/webconfig.py.orig fish-2.1.0/share/tools/web_config/webconfig.py +--- fish-2.1.0/share/tools/web_config/webconfig.py.orig 2013-10-19 13:10:26.000000000 -0700 ++++ fish-2.1.0/share/tools/web_config/webconfig.py 2013-12-13 09:35:32.681351122 -0800 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + # Whether we're Python 2 + import sys, os diff --git a/fish.spec b/fish.spec index 76add22..f0cae89 100644 --- a/fish.spec +++ b/fish.spec @@ -1,6 +1,6 @@ Name: fish Version: 2.1.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A friendly interactive shell Group: System Environment/Shells @@ -9,7 +9,20 @@ URL: http://fishshell.com/ Source0: http://fishshell.com/files/%{version}/fish-%{version}.tar.gz Patch0: fish-remove-usr-local.patch Patch1: fish-add-link-cxxflags.patch + +# For Fedora 22 and newer, use Python 3. To keep this spec file working +# on all combinations (including fedpkg local), be completely explicit here. +# Once Fedora 21 is retired, this can be removed. +%if 0%{?fedora} >= 22 +Patch2: fish-use-usrbinpython3.patch +BuildRequires: python3-devel +%global __python %{__python3} +%else Patch2: fish-use-usrbinpython.patch +BuildRequires: python2-devel +%global __python %{__python2} +%endif + Patch3: fish-grep-1.patch Patch4: fish-grep-2.patch @@ -81,6 +94,9 @@ fi %changelog +* Wed Dec 17 2014 Andy Lutomirski - 2.1.1-3 +- For Fedora 22+, use Python 3 + * Sun Dec 14 2014 Andy Lutomirski - 2.1.1-2 - Backport grep.fish fixes (rhbz #1173924)