diff --git a/python-pychm.changes b/python-pychm.changes index 693a159..9adeba9 100644 --- a/python-pychm.changes +++ b/python-pychm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 21 12:02:27 UTC 2017 - mpluskal@suse.com + +- Convert to singlespec + ------------------------------------------------------------------- Fri Aug 15 21:42:38 UTC 2014 - toddrme2178@gmail.com diff --git a/python-pychm.spec b/python-pychm.spec index 6d5d088..573356c 100644 --- a/python-pychm.spec +++ b/python-pychm.spec @@ -1,6 +1,7 @@ +# # spec file for package python-pychm # -# Copyright (c) 2014 SUSE LINUX Products 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 @@ -15,43 +16,49 @@ # -Name: python-pychm +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python3 1 +%define pkgname pychm +Name: python-%{pkgname} Version: 0.8.4.1 Release: 0 -License: GPL-2.0+ Summary: Python package to handle CHM files +License: GPL-2.0+ Group: Development/Libraries/Python -URL: https://github.com/dottedmag/pychm -Source0: https://pypi.python.org/packages/source/p/pychm/pychm-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools +Url: https://github.com/dottedmag/pychm +Source0: https://files.pythonhosted.org/packages/source/p/pychm/pychm-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} BuildRequires: chmlib-devel +BuildRequires: fdupes +BuildRequires: python-rpm-macros BuildRequires: swig +%ifpython2 Provides: python-PyCHM = %{version} -# change to < for next version (after 0.8.4.1) +Provides: python-pychm = %{version} Obsoletes: python-PyCHM <= %{version} -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} <= 1110 -%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +Obsoletes: python-pychm <= %{version} %endif +%python_subpackages %description The chm package provides three modules, chm, chmlib and extra, which provide access to the API implemented by the C library chmlib and some -additional classes and functions. They are used to access MS-ITSS -encoded files - Compressed Html Help files (.chm). +additional classes and functions. They are used to access MS-ITSS encoded +files - Compressed Html Help files (.chm). %prep -%setup -q -n pychm-%{version} +%setup -q -n %{pkgname}-%{version} %build -CFLAGS="%{optflags}" python setup.py build +export CFLAGS="%{optflags}" +%python_build %install -python setup.py install --root="%{buildroot}" --prefix="%{_prefix}" +%python_install +%fdupes %{buildroot} -%files -%defattr(-,root,root,-) +%files %{python_files} %doc COPYING README %{python_sitearch}/*