From 107bc81fc6e11c9abcd189a6263c2d5e2da74f3d361e7d9a2e6829a9854807ed Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Fri, 24 Feb 2017 14:34:46 +0000 Subject: [PATCH] Accepting request 460232 from devel:languages:python:singlespec - update for multipython build OBS-URL: https://build.opensuse.org/request/show/460232 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyYAML?expand=0&rev=17 --- python-PyYAML.changes | 5 +++++ python-PyYAML.spec | 31 +++++++++++++++++-------------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/python-PyYAML.changes b/python-PyYAML.changes index 0546d63..1deb4aa 100644 --- a/python-PyYAML.changes +++ b/python-PyYAML.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Feb 20 15:19:50 UTC 2017 - jmatejek@suse.com + +- update for multipython build + ------------------------------------------------------------------- Sat Sep 3 19:26:05 UTC 2016 - mardnh@gmx.de diff --git a/python-PyYAML.spec b/python-PyYAML.spec index fccfff3..30b573c 100644 --- a/python-PyYAML.spec +++ b/python-PyYAML.spec @@ -1,7 +1,7 @@ # # spec file for package python-PyYAML # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,23 +16,25 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-PyYAML Version: 3.12 Release: 0 -Url: http://pyyaml.org/wiki/PyYAML Summary: YAML parser and emitter for Python License: MIT Group: Development/Languages/Python +Url: http://pyyaml.org/wiki/PyYAML Source: https://pypi.io/packages/source/P/PyYAML/PyYAML-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} BuildRequires: libyaml-devel -BuildRequires: python-devel -BuildRequires: python-setuptools +BuildRequires: python-rpm-macros +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%ifpython2 Provides: python-yaml = %{version} Obsoletes: python-yaml < %{version} -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %endif +%python_subpackages %description YAML is a data serialization format designed for human readability @@ -51,24 +53,25 @@ configuration files to object serialization and persistance. %setup -q -n PyYAML-%{version} %build -CFLAGS="%{optflags}" python setup.py build +export CFLAGS="%{optflags}" +%python_build find examples -type f | xargs chmod -x # Fix example permissions %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install %check #increase file-descriptor-count for ppc to make tests happy %ifarch ppc ppc64 s390 s390x -ulimit -Sn 2048 +ulimit -Sn 2048 %endif -python setup.py test +%python_exec setup.py test -%files +%files %{python_files} %defattr(-,root,root,-) %doc CHANGES LICENSE README examples %{python_sitearch}/yaml -%{python_sitearch}/_yaml.so -%{python_sitearch}/PyYAML-%{version}-py%{py_ver}.egg-info +%{python_sitearch}/_yaml.*so +%{python_sitearch}/PyYAML-%{version}-py%{python_version}.egg-info %changelog