OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=99
This commit is contained in:
committed by
Git OBS Bridge
parent
688caf8d33
commit
ca11443145
44
python.spec
44
python.spec
@@ -31,8 +31,8 @@ Obsoletes: python-64bit
|
||||
#
|
||||
Obsoletes: python-nothreads python21 python-elementtree python-sqlite
|
||||
Summary: Python Interpreter
|
||||
Version: 2.7
|
||||
Release: 15
|
||||
Version: 2.7.1
|
||||
Release: 5
|
||||
Requires: python-base = %{version}
|
||||
%define tarversion %{version}
|
||||
%define tarname Python-%{tarversion}
|
||||
@@ -44,14 +44,13 @@ Source4: python.csh
|
||||
#Source11: testfiles.tar.bz2
|
||||
# issues with copyrighted Unicode testing files
|
||||
Patch1: python-2.7-dirs.patch
|
||||
Patch2: Python-2.7rc2-multilib.patch
|
||||
Patch2: python-2.7.1-multilib.patch
|
||||
Patch3: python-2.7rc2-canonicalize2.patch
|
||||
Patch4: python-2.5.1-sqlite.patch
|
||||
Patch5: python-2.7rc2-configure.patch
|
||||
Patch6: python-2.6b3-curses-panel.patch
|
||||
Patch7: sparc_longdouble.patch
|
||||
Patch8: python-2.7-acrequire.patch
|
||||
Patch9: python-fix_date_time_compiler.patch
|
||||
Patch9: python-2.7.1-fix_date_time_compiler.patch
|
||||
Patch10: python-2.7-fix-parallel-make.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
@@ -173,7 +172,6 @@ Authors:
|
||||
Guido van Rossum <guido@python.org>
|
||||
|
||||
%prep
|
||||
#%%setup -q -n %{tarname} -a11
|
||||
%setup -q -n %{tarname}
|
||||
# patching
|
||||
%patch1 -p1
|
||||
@@ -183,37 +181,20 @@ Authors:
|
||||
%patch5
|
||||
%patch6
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
# some cleanup
|
||||
find . -name .cvsignore -type f -print0 | xargs -0 rm -f
|
||||
find . -name CVS -type d -print0 | xargs -0 rm -rf
|
||||
|
||||
# drop Autoconf version requirement
|
||||
sed -i 's/^version_required/dnl version_required/' configure.in
|
||||
|
||||
%build
|
||||
########################################
|
||||
# disable as-needed to fix build
|
||||
########################################
|
||||
export SUSE_ASNEEDED=0
|
||||
########################################
|
||||
# use rpm_opt_flags
|
||||
########################################
|
||||
export OPT="$RPM_OPT_FLAGS"
|
||||
########################################
|
||||
# regenerate
|
||||
########################################
|
||||
|
||||
autoreconf -f -i . # Modules/_ctypes/libffi
|
||||
# prevent make from trying to rebuild asdl stuff, which requires existing
|
||||
# python installation
|
||||
touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h
|
||||
# use just gcc instead of [GCC 4.5.0 20100604 [gcc-4_5-branch revision 160292]..
|
||||
echo '#define PYTHON_COMPILER "[GCC]"' >> pyconfig.h.in
|
||||
# use a compilation date equivalent to the source tarball.
|
||||
printf '#define PY_BUILD_DATE "%s %s %s"\n' $(date -u -r %{SOURCE0} +"%b %d %Y") >> pyconfig.h.in
|
||||
printf '#define PY_BUILD_TIME "%s"\n' $(date -u -r %{SOURCE0} +"%T") >> pyconfig.h.in
|
||||
########################################
|
||||
# configure
|
||||
########################################
|
||||
|
||||
./configure \
|
||||
--prefix=%{_prefix} \
|
||||
--libdir=%{_libdir} \
|
||||
@@ -223,9 +204,7 @@ printf '#define PY_BUILD_TIME "%s"\n' $(date -u -r %{SOURCE0} +"%T") >> pyconfig
|
||||
--with-fpectl \
|
||||
--enable-shared \
|
||||
--enable-unicode=ucs4
|
||||
########################################
|
||||
# compile
|
||||
########################################
|
||||
|
||||
make %{?_smp_mflags} DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
%check
|
||||
@@ -314,7 +293,6 @@ rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_random.so
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_socket.so
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_struct.so
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_testcapi.so
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/_weakref.so
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/array.so
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/binascii.so
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/python%{python_version}/lib-dynload/bz2.so
|
||||
|
Reference in New Issue
Block a user