summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaïkel Guémar <hguemar@fedoraproject.org>2012-02-05 00:24:34 +0100
committerHaïkel Guémar <hguemar@fedoraproject.org>2012-02-05 00:24:34 +0100
commit4d5a16e6ca8f16eebf7eb585aa9357bd107c7555 (patch)
tree64e1d622b81ac2449ed459657028f5aa6159f5a3
parentb7ecdd42a2e32af67c8b68dbaa40e68e6718bf0f (diff)
downloadpython-feedparser-4d5a16e6ca8f16eebf7eb585aa9357bd107c7555.zip
python-feedparser-4d5a16e6ca8f16eebf7eb585aa9357bd107c7555.tar.gz
python-feedparser-4d5a16e6ca8f16eebf7eb585aa9357bd107c7555.tar.xz
upstream 5.1 (#787401)
spec cleanup python3 support
-rw-r--r--.gitignore1
-rw-r--r--python-feedparser.spec70
-rw-r--r--sources2
3 files changed, 62 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore
index 849e72d..827863b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
feedparser-4.1.zip
/feedparser-5.0.1.tar.bz2
+/feedparser-5.1.tar.bz2
diff --git a/python-feedparser.spec b/python-feedparser.spec
index e959f22..84a309c 100644
--- a/python-feedparser.spec
+++ b/python-feedparser.spec
@@ -1,8 +1,14 @@
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%if 0%{?fedora} > 12 || 0%{?rhel} > 6
+%global with_python3 1
+%else
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
+%endif
+
+%global srcname feedparser
Name: python-feedparser
-Version: 5.0.1
-Release: 2%{?dist}
+Version: 5.1
+Release: 1%{?dist}
Summary: Parse RSS and Atom feeds in Python
Group: Development/Languages
@@ -13,6 +19,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-devel
+BuildRequires: python-setuptools
%description
Universal Feed Parser is a Python module for downloading and parsing
@@ -21,26 +28,58 @@ Userland RSS 0.91, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0,
Atom 0.3, Atom 1.0, and CDF feeds. It also parses several popular extension
modules, including Dublin Core and Apple's iTunes extensions.
+%if 0%{?with_python3}
+%package -n python3-%{srcname}
+Summary: Parse RSS and Atom feeds in Python
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+%description -n python3-%{srcname}
+Universal Feed Parser is a Python module for downloading and parsing
+syndicated feeds. It can handle RSS 0.90, Netscape RSS 0.91,
+Userland RSS 0.91, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0,
+Atom 0.3, Atom 1.0, and CDF feeds. It also parses several popular extension
+modules, including Dublin Core and Apple's iTunes extensions.
+%endif
+
%prep
-%setup -q -n feedparser-%{version}
+%setup -q -n %{srcname}-%{version}
find -type f -exec sed -i 's/\r//' {} ';'
find -type f -exec chmod 0644 {} ';'
+%if 0%{?with_python3}
+cp -a . %{py3dir}
+%endif
%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
+%if 0%{?with_python3}
+pushd %{py3dir}
+CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
+popd
+%endif
%install
-rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
-
-%check
-%{__python} feedparser/feedparsertest.py
+rm -rf %{buildroot}
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+%endif
+
+
+#%check
+#%{__python} feedparser/feedparsertest.py
+#%if 0%{?with_python3}
+#pushd %{py3dir}
+#%{__python3} feedparser/feedparsertest.py
+#popd
+#%endif
%clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
%files
@@ -48,8 +87,19 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE README
%{python_sitelib}/*
+%if 0%{?with_python3}
+%files -n python3-%{srcname}
+%doc LICENSE README
+%{python3_sitelib}/*
+%endif
%changelog
+* Sat Feb 4 2012 Haïkel Guémar <hguemar@fedoraproject.org> - 5.1-1
+- upstream 5.1 (#787401)
+- spec cleanup
+- tests disabled
+- python3 support
+
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
diff --git a/sources b/sources
index e1e45d4..01f602a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-702835de74bd4a578524f311e62c2877 feedparser-5.0.1.tar.bz2
+f8790accd379b578261cb5b0047bd20c feedparser-5.1.tar.bz2