Accepting request 460250 from devel:languages:python

first batch of singlespec packages

OBS-URL: https://build.opensuse.org/request/show/460250
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-appdirs?expand=0&rev=2
This commit is contained in:
Dominique Leuenberger 2017-02-27 17:30:08 +00:00 committed by Git OBS Bridge
commit 551b277ccc
5 changed files with 47 additions and 18 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8fc245efb4387a4e3e0ac8ebcc704582df7d72ff6a42a53f5600bbb18fdaadc5
size 14358

3
appdirs-1.4.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:95259bccef631e5e44438c50087f761d699005e472f8f77f20ec968e51a7e10e
size 11550

13
desetuptoolize.patch Normal file
View File

@ -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 = []

View File

@ -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

View File

@ -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