Change test method tox to tox --current-env
This commit is contained in:
parent
fb6360727d
commit
eba95e8408
@ -16,7 +16,7 @@ index 0000000..6a461aa
|
|||||||
@@ -0,0 +1,27 @@
|
@@ -0,0 +1,27 @@
|
||||||
+[tox]
|
+[tox]
|
||||||
+env_list =
|
+env_list =
|
||||||
+ py{39, 310, 311},bare,docs
|
+ py{36, 37, 38, 39, 310, 311},bare,docs
|
||||||
+minversion = 3.28.0
|
+minversion = 3.28.0
|
||||||
+skip_missing_interpreters = true
|
+skip_missing_interpreters = true
|
||||||
+isolated_build = True
|
+isolated_build = True
|
||||||
|
|||||||
@ -2,12 +2,11 @@
|
|||||||
|
|
||||||
Name: python-beautifulsoup4
|
Name: python-beautifulsoup4
|
||||||
Version: 4.12.2
|
Version: 4.12.2
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Screen-scraping library
|
Summary: Screen-scraping library
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://www.crummy.com/software/BeautifulSoup/bs4/
|
URL: https://www.crummy.com/software/BeautifulSoup/bs4/
|
||||||
Source0: https://files.pythonhosted.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version}.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
|
Patch0: 0001-add-tox-config-file-for-test.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -27,9 +26,9 @@ BuildRequires: python3-setuptools
|
|||||||
BuildRequires: python3-html5lib
|
BuildRequires: python3-html5lib
|
||||||
BuildRequires: python3-lxml
|
BuildRequires: python3-lxml
|
||||||
BuildRequires: python3-pip
|
BuildRequires: python3-pip
|
||||||
|
BuildRequires: python3-pytest
|
||||||
BuildRequires: python3-tox
|
BuildRequires: python3-tox
|
||||||
BuildRequires: python3-html5lib
|
BuildRequires: python3-tox-current-env
|
||||||
BuildRequires: python3-lxml
|
|
||||||
BuildRequires: python3-soupsieve
|
BuildRequires: python3-soupsieve
|
||||||
BuildRequires: python3-editables
|
BuildRequires: python3-editables
|
||||||
BuildRequires: python3-hatch-vcs
|
BuildRequires: python3-hatch-vcs
|
||||||
@ -50,27 +49,23 @@ a parse tree.It can help convert incoming documents to Unicode
|
|||||||
and outgoing documents to utf-8.
|
and outgoing documents to utf-8.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
# tox-run-pkgs.tar.gz is local pkgs for tox run
|
%autosetup -p1 -n beautifulsoup4-%{version}
|
||||||
# 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
|
%build
|
||||||
%pyproject_build
|
%pyproject_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%pyproject_install beautifulsoup4==%{version}
|
%pyproject_install
|
||||||
|
|
||||||
%check
|
%check
|
||||||
tox
|
TOX_TESTENV_PASSENV="${TOX_TESTENV_PASSENV:-*}" \
|
||||||
|
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" \
|
||||||
|
PATH="%{buildroot}%{_bindir}:$PATH" \
|
||||||
|
PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}" \
|
||||||
|
PYTHONDONTWRITEBYTECODE=1 \
|
||||||
|
%{?__pytest_addopts:PYTEST_ADDOPTS="${PYTEST_ADDOPTS:-} %{__pytest_addopts}"} \
|
||||||
|
PYTEST_XDIST_AUTO_NUM_WORKERS=%{_smp_build_ncpus}} \
|
||||||
|
%{__python3} -m tox -e py%{python3_version_nodots} --current-env
|
||||||
|
|
||||||
%files -n python3-beautifulsoup4
|
%files -n python3-beautifulsoup4
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
@ -79,6 +74,9 @@ tox
|
|||||||
%{python3_sitelib}/bs4
|
%{python3_sitelib}/bs4
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 14 2023 Dongxing Wang <dxwangk@isoftstone.com> - 4.12.2-2
|
||||||
|
- Change test method tox to tox --current-env
|
||||||
|
|
||||||
* Wed Apr 26 2023 Dongxing Wang <dxwangk@isoftstone.com> - 4.12.2-1
|
* Wed Apr 26 2023 Dongxing Wang <dxwangk@isoftstone.com> - 4.12.2-1
|
||||||
- Add build requires pythone3-soupsieve and upgrade to 4.12.2
|
- Add build requires pythone3-soupsieve and upgrade to 4.12.2
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +0,0 @@
|
|||||||
MarkupSafe==2.0.1
|
|
||||||
hatchling
|
|
||||||
sphinx
|
|
||||||
soupsieve==2.3.2.post1
|
|
||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user