!3 Upgrade to a python3 supported version

Merge pull request !3 from huanghaitao/master
This commit is contained in:
openeuler-ci-bot 2020-07-23 09:14:28 +08:00 committed by Gitee
commit 8300dede08
4 changed files with 79 additions and 30 deletions

View File

@ -0,0 +1,30 @@
From e38283748f9a05da409ffbdac3f623d100aa2818 Mon Sep 17 00:00:00 2001
From: Todd Zullinger <tmz@pobox.com>
Date: Sun, 9 Dec 2018 14:11:33 -0500
Subject: [PATCH] drop python shebang opts
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fedora's RPM build scripts add the executable path and the '-s' option
to the shebang, which breaks the script¹. We'll add the '-Ru' options
via the %py2_shbang_opts while building.
¹ https://bugzilla.redhat.com/1335203
---
linkchecker | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linkchecker b/linkchecker
index 9b5be4a0..b7c3949e 100755
--- a/linkchecker
+++ b/linkchecker
@@ -1,4 +1,4 @@
-#!/usr/bin/python -Ru
+#!/usr/bin/python
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2000-2014 Bastian Kleineidam
#
--
2.20.0.rc2

Binary file not shown.

Binary file not shown.

View File

@ -1,50 +1,69 @@
Name: linkchecker
Version: 9.4.0
Release: 3
Summary: Check links in web documents or full websites
License: GPLv2
URL: https://linkcheck.github.io/linkchecker/
Source0: https://github.com/linkcheck/linkchecker/archive/v%{version}/linkchecker-%{version}.tar.gz
BuildRequires: desktop-file-utils gettext python2-devel python-setuptools
BuildRequires: qt4-devel python-requests python-dns python-pyxdg
%global py3_shbang_opts -sRu
Name: linkchecker
%global commit 72b85c4e2d74fa2b3cf11fb452b8fc2736e8ebbf
Version: 9.4.0
Release: 8.72b85c4
Summary: Check HTML documents for broken links
License: GPLv2
URL: https://linkcheck.github.io/linkchecker/
Source0: https://github.com/cjmayo/linkchecker/archive/%{commit}.tar.gz
Patch0000: 0001-drop-python-shebang-opts.patch
BuildRequires: gcc gettext python3-devel python3-setuptools
BuildRequires: python3dist(dnspython) python3dist(future) python3dist(pyxdg)
BuildRequires: python3dist(requests) >= 2.4
%description
LinkChecker is a free,GPL licensed website validator and it checks links in web documents or full websites.
%package help
Summary: Help documents for linkchecker
%description help
This package contains man pages and other related documents for linkchecker.
LinkChecker is a website validator. LinkChecker checks links in web documents or full websites.
Features:
- Recursive and multithreaded checking and site crawling
- Output in colored or normal text, HTML, SQL, CSV, XML or a sitemap graph in
different formats
- HTTP/1.1, HTTPS, FTP, mailto:, news:, nntp:, Telnet and local file links
support
- Restriction of link checking with regular expression filters for URLs
- Proxy support
- Username/password authorization for HTTP and FTP and Telnet
- Honors robots.txt exclusion protocol
- Cookie support
- HTML5 support
- HTML and CSS syntax check
- Antivirus check
- Different interfaces: command line, GUI and web interface
... and a lot more ...
%prep
%autosetup -n linkchecker-%{version} -p1
%autosetup -p1 -n %{name}-%{commit}
%build
CFLAGS="%{optflags}" %{__python2} setup.py build
%py3_build
%install
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
%py3_install
rm %{buildroot}%{_datadir}/applications/linkchecker.desktop
%find_lang linkchecker
%files -f linkchecker.lang
%doc COPYING
%{_bindir}/linkchecker
%{python2_sitearch}/linkcheck/
%{python2_sitearch}/_LinkChecker_configdata.*
%{_datadir}/linkchecker/
%exclude %{_datadir}/applications/linkchecker.desktop
%exclude %{python2_sitearch}/LinkChecker-*-py%{python2_version}.egg-info
%check
cd /
export PYTHONPATH=%{buildroot}%{python3_sitearch}
%{buildroot}%{_bindir}/linkchecker --help
%files help
%files -f linkchecker.lang
%doc doc/changelog.txt doc/upgrading.txt
%license COPYING
%{_bindir}/linkchecker
%{python3_sitearch}/linkcheck/
%{python3_sitearch}/_LinkChecker_configdata.py
%{python3_sitearch}/__pycache__/_LinkChecker_configdata.*.pyc
%{python3_sitearch}/LinkChecker-*-py%{python3_version}.egg-info/
%{_mandir}/man1/linkchecker*.1*
%{_mandir}/man5/linkcheckerrc.5*
%lang(de) %{_mandir}/de/man1/linkchecker*.1*
%lang(de) %{_mandir}/de/man5/linkcheckerrc.5*
%{_datadir}/linkchecker/
%changelog
* Sat Jul 18 2020 huanghaitao <huanghaitao8@huawei.com> - 9.4.0-8.72b85c4
- Upgrade to a python3 supported version
* Tue Jun 9 2020 leiju <leiju4@huawei.com> - 9.4.0-3
- Package init