From 38b48f18052aef693e6ad293a55a0e94441b800fd3808848d68777de4b6d1d77 Mon Sep 17 00:00:00 2001 From: Todd R Date: Mon, 24 Apr 2017 15:13:06 +0000 Subject: [PATCH] Accepting request 489992 from home:alois:branches:devel:languages:python converted to single-spec (2nd attempt) OBS-URL: https://build.opensuse.org/request/show/489992 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pathtools?expand=0&rev=5 --- python-pathtools.changes | 6 ++++++ python-pathtools.spec | 34 ++++++++++++++++++---------------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/python-pathtools.changes b/python-pathtools.changes index 4794b0d..a5eae38 100644 --- a/python-pathtools.changes +++ b/python-pathtools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Apr 23 07:24:48 UTC 2017 - aloisio@gmx.com + +- Converted to single-spec +- Added docs + ------------------------------------------------------------------- Thu Oct 24 11:09:53 UTC 2013 - speilicke@suse.com diff --git a/python-pathtools.spec b/python-pathtools.spec index 8029542..aa18395 100644 --- a/python-pathtools.spec +++ b/python-pathtools.spec @@ -1,7 +1,7 @@ # # spec file for package python-pathtools # -# Copyright (c) 2013 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 @@ -16,6 +16,7 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pathtools Version: 0.1.2 Release: 0 @@ -23,34 +24,35 @@ Url: http://github.com/gorakhargosh/pathtools Summary: File system general utilities License: MIT Group: Development/Languages/Python -Source: http://pypi.python.org/packages/source/p/pathtools/pathtools-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/source/p/pathtools/pathtools-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: python3-Sphinx BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-devel -BuildRequires: python-setuptools -#BuildRequires: python-Sphinx -%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 Pattern matching and various utilities for file systems paths. %prep %setup -q -n pathtools-%{version} +sed -i "1d" pathtools/path.py pathtools/patterns.py %build -python setup.py build -#cd docs && make html && rm -r build/html/.buildinfo # Build HTML docs +%python_build +cd docs && make html && rm -r build/html/.buildinfo # Build HTML docs %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_expand %fdupes -s %{buildroot}%{$python_sitelib} -%files +%files %{python_files} %defattr(-,root,root,-) -%doc AUTHORS LICENSE README -#%%doc docs/build/html -%{python_sitelib}/* +%doc AUTHORS LICENSE README docs/build/html +%{python_sitelib}/pathtools +%{python_sitelib}/pathtools-%{version}-py%{python_version}.egg-info %changelog