remove macros for %__python and add pythondeps27.sh [release 2.7.18-3mamba;Tue Jan 25 2022]
This commit is contained in:
parent
202cade2c7
commit
c92cdace47
@ -7,16 +7,17 @@
|
||||
%define __libdir %{_libdir}
|
||||
Name: python27
|
||||
Version: 2.7.18
|
||||
Release: 2mamba
|
||||
Release: 3mamba
|
||||
Summary: An interpreted, interactive, object-oriented programming language
|
||||
Group: Applications/Development
|
||||
Vendor: openmamba
|
||||
Distribution: openmamba
|
||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
URL: http://www.python.org
|
||||
URL: https://www.python.org/
|
||||
Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
|
||||
Source1: python-2.7-macros.python
|
||||
Source2: python-macros.python
|
||||
Source3: pythondeps27.sh
|
||||
Patch1: %{name}-2.7.3-cgi.patch
|
||||
Patch2: %{name}-2.7.3-platform_add_openmamba_distro.patch
|
||||
# Cross-compile patches available from:
|
||||
@ -56,7 +57,7 @@ Provides: python-abi = %{majversion}
|
||||
Provides: python(abi) = %{majversion}
|
||||
Provides: /usr/bin/python
|
||||
Provides: python = %{?epoch:epoch:}%{version}-%{release}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
Obsoletes: python27-doc <= 2.7.18-2mamba
|
||||
|
||||
%description
|
||||
Python is an interpreted, interactive, object-oriented programming language.
|
||||
@ -72,7 +73,7 @@ The Python implementation is portable: it runs on many brands of UNIX, on Window
|
||||
Group: System/Libraries/Python
|
||||
Summary: Libraries for Python
|
||||
Provides: libpython
|
||||
Obsoletes: libpython
|
||||
Obsoletes: libpython < 2.7.18-3mamba
|
||||
|
||||
%description -n %{libname}
|
||||
Python is an interpreted, interactive, object-oriented programming language.
|
||||
@ -83,7 +84,6 @@ There are interfaces to many system calls and libraries, as well as to various w
|
||||
New built-in modules are easily written in C or C++.
|
||||
Python is also usable as an extension language for applications that need a programmable interface.
|
||||
The Python implementation is portable: it runs on many brands of UNIX, on Windows, DOS, OS/2, Mac, Amiga...
|
||||
|
||||
This package contains the libraries for Python.
|
||||
|
||||
%package -n %{libname}-devel
|
||||
@ -91,11 +91,11 @@ Group: Development/Libraries/Python
|
||||
Summary: Devel package for Python
|
||||
Requires: %{libname} = %{?epoch:epoch:}%{version}-%{release}
|
||||
Provides: %{name}-devel = %{version}
|
||||
Obsoletes: %{name}-devel
|
||||
Obsoletes: %{name}-devel < 2.7.18-3mamba
|
||||
Provides: libpython-devel
|
||||
Obsoletes: libpython-devel
|
||||
Obsoletes: libpython-devel < 2.7.18-3mamba
|
||||
Provides: python-devel
|
||||
Obsoletes: python-devel
|
||||
Obsoletes: python-devel < 2.7.18-3mamba
|
||||
|
||||
%description -n %{libname}-devel
|
||||
Python is an interpreted, interactive, object-oriented programming language.
|
||||
@ -106,7 +106,6 @@ There are interfaces to many system calls and libraries, as well as to various w
|
||||
New built-in modules are easily written in C or C++.
|
||||
Python is also usable as an extension language for applications that need a programmable interface.
|
||||
The Python implementation is portable: it runs on many brands of UNIX, on Windows, DOS, OS/2, Mac, Amiga...
|
||||
|
||||
This package contains the development files for Python.
|
||||
|
||||
%package doc
|
||||
@ -114,7 +113,7 @@ Group: Documentation
|
||||
Summary: Documentation package for Python
|
||||
Requires: %{name} = %{?epoch:epoch:}%{version}-%{release}
|
||||
Provides: python-doc
|
||||
Obsoletes: python-doc
|
||||
Obsoletes: python-doc < 2.7.18-3mamba
|
||||
|
||||
%description doc
|
||||
Python is an interpreted, interactive, object-oriented programming language.
|
||||
@ -125,7 +124,6 @@ There are interfaces to many system calls and libraries, as well as to various w
|
||||
New built-in modules are easily written in C or C++.
|
||||
Python is also usable as an extension language for applications that need a programmable interface.
|
||||
The Python implementation is portable: it runs on many brands of UNIX, on Windows, DOS, OS/2, Mac, Amiga...
|
||||
|
||||
This package contains the documentation files for Python in HTML format.
|
||||
|
||||
%package tk
|
||||
@ -133,7 +131,7 @@ Group: System/Libraries/Python
|
||||
Summary: Tk library for Python
|
||||
Requires: %{name} = %{?epoch:epoch:}%{version}-%{release}
|
||||
Provides: python-tk
|
||||
Obsoletes: python-tk
|
||||
Obsoletes: python-tk < 2.7.18-3mamba
|
||||
|
||||
%description tk
|
||||
Python is an interpreted, interactive, object-oriented programming language.
|
||||
@ -144,7 +142,6 @@ There are interfaces to many system calls and libraries, as well as to various w
|
||||
New built-in modules are easily written in C or C++.
|
||||
Python is also usable as an extension language for applications that need a programmable interface.
|
||||
The Python implementation is portable: it runs on many brands of UNIX, on Windows, DOS, OS/2, Mac, Amiga...
|
||||
|
||||
This package contains the tk library for Python.
|
||||
|
||||
%debug_package
|
||||
@ -231,24 +228,25 @@ ln -s python%{majversion} %{buildroot}%{_includedir}/python
|
||||
# fix library permission
|
||||
chmod 755 %{buildroot}%{__libdir}/libpython%{majversion}.so.*
|
||||
|
||||
%if "%{stage1}" != "1"
|
||||
# build the HTML documentation
|
||||
cd Doc
|
||||
#%if "%{stage1}" != "1"
|
||||
## build the HTML documentation
|
||||
#cd Doc
|
||||
#
|
||||
####sed -i s@/usr/bin/env@/bin/env@ tools/mkhowto
|
||||
#PATH=$PATH:%{_builddir}/Python-%{version}/Doc/tools
|
||||
#make html
|
||||
#
|
||||
#install -d %{buildroot}%{_defaultdocdir}/%{name}-%{version}
|
||||
#cp -R build/html build/doctrees %{buildroot}%{_defaultdocdir}/%{name}-%{version}
|
||||
#rm -f 'find %{buildroot}%{_defaultdocdir}/%{name}-%{version}/html/.cvsignore'
|
||||
#
|
||||
#cd ..
|
||||
##make PAPER=a4 pdf
|
||||
#%endif
|
||||
|
||||
###sed -i s@/usr/bin/env@/bin/env@ tools/mkhowto
|
||||
PATH=$PATH:%{_builddir}/Python-%{version}/Doc/tools
|
||||
make html
|
||||
|
||||
install -d %{buildroot}%{_defaultdocdir}/%{name}-%{version}
|
||||
cp -R build/html build/doctrees %{buildroot}%{_defaultdocdir}/%{name}-%{version}
|
||||
rm -f 'find %{buildroot}%{_defaultdocdir}/%{name}-%{version}/html/.cvsignore'
|
||||
|
||||
cd ..
|
||||
#make PAPER=a4 pdf
|
||||
%endif
|
||||
|
||||
install -D -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.python%{majversion}
|
||||
install -D -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/rpm/macros.python
|
||||
install -D -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.python27
|
||||
#install -D -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/rpm/macros.python
|
||||
install -D -m0755 %{SOURCE3} %{buildroot}%{_prefix}/lib/rpm/pythondeps27.sh
|
||||
|
||||
# install i18n tools for development
|
||||
install -D -m0755 Tools/i18n/msgfmt.py %{buildroot}%{_bindir}/msgfmt%{majversion}.py
|
||||
@ -336,11 +334,11 @@ exit 0
|
||||
|
||||
%files -n %{libname}-devel
|
||||
%defattr(-,root,root)
|
||||
%{_sysconfdir}/rpm/macros.python%{majversion}
|
||||
%{_sysconfdir}/rpm/macros.python
|
||||
%{_sysconfdir}/rpm/macros.python27
|
||||
%{_bindir}/msgfmt%{majversion}.py
|
||||
%{_bindir}/pygettext%{majversion}.py
|
||||
%{_bindir}/python*-config
|
||||
%{_prefix}/lib/rpm/pythondeps27.sh
|
||||
%{_includedir}/python
|
||||
%dir %{_includedir}/python%{majversion}
|
||||
%{_includedir}/python%{majversion}/*.h
|
||||
@ -355,16 +353,19 @@ exit 0
|
||||
%{__libdir}/python%{majversion}/lib-tk
|
||||
%{__libdir}/python%{majversion}/lib-dynload/_tkinter.so
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root)
|
||||
%dir %{_defaultdocdir}/%{name}-%{version}/html/
|
||||
%{_defaultdocdir}/%{name}-%{version}/html/*
|
||||
%{_defaultdocdir}/%{name}-%{version}/html/.buildinfo
|
||||
%dir %{_defaultdocdir}/%{name}-%{version}/doctrees
|
||||
%{_defaultdocdir}/%{name}-%{version}/doctrees/*
|
||||
#%files doc
|
||||
#%defattr(-,root,root)
|
||||
#%dir %{_defaultdocdir}/%{name}-%{version}/html/
|
||||
#%{_defaultdocdir}/%{name}-%{version}/html/*
|
||||
#%{_defaultdocdir}/%{name}-%{version}/html/.buildinfo
|
||||
#%dir %{_defaultdocdir}/%{name}-%{version}/doctrees
|
||||
#%{_defaultdocdir}/%{name}-%{version}/doctrees/*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jan 25 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 2.7.18-3mamba
|
||||
- remove macros for %__python and add pythondeps27.sh
|
||||
|
||||
* Fri Jan 01 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.7.18-2mamba
|
||||
- updated rpm macros files
|
||||
|
||||
|
22
pythondeps27.sh
Normal file
22
pythondeps27.sh
Normal file
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ $# -ge 1 ] || {
|
||||
cat > /dev/null
|
||||
exit 0
|
||||
}
|
||||
|
||||
PYVER=`python2.7 -c "import sys; v=sys.version_info[:2]; print ('%d.%d'%v)"`
|
||||
case $1 in
|
||||
-P|--provides)
|
||||
shift
|
||||
grep "/usr/lib[^/]*/libpython${PYVER}\..*\.so.*\$" >/dev/null && echo "python(abi) = ${PYVER}"
|
||||
exit 0
|
||||
;;
|
||||
-R|--requires)
|
||||
shift
|
||||
grep "/usr/\(lib[^/]*\|share\)/python${PYVER}/" >/dev/null && echo "python(abi) = ${PYVER}"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user