From 19581898aee13d04b7775b81916b125f5aae9f7ac4478ad151a576e0189de158 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sat, 6 May 2017 16:29:29 +0000 Subject: [PATCH] Accepting request 491607 from devel:languages:python 1 OBS-URL: https://build.opensuse.org/request/show/491607 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-apipkg?expand=0&rev=3 --- python-apipkg.changes | 11 +++++++++++ python-apipkg.spec | 40 +++++++++++++++++++++------------------- 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/python-apipkg.changes b/python-apipkg.changes index aaa19af..0455971 100644 --- a/python-apipkg.changes +++ b/python-apipkg.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Apr 27 10:37:20 UTC 2017 - aloisio@gmx.com + +- Fixed source URL + +------------------------------------------------------------------- +Fri Apr 21 19:39:38 UTC 2017 - aloisio@gmx.com + +- Converted to single-spec +- Enabled tests + ------------------------------------------------------------------- Fri Mar 11 08:37:01 UTC 2016 - tbechtold@suse.com diff --git a/python-apipkg.spec b/python-apipkg.spec index d6ee04f..25c8eef 100644 --- a/python-apipkg.spec +++ b/python-apipkg.spec @@ -1,7 +1,7 @@ # # spec file for package python-apipkg # -# 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,6 +16,7 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-apipkg Version: 1.4 Release: 0 @@ -23,20 +24,19 @@ Summary: Namespace control and lazy-import mechanism License: MIT Group: Development/Languages/Python Url: http://bitbucket.org/hpk42/apipkg -Source: http://pypi.python.org/packages/source/a/apipkg/apipkg-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools +Source: https://files.pythonhosted.org/packages/source/a/apipkg/apipkg-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros BuildRequires: unzip # Testsuite BuildRequires: -#BuildRequires: python-nose -#BuildRequires: python-py -#BuildRequires: python-pytest +BuildRequires: %{python_module nose} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module py} 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 With apipkg you can control the exported namespace of a @@ -53,18 +53,20 @@ can copy paste the <100 Lines of code into your project. %setup -q -n apipkg-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_expand %fdupes -s %{buildroot}%{$python_sitelib} -#TODO: Fix: -#%%check -#nosetests +%check +%python_expand py.test-%{$python_version} -%files +%files %{python_files} %defattr(-,root,root,-) -%doc README.txt LICENSE -%{python_sitelib}/* +%doc README.txt LICENSE CHANGELOG +%pycache_only %{python_sitelib}/__pycache__ +%{python_sitelib}/apipkg.py* +%{python_sitelib}/apipkg-%{version}-py%{python_version}.egg-info %changelog