14
0

osc copypac from project:devel:languages:python:singlespec package:python-setuptools_scm revision:2, using expand

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools_scm?expand=0&rev=12
This commit is contained in:
Thomas Bechtold
2017-03-02 14:38:21 +00:00
committed by Git OBS Bridge
parent 6649931968
commit a3229ec511

View File

@@ -15,7 +15,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-setuptools_scm
Version: 1.15.0
Release: 0
@@ -23,22 +23,21 @@ Summary: Manage your versions by scm tags
License: MIT
Group: Development/Languages/Python
Url: https://github.com/pypa/setuptools_scm
Source: https://pypi.io/packages/source/s/setuptools_scm/setuptools_scm-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-setuptools
Source: https://file.pythonhosted.org/packages/source/s/setuptools_scm/setuptools_scm-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
# Testing requirements
BuildRequires: git
BuildRequires: mercurial
BuildRequires: python-pytest
Requires: python-setuptools
BuildRequires: %{python_module pytest}
Requires: %{python_module setuptools}
Recommends: git
Recommends: mecurial
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
The setuptools_scm package handles managing your python package versions
@@ -48,15 +47,15 @@ in scm metadata. It also handles file finders for the supperted scm's.
%setup -q -n setuptools_scm-%{version}
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
%check
PYTHONPATH=%{buildroot}%{python_sitelib} py.test
%python_expand PYTHONPATH=%{buildroot}%{python_sitelib} py.test-%{python_version}
%files
%files %python_files
%defattr(-,root,root,-)
%doc README.rst LICENSE CHANGELOG.rst
%{python_sitelib}/*