Ship our own copy of subprocess.py

so people without the latest Python could run merge-recursive.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano 2005-09-19 19:47:54 -07:00
parent 0a2ba73860
commit 343d35c916
4 changed files with 1176 additions and 9 deletions

View File

@ -23,6 +23,8 @@
#
# Define NO_GETDOMAINNAME if your library lack it (SunOS, Patrick Mauritz).
#
# Define WITH_OWN_SUBPROCESS_PY if you want to use with python 2.3.
#
# Define COLLISION_CHECK below if you believe that SHA1's
# 1461501637330902918203684832716283019655932542976 hashes do not give you
# sufficient guarantee that no collisions between objects will ever happen.
@ -117,6 +119,10 @@ PROGRAMS += git-ssh-pull git-ssh-push
PYMODULES = \
gitMergeCommon.py
ifdef WITH_OWN_SUBPROCESS_PY
PYMODULES += compat/subprocess.py
endif
ifdef WITH_SEND_EMAIL
SCRIPT_PERL += git-send-email.perl
endif

1165
compat/subprocess.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@ URL: http://kernel.org/pub/software/scm/git/
Source: http://kernel.org/pub/software/scm/git/%{name}-%{version}.tar.gz
BuildRequires: zlib-devel, openssl-devel, curl-devel %{!?_without_docs:, xmlto, asciidoc > 6.0.3}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: rsync, rcs, curl, less, openssh-clients, python >= 2.4, tk
Requires: rsync, rcs, curl, less, openssh-clients, python >= 2.3, tk
%description
This is a stupid (but extremely fast) directory content manager. It
@ -23,11 +23,13 @@ elsewhere for tools for ordinary humans layered on top of this.
%setup -q
%build
make COPTS="$RPM_OPT_FLAGS" prefix=%{_prefix} all %{!?_without_docs: doc}
make COPTS="$RPM_OPT_FLAGS" WITH_OWN_SUBPROCESS_PY=YesPlease \
prefix=%{_prefix} all %{!?_without_docs: doc}
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} mandir=%{_mandir} \
make DESTDIR=$RPM_BUILD_ROOT WITH_OWN_SUBPROCESS_PY=YesPlease \
prefix=%{_prefix} mandir=%{_mandir} \
install %{!?_without_docs: install-doc}
%clean

View File

@ -11,12 +11,6 @@ def printList(list, file=sys.stdout):
file.write(' ')
file.write('\n')
if sys.version_info[0] < 2 or \
(sys.version_info[0] == 2 and sys.version_info[1] < 4):
die('Python version 2.4 required, found', \
str(sys.version_info[0])+'.'+str(sys.version_info[1])+'.'+ \
str(sys.version_info[2]))
import subprocess
# Debugging machinery