diff --git a/appdirs-1.4.0.tar.gz b/appdirs-1.4.0.tar.gz deleted file mode 100644 index 4e2a948..0000000 --- a/appdirs-1.4.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8fc245efb4387a4e3e0ac8ebcc704582df7d72ff6a42a53f5600bbb18fdaadc5 -size 14358 diff --git a/appdirs-1.4.1.tar.gz b/appdirs-1.4.1.tar.gz new file mode 100644 index 0000000..34a5b58 --- /dev/null +++ b/appdirs-1.4.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95259bccef631e5e44438c50087f761d699005e472f8f77f20ec968e51a7e10e +size 11550 diff --git a/desetuptoolize.patch b/desetuptoolize.patch new file mode 100644 index 0000000..6adfc72 --- /dev/null +++ b/desetuptoolize.patch @@ -0,0 +1,13 @@ +Index: appdirs-1.4.1/setup.py +=================================================================== +--- appdirs-1.4.1.orig/setup.py ++++ appdirs-1.4.1/setup.py +@@ -2,7 +2,7 @@ + import sys + import os + import os.path +-from setuptools import setup ++from distutils.core import setup + import appdirs + + tests_require = [] diff --git a/python-appdirs.changes b/python-appdirs.changes index d115d1b..e6bb9be 100644 --- a/python-appdirs.changes +++ b/python-appdirs.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Feb 23 11:45:52 UTC 2017 - jmatejek@suse.com + +- update for single-spec +- desetuptoolize.patch : switch from setuptools to distutils.core + for installation, as this is now a setuptools dependency +- ensure egg-info is a directory (distutils would install it as file) +- update to 1.4.1 + * [issue 55] make appname optional + ------------------------------------------------------------------- Wed Jun 3 14:17:22 UTC 2015 - tbechtold@suse.com diff --git a/python-appdirs.spec b/python-appdirs.spec index 7ed1b20..deef2d1 100644 --- a/python-appdirs.spec +++ b/python-appdirs.spec @@ -1,7 +1,7 @@ # # spec file for package python-appdirs # -# Copyright (c) 2015 SUSE LINUX 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,22 +16,21 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-appdirs -Version: 1.4.0 +Version: 1.4.1 Release: 0 Summary: A small Python module for determining platform-specific dirs License: MIT Group: Development/Languages/Python Url: http://github.com/ActiveState/appdirs -Source: https://pypi.python.org/packages/source/a/appdirs/appdirs-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools +Source: https://files.pythonhosted.org/packages/source/a/appdirs/appdirs-%{version}.tar.gz +Patch0: desetuptoolize.patch +BuildRequires: %{python_module base} +BuildRequires: python-rpm-macros BuildRoot: %{_tmppath}/%{name}-%{version}-build -%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 ``appdirs`` will @@ -42,21 +41,28 @@ help you choose an appropriate: - site data dir (``site_data_dir``) - user log dir (``user_log_dir``) - %prep %setup -q -n appdirs-%{version} +%patch0 -p1 + +# strip shebang +sed -r -i '1s/^#!.*$//' appdirs.py %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} -chmod a+x %{buildroot}%{python_sitelib}/appdirs.py +%python_install +# fix up egg-info because distutils is bad and should feel bad +%{python_expand rm %{buildroot}%{$python_sitelib}/*.egg-info +cp -r appdirs.egg-info %{buildroot}%{$python_sitelib}/appdirs-%{version}-py%{$python_version}.egg-info +} -%files +%files %{python_files} %defattr(-,root,root,-) %doc CHANGES.rst LICENSE.txt README.rst +%pycache_only %{python_sitelib}/__pycache__/* %{python_sitelib}/appdirs.py* -%{python_sitelib}/appdirs-%{version}-py*.egg-info/ +%{python_sitelib}/appdirs-%{version}-py%{python_version}.egg-info %changelog