From 9d68711bed7ce00a4292baa381f8dbca50b52b9610149ada9347dd9baa652510 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Thu, 24 Oct 2013 11:06:39 +0000 Subject: [PATCH 1/3] - Require python-setuptools instead of distribute (upstreams merged) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-html2text?expand=0&rev=13 --- python-html2text.changes | 5 +++++ python-html2text.spec | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/python-html2text.changes b/python-html2text.changes index b41d81c..d3a703f 100644 --- a/python-html2text.changes +++ b/python-html2text.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Oct 24 11:06:38 UTC 2013 - speilicke@suse.com + +- Require python-setuptools instead of distribute (upstreams merged) + ------------------------------------------------------------------- Sat Jan 7 15:46:35 UTC 2012 - alexandre@exatati.com.br diff --git a/python-html2text.spec b/python-html2text.spec index f8644d3..0b8c617 100644 --- a/python-html2text.spec +++ b/python-html2text.spec @@ -1,7 +1,7 @@ # # spec file for package python-html2text # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -11,10 +11,11 @@ # 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_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} @@ -28,7 +29,7 @@ Group: Development/Languages/Python Source: html2text-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python-devel -BuildRequires: python-distribute +BuildRequires: python-setuptools %if 0%{?suse_version} %py_requires %if 0%{?suse_version} > 1110 From a63bff5b16cdd230cc69d6369b53ad11ab23523a194b182965a286cec13faa9d Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Mon, 28 Oct 2013 13:19:52 +0000 Subject: [PATCH 2/3] - Add html2text-entrypoints.patch: + Fix entry point colliding with /usr/bin/html2text - Spec cleanup OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-html2text?expand=0&rev=14 --- html2text-3.200.3.tar.bz2 | 4 ++-- html2text-3.200.3.tar.gz | 3 +++ html2text-entrypoints.patch | 32 ++++++++++++++++++++++++++++++++ python-html2text.changes | 7 +++++++ python-html2text.spec | 19 +++++++++---------- 5 files changed, 53 insertions(+), 12 deletions(-) create mode 100644 html2text-3.200.3.tar.gz create mode 100644 html2text-entrypoints.patch diff --git a/html2text-3.200.3.tar.bz2 b/html2text-3.200.3.tar.bz2 index c74e5f4..a60fc67 100644 --- a/html2text-3.200.3.tar.bz2 +++ b/html2text-3.200.3.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c9c92bc5a2a83817d3cc95406d3f4f7947936bcd08fbf65dd6e23bb8fe7a6840 -size 19463 +oid sha256:0e80a419891a7d1d722eb399898bd6fb4c26419b00ec694ca30def776ba51669 +size 19464 diff --git a/html2text-3.200.3.tar.gz b/html2text-3.200.3.tar.gz new file mode 100644 index 0000000..cca70da --- /dev/null +++ b/html2text-3.200.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:040a4ace61446ab1e323e71e95e8ce16a5f0cc889027f17974ef8be1391721df +size 21446 diff --git a/html2text-entrypoints.patch b/html2text-entrypoints.patch new file mode 100644 index 0000000..8c35926 --- /dev/null +++ b/html2text-entrypoints.patch @@ -0,0 +1,32 @@ +From ed9b7477d24caf5e5afe2a55c399eed2b9863dbd Mon Sep 17 00:00:00 2001 +From: Sascha Peilicke +Date: Mon, 28 Oct 2013 14:14:51 +0100 +Subject: [PATCH] Add ".py" suffix to html2text entrypoint + +Many distributions (including Gentoo and openSUSE) already ship +/usr/bin/html2text as part of the "html2text" package. Therefore the +current entry point collides with this system binary. Adding a .py +prefix would mean it's installed as /usr/bin/html2text.py which is just +working fine. + +Fixes #42 +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index dd3d9bc..eddeb92 100644 +--- a/setup.py ++++ b/setup.py +@@ -26,7 +26,7 @@ + ], + entry_points=""" + [console_scripts] +- html2text=html2text:main ++ html2text.py=html2text:main + """, + license='GNU GPL 3', + packages=find_packages(), +-- +1.8.4 + diff --git a/python-html2text.changes b/python-html2text.changes index d3a703f..a340583 100644 --- a/python-html2text.changes +++ b/python-html2text.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Oct 28 13:19:28 UTC 2013 - speilicke@suse.com + +- Add html2text-entrypoints.patch: + + Fix entry point colliding with /usr/bin/html2text +- Spec cleanup + ------------------------------------------------------------------- Thu Oct 24 11:06:38 UTC 2013 - speilicke@suse.com diff --git a/python-html2text.spec b/python-html2text.spec index 0b8c617..2e9946d 100644 --- a/python-html2text.spec +++ b/python-html2text.spec @@ -16,9 +16,6 @@ # -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} - Name: python-html2text Version: 3.200.3 Release: 0 @@ -26,22 +23,24 @@ Url: http://www.aaronsw.com/2002/html2text/ Summary: Turn HTML into equivalent Markdown-structured text License: GPL-3.0 Group: Development/Languages/Python -Source: html2text-%{version}.tar.bz2 +Source: https://pypi.python.org/packages/source/h/html2text/html2text-%{version}.tar.gz +# PATCH-FIX-UPSTREAM speilicke@suse.com -- https://github.com/aaronsw/html2text/pull/79 +Patch0: html2text-entrypoints.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python-devel BuildRequires: python-setuptools -%if 0%{?suse_version} -%py_requires -%if 0%{?suse_version} > 1110 +%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 -%endif %description Turn HTML into equivalent Markdown-structured text. %prep %setup -q -n html2text-%{version} +%patch0 -p1 %build python setup.py build @@ -51,8 +50,8 @@ python setup.py install --prefix=%{_prefix} --root=%{buildroot} %files %defattr(-,root,root,-) -%doc COPYING -%{_bindir}/html2text +%doc COPYING README.md +%{_bindir}/html2text.py %{python_sitelib}/* %changelog From 5a0fa63debfab5b6ee1929b51dbffa1a7da248a720be4953618bf6a2ecf540d0 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Mon, 28 Oct 2013 13:20:18 +0000 Subject: [PATCH 3/3] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-html2text?expand=0&rev=15 --- html2text-3.200.3.tar.bz2 | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 html2text-3.200.3.tar.bz2 diff --git a/html2text-3.200.3.tar.bz2 b/html2text-3.200.3.tar.bz2 deleted file mode 100644 index a60fc67..0000000 --- a/html2text-3.200.3.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0e80a419891a7d1d722eb399898bd6fb4c26419b00ec694ca30def776ba51669 -size 19464