From 2c52bf11a3f728b264feef74ec7e80c6384130e5fab4fd75add552b6b1f9534d Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Thu, 16 Mar 2017 14:20:56 +0000 Subject: [PATCH] Accepting request 480500 from home:tbechtold:branches:devel:languages:python - Switch to singlespec approach OBS-URL: https://build.opensuse.org/request/show/480500 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyasn1?expand=0&rev=50 --- python-pyasn1.changes | 5 +++++ python-pyasn1.spec | 27 +++++++++++++-------------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/python-pyasn1.changes b/python-pyasn1.changes index 6f6be6a..8c3881a 100644 --- a/python-pyasn1.changes +++ b/python-pyasn1.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 16 13:42:52 UTC 2017 - tbechtold@suse.com + +- Switch to singlespec approach + ------------------------------------------------------------------- Mon Mar 6 13:28:21 UTC 2017 - michael@stroeder.com diff --git a/python-pyasn1.spec b/python-pyasn1.spec index d5c83eb..157610e 100644 --- a/python-pyasn1.spec +++ b/python-pyasn1.spec @@ -1,7 +1,7 @@ # # spec file for package python-pyasn1 # -# Copyright (c) 2015 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,6 +16,7 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pyasn1 Version: 0.2.3 Release: 0 @@ -24,17 +25,15 @@ License: BSD-2-Clause Group: Development/Languages/Python Url: https://github.com/etingof/pyasn1 Source: https://pypi.io/packages/source/p/pyasn1/pyasn1-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-pytest -BuildRequires: python-setuptools +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros Provides: python-asn1 = %{version} Obsoletes: python-asn1 < 0.1.2 BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else BuildArch: noarch -%endif + +%python_subpackages %description This is an implementation of ASN.1 types and codecs in Python programming @@ -46,15 +45,15 @@ specification. %setup -q -n pyasn1-%{version} %build -python setup.py build - -%check -python setup.py test +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install -%files +%check +%python_exec setup.py test + +%files %python_files %defattr(-,root,root,-) %doc CHANGES.rst LICENSE.rst README.md THANKS.txt TODO.rst doc %{python_sitelib}/*