diff --git a/macros.python b/macros.python deleted file mode 100644 index 99a22e2..0000000 --- a/macros.python +++ /dev/null @@ -1,20 +0,0 @@ -%py_ver %(python -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND) -%py_prefix %(python -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND) -%py_libdir %{py_prefix}/%{_lib}/python%{py_ver} -%py_incdir %{py_prefix}/include/python%{py_ver} -%py_sitedir %{py_libdir}/site-packages -%__python2 /usr/bin/python2 - -%py_compile(O) \ -find %1 -name '*.pyc' -exec rm -f {} \\; \ -python -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \ -%{-O: \ -find %1 -name '*.pyo' -exec rm -f {} \\; \ -python -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \ -} -%py_requires(d) \ -BuildRequires: /usr/bin/python %{-d:python-devel} \ -PreReq: python = %{py_ver} - -%python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib();") -%python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True);") diff --git a/macros.python2 b/macros.python2 new file mode 100644 index 0000000..434c2c6 --- /dev/null +++ b/macros.python2 @@ -0,0 +1,23 @@ +# legacy macros. commented but kept for the sake of possible recovery of their values +#%py_ver %(python -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND) +#%py_prefix %(python -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND) +#%py_libdir %{py_prefix}/%{_lib}/python%{py_ver} +#%py_incdir %{py_prefix}/include/python%{py_ver} +#%py_sitedir %{py_libdir}/site-packages +#%__python2 /usr/bin/python2 + +# these might be still in use somewhere +%py_compile(O) \ +find %1 -name '*.pyc' -exec rm -f {} \\; \ +python -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \ +%{-O: \ +find %1 -name '*.pyo' -exec rm -f {} \\; \ +python -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \ +} +%py_requires(d) \ +BuildRequires: /usr/bin/python %{-d:python-devel} \ +PreReq: python = %{py_ver} + +# new-style macros relying on python-rpm-macros package +%have_python2 1 +%python2_package_prefix python2 diff --git a/python-base.changes b/python-base.changes index e24730e..60e3312 100644 --- a/python-base.changes +++ b/python-base.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Dec 2 15:32:59 UTC 2016 - jmatejek@suse.com + +- provide python2-* symbols, for support of new packages built as + python2-foo +- rename macros.python to macros.python2 accordingly +- require python-rpm-macros package, drop macro definitions from + macros.python2 + ------------------------------------------------------------------- Thu Jun 30 09:23:05 UTC 2016 - jmatejek@suse.com diff --git a/python-base.spec b/python-base.spec index 2b189d5..1fadf4e 100644 --- a/python-base.spec +++ b/python-base.spec @@ -28,7 +28,7 @@ Url: http://www.python.org/ Source0: http://www.python.org/ftp/python/%{version}/%{tarname}.tar.xz Source4: http://www.python.org/ftp/python/%{version}/%{tarname}.tar.xz.asc Source6: python.keyring -Source1: macros.python +Source1: macros.python2 Source2: baselibs.conf Source3: README.SUSE Source5: local.pth @@ -66,6 +66,7 @@ BuildRequires: xz BuildRequires: zlib-devel # for the test suite BuildRequires: netcfg +Requires: python-rpm-macros # explicitly, see bnc#697251: Requires: libpython2_7-1_0 = %{version} Provides: %{name} = %{python_version} @@ -77,6 +78,8 @@ Provides: python-ctypes = 1.1.0 Obsoletes: python-ctypes < 1.1.0 BuildRoot: %{_tmppath}/%{name}-%{version}-build +Provides: python2-base = %{version} + %description Python is an interpreted, object-oriented programming language, and is often compared to Tcl, Perl, Scheme, or Java. You can find an overview @@ -92,6 +95,7 @@ Group: Development/Languages/Python Requires: glibc-devel Requires: python = %{version} Requires: python-base = %{version}-%{release} +Provides: python2-devel = %{version} %description -n python-devel The Python programming language's interpreter can be extended with @@ -108,6 +112,7 @@ Requires: python-base = %{version}-%{release} # pyxml used to live out of tree Provides: pyxml = 0.8.5 Obsoletes: pyxml < 0.8.5 +Provides: python2-xml = %{version} %description -n python-xml The expat module is a Python interface to the expat XML parser. Since @@ -307,7 +312,7 @@ cp Makefile Makefile.pre.in Makefile.pre %{buildroot}%{_libdir}/python%{python_v %files %defattr(644, root, root, 755) -%config %{_sysconfdir}/rpm/macros.python +%config %{_sysconfdir}/rpm/macros.python2 %dir %{_docdir}/%{name} %doc %{_docdir}/%{name}/README %doc %{_docdir}/%{name}/LICENSE diff --git a/python-doc.changes b/python-doc.changes index 50e9431..30fdd22 100644 --- a/python-doc.changes +++ b/python-doc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Dec 2 15:36:00 UTC 2016 - jmatejek@suse.com + +- provide python2-* symbols, for support of new packages built as + python2-foo + ------------------------------------------------------------------- Thu Jun 30 09:23:05 UTC 2016 - jmatejek@suse.com diff --git a/python-doc.spec b/python-doc.spec index 39d1659..d431305 100644 --- a/python-doc.spec +++ b/python-doc.spec @@ -65,6 +65,7 @@ Obsoletes: pyth_ps BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch Enhances: python = %{version} +Provides: python2-doc = %{version} %description Tutorial, Global Module Index, Language Reference, Library Reference, @@ -76,6 +77,7 @@ Summary: Python PDF Documentation Group: Development/Languages/Python Provides: pyth_pdf Obsoletes: pyth_pdf +Provides: python2-doc-pdf = %{version} %description pdf Tutorial, Global Module Index, Language Reference, Library Reference, diff --git a/python.changes b/python.changes index 98a2d3e..b05d5c3 100644 --- a/python.changes +++ b/python.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Dec 2 15:35:29 UTC 2016 - jmatejek@suse.com + +- provide python2-* symbols, for support of new packages built as + python2-foo + ------------------------------------------------------------------- Thu Jun 30 09:23:05 UTC 2016 - jmatejek@suse.com diff --git a/python.spec b/python.spec index 6af0e5c..ac2a904 100644 --- a/python.spec +++ b/python.spec @@ -83,6 +83,7 @@ Requires: python-base = %{version} Recommends: python-strict-tls-check %endif Provides: %{name} = %{python_version} +Provides: python2 = %{version} Obsoletes: python-elementtree Obsoletes: python-nothreads Obsoletes: python-sqlite @@ -107,6 +108,7 @@ Summary: An Integrated Development Environment for Python Group: Development/Languages/Python Requires: python-base = %{version} Requires: python-tk +Provides: python2-idle = %{version} %description idle IDLE is a Tkinter based integrated development environment for Python. @@ -120,6 +122,7 @@ Group: Development/Languages/Python Requires: python-base = %{version} Provides: pyth_dmo Obsoletes: pyth_dmo +Provides: python2-demo = %{version} %description demo Various demonstrations of what you can do with Python and a number of @@ -139,6 +142,7 @@ Provides: python_tkinter_lib Obsoletes: pyth_tk Obsoletes: pyth_tkl Obsoletes: python-tkinter +Provides: python2-tk = %{version} %description tk Python interface to Tk. Tk is the GUI toolkit that comes with Tcl. The @@ -150,6 +154,7 @@ Group: Development/Libraries/Python Requires: python-base = %{version} Obsoletes: pyth_cur Provides: pyth_cur +Provides: python2-curses = %{version} %description curses An easy to use interface to the (n)curses CUI library. CUI stands for @@ -161,6 +166,7 @@ Group: Development/Libraries/Python Requires: python-base = %{version} Obsoletes: pygdmod Provides: pygdmod +Provides: python2-gdbm = %{version} %description gdbm An easy to use interface for GDBM databases. GDBM is the GNU