forked from pool/python-apipkg
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user