From 02f9003b6fca4c5954574113f8ed9482a668d0998fa19d30e3079d127cd79e1d Mon Sep 17 00:00:00 2001 From: Todd R Date: Fri, 7 Apr 2017 20:56:26 +0000 Subject: [PATCH] Accepting request 486634 from home:TheBlackCat:branches:devel:languages:python - Implement single-spec version OBS-URL: https://build.opensuse.org/request/show/486634 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-vcversioner?expand=0&rev=5 --- python-vcversioner.changes | 5 +++++ python-vcversioner.spec | 19 +++++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/python-vcversioner.changes b/python-vcversioner.changes index 4363928..2b1bbe7 100644 --- a/python-vcversioner.changes +++ b/python-vcversioner.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Apr 7 20:55:59 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version + ------------------------------------------------------------------- Fri Apr 7 20:39:49 UTC 2017 - toddrme2178@gmail.com diff --git a/python-vcversioner.spec b/python-vcversioner.spec index 5be998c..76818f9 100644 --- a/python-vcversioner.spec +++ b/python-vcversioner.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-vcversioner Version: 2.16.0.0 Release: 0 @@ -24,11 +25,15 @@ Url: https://github.com/habnabit/vcversioner Group: Development/Languages/Python Source0: https://pypi.python.org/packages/source/v/vcversioner/vcversioner-%{version}.tar.gz Source1: https://raw.githubusercontent.com/habnabit/vcversioner/%{version}/COPYING -BuildRequires: python-devel -BuildRequires: python-setuptools +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch +%python_subpackages + %description Elevator pitch: you can write a setup.py with no version information specified, and vcversioner will find a recent, properly-formatted @@ -39,18 +44,20 @@ VCS tag and extract a version from it. cp %{SOURCE1} . %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} %check -python setup.py test +%python_exec setup.py test -%files +%files %{python_files} %defattr(-,root,root,-) %doc README.rst COPYING %{python_sitelib}/vcversioner.py* +%pycache_only %{python_sitelib}/__pycache__/vcversioner.*.py* %{python_sitelib}/vcversioner-%{version}-py*.egg-info %changelog