python-appdirs/python-appdirs.spec
Jan Matejek ceb2c65731 - 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

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-appdirs?expand=0&rev=4
2017-02-23 11:48:02 +00:00

69 lines
2.1 KiB
RPMSpec

#
# spec file for package python-appdirs
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# 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/
#
%{?!python_module:%define python_module() python-%{1} python3-%{1}}
Name: python-appdirs
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://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
BuildArch: noarch
%python_subpackages
%description
``appdirs`` will
help you choose an appropriate:
- user data dir (``user_data_dir``)
- user cache dir (``user_cache_dir``)
- 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_build
%install
%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 %{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%{python_version}.egg-info
%changelog