use python2 and python3 in code
This commit is contained in:
parent
54344a678e
commit
282aed6c48
87
vim-python3-tests.patch
Normal file
87
vim-python3-tests.patch
Normal file
@ -0,0 +1,87 @@
|
||||
diff -up vim80/runtime/tools/demoserver.py.python3-tests vim80/runtime/tools/demoserver.py
|
||||
--- vim80/runtime/tools/demoserver.py.python3-tests 2018-05-11 08:24:41.774618804 +0200
|
||||
+++ vim80/runtime/tools/demoserver.py 2018-05-11 09:24:48.363309856 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# Server that will accept connections from a Vim channel.
|
||||
# Run this server and then in Vim you can open the channel:
|
||||
diff -up vim80/src/auto/configure.python3-tests vim80/src/auto/configure
|
||||
--- vim80/src/auto/configure.python3-tests 2018-05-11 08:25:03.632420873 +0200
|
||||
+++ vim80/src/auto/configure 2018-05-11 09:25:26.062000471 +0200
|
||||
@@ -6396,7 +6396,7 @@ eof
|
||||
if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
|
||||
"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
|
||||
vi_cv_path_python_plibs="-framework Python"
|
||||
- if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
|
||||
+ if test "x${vi_cv_path_python}" != "x/usr/bin/python2" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
|
||||
vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
|
||||
fi
|
||||
else
|
||||
diff -up vim80/src/configure.ac.python3-tests vim80/src/configure.ac
|
||||
--- vim80/src/configure.ac.python3-tests 2018-05-11 08:25:26.070218957 +0200
|
||||
+++ vim80/src/configure.ac 2018-05-11 09:26:01.603708243 +0200
|
||||
@@ -1248,7 +1248,7 @@ eof
|
||||
if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
|
||||
"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
|
||||
vi_cv_path_python_plibs="-framework Python"
|
||||
- if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
|
||||
+ if test "x${vi_cv_path_python}" != "x/usr/bin/python2" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
|
||||
vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
|
||||
fi
|
||||
else
|
||||
diff -up vim80/src/testdir/test_channel_pipe.py.python3-tests vim80/src/testdir/test_channel_pipe.py
|
||||
--- vim80/src/testdir/test_channel_pipe.py.python3-tests 2018-05-11 09:23:05.738146018 +0200
|
||||
+++ vim80/src/testdir/test_channel_pipe.py 2018-05-11 09:26:37.354413350 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# Server that will communicate over stdin/stderr
|
||||
#
|
||||
diff -up vim80/src/testdir/test_channel.py.python3-tests vim80/src/testdir/test_channel.py
|
||||
--- vim80/src/testdir/test_channel.py.python3-tests 2018-05-11 09:22:48.522284266 +0200
|
||||
+++ vim80/src/testdir/test_channel.py 2018-05-11 09:26:17.762574955 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# Server that will accept connections from a Vim channel.
|
||||
# Used by test_channel.vim.
|
||||
diff -up vim80/src/testdir/test_channel_write.py.python3-tests vim80/src/testdir/test_channel_write.py
|
||||
--- vim80/src/testdir/test_channel_write.py.python3-tests 2018-05-11 09:23:21.254021422 +0200
|
||||
+++ vim80/src/testdir/test_channel_write.py 2018-05-11 09:26:54.952268193 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# Program that writes a number to stdout repeatedly
|
||||
#
|
||||
diff -up vim80/src/testdir/test_makeencoding.py.python3-tests vim80/src/testdir/test_makeencoding.py
|
||||
--- vim80/src/testdir/test_makeencoding.py.python3-tests 2018-05-11 09:23:38.990878990 +0200
|
||||
+++ vim80/src/testdir/test_makeencoding.py 2018-05-11 09:27:14.402107759 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Test program for :make, :grep and :cgetfile.
|
||||
diff -up vim80/src/testdir/test_netbeans.py.python3-tests vim80/src/testdir/test_netbeans.py
|
||||
--- vim80/src/testdir/test_netbeans.py.python3-tests 2018-05-11 09:23:54.398752732 +0200
|
||||
+++ vim80/src/testdir/test_netbeans.py 2018-05-11 09:27:30.489975057 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# Server that will communicate with Vim through the netbeans interface.
|
||||
# Used by test_netbeans.vim.
|
||||
diff -up vim80/src/testdir/test_short_sleep.py.python3-tests vim80/src/testdir/test_short_sleep.py
|
||||
--- vim80/src/testdir/test_short_sleep.py.python3-tests 2018-05-11 09:24:09.134631798 +0200
|
||||
+++ vim80/src/testdir/test_short_sleep.py 2018-05-11 09:27:48.432827053 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# Program that sleeps for 100 msec
|
||||
#
|
8
vim.spec
8
vim.spec
@ -28,7 +28,7 @@ Summary: The VIM editor
|
||||
URL: http://www.vim.org/
|
||||
Name: vim
|
||||
Version: %{baseversion}.%{patchlevel}
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: Vim
|
||||
Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2
|
||||
Source1: vim.sh
|
||||
@ -69,6 +69,8 @@ Patch3012: vim-7.4-licensemacro-1151450.patch
|
||||
Patch3013: vim-7.4-globalsyntax.patch
|
||||
Patch3014: vim-7.4-releasestring-1318991.patch
|
||||
Patch3016: vim-8.0-copy-paste.patch
|
||||
# migrate shebangs in script to /usr/bin/python3 and use python2 when necessary
|
||||
Patch3017: vim-python3-tests.patch
|
||||
|
||||
# gcc is no longer in buildroot by default
|
||||
BuildRequires: gcc
|
||||
@ -242,6 +244,7 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk
|
||||
%patch3013 -p1
|
||||
%patch3014 -p1
|
||||
%patch3016 -p1
|
||||
%patch3017 -p1
|
||||
|
||||
%build
|
||||
cd src
|
||||
@ -756,6 +759,9 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags
|
||||
%{_datadir}/icons/locolor/*/apps/*
|
||||
|
||||
%changelog
|
||||
* Fri May 11 2018 Zdenek Dohnal <zdohnal@redhat.com> - 8.0.1806-2
|
||||
- use python2 and python3 in code
|
||||
|
||||
* Thu May 10 2018 Karsten Hopp <karsten@redhat.com> 8.0.1806-1
|
||||
- patchlevel 1806
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user