diff --git a/0001-add-tox-config-file-for-test.patch b/0001-add-tox-config-file-for-test.patch new file mode 100644 index 0000000..a72c215 --- /dev/null +++ b/0001-add-tox-config-file-for-test.patch @@ -0,0 +1,46 @@ +From d44ce30ea0c77dc1f6ad5a5a8c84fccec6109a65 Mon Sep 17 00:00:00 2001 +From: desert-sailor +Date: Thu, 27 Apr 2023 11:33:09 +0800 +Subject: [PATCH 1/2] add tox config file for test + +--- + tox.ini | 27 +++++++++++++++++++++++++++ + 1 file changed, 27 insertions(+) + create mode 100644 tox.ini + +diff --git a/tox.ini b/tox.ini +new file mode 100644 +index 0000000..6a461aa +--- /dev/null ++++ b/tox.ini +@@ -0,0 +1,27 @@ ++[tox] ++env_list = ++ py{39, 310, 311},bare,docs ++minversion = 3.28.0 ++skip_missing_interpreters = true ++isolated_build = True ++ ++[testenv] ++package = wheel ++wheel_build_env = .pkg ++description = run the tests with all dependencies installed ++deps = lxml ++ html5lib ++ soupsieve>=1.2 ++ pytest>=6 ++commands = pytest {tty:--color=yes} {posargs} ++ ++[testenv:docs] ++basepython = python3 ++description = build the documentation ++deps = sphinx ++commands = sphinx-build -b html doc/source doc/build/html ++ ++[testenv:bare] ++description = run the tests on the oldest supported version of Python, without any dependencies installed ++basepython = python3.6 ++deps = pytest>=6 +-- +2.33.0 + diff --git a/beautifulsoup4-4.11.1.tar.gz b/beautifulsoup4-4.11.1.tar.gz deleted file mode 100644 index f9f653a..0000000 Binary files a/beautifulsoup4-4.11.1.tar.gz and /dev/null differ diff --git a/beautifulsoup4-4.12.2.tar.gz b/beautifulsoup4-4.12.2.tar.gz new file mode 100644 index 0000000..82d6a9d Binary files /dev/null and b/beautifulsoup4-4.12.2.tar.gz differ diff --git a/python-beautifulsoup4.spec b/python-beautifulsoup4.spec index f28ae6c..a1e234a 100644 --- a/python-beautifulsoup4.spec +++ b/python-beautifulsoup4.spec @@ -1,11 +1,14 @@ %global _empty_manifest_terminate_build 0 + Name: python-beautifulsoup4 -Version: 4.11.1 +Version: 4.12.2 Release: 1 Summary: Screen-scraping library License: MIT URL: https://www.crummy.com/software/BeautifulSoup/bs4/ -Source0: https://files.pythonhosted.org/packages/e8/b0/cd2b968000577ec5ce6c741a54d846dfa402372369b8b6861720aa9ecea7/beautifulsoup4-4.11.1.tar.gz +Source0: https://files.pythonhosted.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version}.tar.gz +Source1: tox-run-pkgs.tar.gz +Patch0: 0001-add-tox-config-file-for-test.patch BuildArch: noarch Requires: python3-soupsieve @@ -24,6 +27,13 @@ BuildRequires: python3-setuptools BuildRequires: python3-html5lib BuildRequires: python3-lxml BuildRequires: python3-pip +BuildRequires: python3-tox +BuildRequires: python3-html5lib +BuildRequires: python3-lxml +BuildRequires: python3-soupsieve +BuildRequires: python3-editables +BuildRequires: python3-hatch-vcs +BuildRequires: python3-hatchling %description -n python3-beautifulsoup4 This package provides a python library which is designed for quick turnaround projects.It provides methods for navigating and modifying @@ -40,49 +50,38 @@ a parse tree.It can help convert incoming documents to Unicode and outgoing documents to utf-8. %prep -%autosetup -n beautifulsoup4-%{version} +# tox-run-pkgs.tar.gz is local pkgs for tox run +# use conda to create py36,py37,py38,py39,py310,py311 env +# use command line below to create the pkgs contents and make tar.gz +# pip download -d ./tox-run-pkgs -r tox-deps.txt -i https://pypi.tuna.tsinghua.edu.cn/simple +# tar -czvf tor-run-pkgs.tar.gz tor-run-pkgs +%setup -c -b 1 +%autosetup -p1 -n beautifulsoup4-%{version} -b 0 +# config pip use local pkgs dir and check +pip config set install.no-index true +pip config set install.find-links %{_builddir}/tox-run-pkgs +ls %{_builddir}/tox-run-pkgs +cat ~/.config/pip/pip.conf %build -%py3_build +%pyproject_build %install -%py3_install -install -d -m755 %{buildroot}/%{_pkgdocdir} -if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi -if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi -if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi -if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi -pushd %{buildroot} -if [ -d usr/lib ]; then - find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/lib64 ]; then - find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/bin ]; then - find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/sbin ]; then - find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst -fi -touch doclist.lst -if [ -d usr/share/man ]; then - find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst -fi -popd -mv %{buildroot}/filelist.lst . -mv %{buildroot}/doclist.lst . +%pyproject_install beautifulsoup4==%{version} %check -%{__python3} setup.py test +tox -%files -n python3-beautifulsoup4 -f filelist.lst -%dir %{python3_sitelib}/* - -%files help -f doclist.lst -%{_docdir}/* +%files -n python3-beautifulsoup4 +%license LICENSE +%doc NEWS.txt +%{python3_sitelib}/beautifulsoup4-%{version}.dist-info/ +%{python3_sitelib}/bs4 %changelog +* Wed Apr 26 2023 Dongxing Wang - 4.12.2-1 +- Add build requires pythone3-soupsieve and upgrade to 4.12.2 + * Thu Nov 10 2022 liqiuyu - 4.11.1-1 - Upgrade package to version 4.11.1 diff --git a/tox-deps.txt b/tox-deps.txt new file mode 100644 index 0000000..2bfb1a8 --- /dev/null +++ b/tox-deps.txt @@ -0,0 +1,4 @@ +MarkupSafe==2.0.1 +hatchling +sphinx +soupsieve==2.3.2.post1 diff --git a/tox-run-pkgs.tar.gz b/tox-run-pkgs.tar.gz new file mode 100644 index 0000000..4cac5e7 Binary files /dev/null and b/tox-run-pkgs.tar.gz differ