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