Accepting request 460253 from devel:languages:python
first batch of singlespec packages OBS-URL: https://build.opensuse.org/request/show/460253 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pyparsing?expand=0&rev=25
This commit is contained in:
commit
7fc55539d1
13
desetuptoolize.patch
Normal file
13
desetuptoolize.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Index: pyparsing-2.1.10/setup.py
|
||||
===================================================================
|
||||
--- pyparsing-2.1.10.orig/setup.py
|
||||
+++ pyparsing-2.1.10/setup.py
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""Setup script for the pyparsing module distribution."""
|
||||
-from setuptools import setup
|
||||
+from distutils.core import setup
|
||||
|
||||
import sys
|
||||
import os
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
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)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 2 16:32:17 UTC 2016 - toddrme2178@gmail.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-pyparsing
|
||||
#
|
||||
# Copyright (c) 2016 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,26 +16,29 @@
|
||||
#
|
||||
|
||||
|
||||
%define oldpython python
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-pyparsing
|
||||
Version: 2.1.10
|
||||
Release: 0
|
||||
Url: http://pyparsing.wikispaces.com/
|
||||
Summary: Grammar Parser Library for Python
|
||||
License: MIT and GPL-2.0+ and GPL-3.0+
|
||||
Group: Development/Languages/Python
|
||||
Url: http://pyparsing.wikispaces.com/
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pyparsing/pyparsing-%{version}.tar.gz
|
||||
Patch0: desetuptoolize.patch
|
||||
BuildRequires: %{python_module base}
|
||||
BuildRequires: python-rpm-macros
|
||||
# do not add dependencies on setuptools and ideally not even full "python";
|
||||
# this is now a dependency of setuptools
|
||||
Requires: python-base
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: python
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-setuptools
|
||||
Requires: python
|
||||
Provides: python-parsing = %{version}
|
||||
Obsoletes: python-parsing < %{version}
|
||||
%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
|
||||
%ifpython2
|
||||
Provides: %{oldpython}-parsing = %{version}
|
||||
Obsoletes: %{oldpython}-parsing < %{version}
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
The pyparsing module is an alternative approach to creating and executing
|
||||
@ -58,21 +61,28 @@ This package contains the documentation of %{name}
|
||||
|
||||
%prep
|
||||
%setup -q -n pyparsing-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
%python_build
|
||||
# Fix wrong EOL encoding:
|
||||
sed -i 's/\r$//' CHANGES LICENSE README examples/*py
|
||||
sed -i 's/\r$//' CHANGES LICENSE README examples/*
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
%python_install
|
||||
# ensure egg-info is a directory
|
||||
%{python_expand rm %{buildroot}%{$python_sitelib}/*.egg-info
|
||||
cp -r pyparsing.egg-info %{buildroot}%{$python_sitelib}/pyparsing-%{version}-py%{$python_version}.egg-info
|
||||
}
|
||||
|
||||
%files
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc CHANGES LICENSE README
|
||||
%{python_sitelib}/*
|
||||
%{python_sitelib}/pyparsing.py*
|
||||
%pycache_only %{python_sitelib}/__pycache__/*
|
||||
%{python_sitelib}/pyparsing-%{version}-py*.egg-info/
|
||||
|
||||
%files doc
|
||||
%files %{python_files doc}
|
||||
%defattr(-,root,root,-)
|
||||
%doc docs/* examples
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user