From 278cfac35ce5fa4e1787fe21ba58f41bca3e41f9c9ee9d2f2e4124c361041255 Mon Sep 17 00:00:00 2001 From: Tomas Cech Date: Thu, 7 Sep 2017 09:53:56 +0000 Subject: [PATCH] Accepting request 521967 from home:mimi_vx:branches:devel:languages:python - convert to singlespec package OBS-URL: https://build.opensuse.org/request/show/521967 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cmdln?expand=0&rev=16 --- python-cmdln.changes | 5 +++++ python-cmdln.spec | 28 ++++++++++++---------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/python-cmdln.changes b/python-cmdln.changes index e3016a4..3eb57f3 100644 --- a/python-cmdln.changes +++ b/python-cmdln.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Sep 7 09:49:23 UTC 2017 - mimi.vx@gmail.com + +- convert to singlespec package + ------------------------------------------------------------------- Sat May 2 15:15:13 UTC 2015 - benoit.monin@gmx.fr diff --git a/python-cmdln.spec b/python-cmdln.spec index 2da6ef3..27084f0 100644 --- a/python-cmdln.spec +++ b/python-cmdln.spec @@ -1,7 +1,7 @@ # # spec file for package python-cmdln # -# 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,24 +16,22 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-cmdln Version: 2.0.0 Release: 0 -Url: https://github.com/trentm/cmdln Summary: An improved cmd.py for Writing Multi-command Scripts and Shells License: MIT Group: Development/Libraries/Python -Source: https://pypi.python.org/packages/source/c/cmdln/cmdln-%{version}.zip -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-devel -BuildRequires: python-setuptools +Url: https://github.com/trentm/cmdln +Source: https://files.pythonhosted.org/packages/source/c/cmdln/cmdln-%{version}.zip +BuildRequires: %{python_module base} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros BuildRequires: tcl BuildRequires: unzip -%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 `cmdln.py` is an extension of Python's default `cmd.py` module that @@ -52,18 +50,16 @@ sed -i '/^#!/d' lib/cmdln.py chmod -x examples/* %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install %check -cd test && python test.py -%files -%defattr(-,root,root) +%files %{python_files} %doc LICENSE.txt docs/ examples/ -%{python_sitelib}/cmdln-%{version}-py%{py_ver}.egg-info %{python_sitelib}/cmdln* +%pycache_only %{python3_sitelib}/__pycache__/* %changelog