Mailinglist Archive: opensuse-factory (1134 mails)

< Previous Next >
Re: [opensuse-factory] Python for after 12.2
  • From: Sascha Peilicke <saschpe@xxxxxx>
  • Date: Tue, 26 Jun 2012 11:27:22 +0200
  • Message-id: <4FE9807A.6070601@gmx.de>
On 06/25/2012 11:12 AM, todd rme wrote:
Considering all of the talk about improving openSUSE quality, and with
12.2 branched, I would like to discuss somewhat how to move forward
with Python packaging in openSUSE.

Hi,

some other things I saw recently related to Python3 packaging:

BuildRequires: python3
BuildRequires: python3-devel

You need only one, not both. Generally, we recommend using the latter
(as it should always work). For Python-only packages (i.e. no
arch-dependant code contained) the former should suffice but it's more
consistent to always use the -devel package.

Requires: python3 >= %{py3_ver}

Is only needed on SLE-11, check "rpm -q --requires $PKG" (or "rpm -qp
--requires $PKG"). You get those automatically, i.e. like this:

% rpm -qp --requires
/var/tmp/build-root/openSUSE_Factory-x86_64/home/abuild/rpmbuild/RPMS/noarch/python3-pep8-1.3.1-0.noarch.rpm
/usr/bin/python3
python(abi) = 3.2
...


As you recommended, we should probably update
http://en.opensuse.org/openSUSE:Packaging_Python. Maybe a special
paragraph should deal with SLE-11 compatibility issues, i.e. mentioning
this beauty:

%if 0%{?suse_version} <= 1140
%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from
distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?py3_ver: %global py3_ver %(python3 -c "import sys;
version=str(sys.version_info[0]) + '.' + str(sys.version_info[1]);
print(version)" 2>/dev/null || echo PYTHON-NOT-FOUND)}
Requires: python3 >= %{py3_ver}
%endif

Or we just decide to not care at all about Python-3 and SLE-11 :-)

Besides, thank you for actually getting things done!
--
Viele Grüße,
Sascha Peilicke



< Previous Next >
Follow Ups
References