diff options
| author | Scott Bahling <sbahling@suse.com> | 2020-09-07 17:32:16 +0200 |
|---|---|---|
| committer | Scott Bahling <sbahling@suse.com> | 2020-09-07 17:32:16 +0200 |
| commit | 688a043ea015d2d66b92c4fd96fc3aa5a90b8f99 (patch) | |
| tree | e216b97b5cfe557d80b896a68ea6223f721f73e4 /spec | |
| parent | 227641df0c5e5f8425215e7cd9f6bcda946ce443 (diff) | |
| download | obsapi-688a043ea015d2d66b92c4fd96fc3aa5a90b8f99.tar.gz obsapi-688a043ea015d2d66b92c4fd96fc3aa5a90b8f99.tar.xz obsapi-688a043ea015d2d66b92c4fd96fc3aa5a90b8f99.zip | |
Update versioneer and packaging build configsobsapi-0.2.0
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/python-obsapi.spec.tmpl | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/spec/python-obsapi.spec.tmpl b/spec/python-obsapi.spec.tmpl index a99ca6e..d0b206e 100644 --- a/spec/python-obsapi.spec.tmpl +++ b/spec/python-obsapi.spec.tmpl @@ -1,7 +1,7 @@ # # spec file for package python-obsapi (version __version__) # -# Copyright (c) 2015 SUSE Linux GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,27 +12,22 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ -# -%define version __version__ -%define gitversion __gitversion__ +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-obsapi -Version: %{version} +Version: __version__ Release: 0 Summary: Python library abstracting the OBS api License: GPL-2.0 Group: Development/Languages/Python -BuildRequires: python -BuildRequires: python-setuptools -Requires: python-requests +BuildRequires: python-rpm-macros +BuildRequires: %{pythons} +BuildRequires: %{python_module setuptools} BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: obsapi-%{gitversion}.tar.bz2 +Source: obsapi-%{version}.tar.bz2 -%if 0%{?suse_version} > 1110 -BuildArch: noarch -%endif +%python_subpackages %{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} @@ -41,19 +36,21 @@ The obsapi library is meant to provide a simple set of abstractions to the Open Build Service api for use in python scripting. %prep -%setup -q -n obsapi-%{gitversion} +%setup -q -n obsapi-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} --record-rpm=INSTALLED_FILES +%python_install %clean rm -rf %{buildroot} -%files -f INSTALLED_FILES +%files %{python_files} %defattr(-,root,root) %doc README.rst AUTHORS COPYING ChangeLog +%{python_sitelib}/obsapi +%{python_sitelib}/obsapi-%{version}-py*.egg-info %changelog |
