forked from pool/python-appdirs
- 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
This commit is contained in:
committed by
Git OBS Bridge
parent
63578b5ff7
commit
ceb2c65731
@@ -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-%{1} python3-%{1}}
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user