From 4b10005c2281bd4ec25cabd98456c712f31643c008622fa37ebdb39f26a8e4c5 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 15 Oct 2021 20:30:33 +0000 Subject: [PATCH 1/2] - Update to version 3.4 * Changelog since v1.3: https://flit.readthedocs.io/en/latest/history.html OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flit?expand=0&rev=5 --- flit-1.3.tar.gz | 3 --- flit-3.4.0.tar.gz | 3 +++ merged_pr_278.patch | 25 -------------------- python-flit.changes | 7 ++++++ python-flit.spec | 57 ++++++++++++++++++++++++--------------------- 5 files changed, 41 insertions(+), 54 deletions(-) delete mode 100644 flit-1.3.tar.gz create mode 100644 flit-3.4.0.tar.gz delete mode 100644 merged_pr_278.patch diff --git a/flit-1.3.tar.gz b/flit-1.3.tar.gz deleted file mode 100644 index 40a3d72..0000000 --- a/flit-1.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6f6f0fb83c51ffa3a150fa41b5ac118df9ea4a87c2c06dff4ebf9adbe7b52b36 -size 92574 diff --git a/flit-3.4.0.tar.gz b/flit-3.4.0.tar.gz new file mode 100644 index 0000000..7a7b4d9 --- /dev/null +++ b/flit-3.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:390288b27d89a084a32fc40020ad953e14bc215c5a01e6eb6ab8c9bdbcc57283 +size 120418 diff --git a/merged_pr_278.patch b/merged_pr_278.patch deleted file mode 100644 index 203a44d..0000000 --- a/merged_pr_278.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 6a6b7ff1d4cfb061c42c16b1740c4dac22cda91c Mon Sep 17 00:00:00 2001 -From: Matthias Bussonnier -Date: Thu, 25 Jul 2019 20:31:38 -0700 -Subject: [PATCH] Fix CI error on test_misspelled_key - -Error seem to be due to pytest wrapping errors, and the str() -representation of the error not always having the full error message of -the underlying error. ---- - tests/test_inifile.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/test_inifile.py b/tests/test_inifile.py -index 1f7adbd..3dc3abc 100644 ---- a/tests/test_inifile.py -+++ b/tests/test_inifile.py -@@ -40,7 +40,7 @@ def test_misspelled_key(): - with pytest.raises(ConfigError) as e_info: - read_pkg_ini(samples_dir / 'misspelled-key.ini') - -- assert 'description-file' in str(e_info) -+ assert 'scription-file' in str(e_info.value) - - def test_description_file(): - info = read_pkg_ini(samples_dir / 'package1-pkg.ini') diff --git a/python-flit.changes b/python-flit.changes index 8b27aad..032ce5d 100644 --- a/python-flit.changes +++ b/python-flit.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Oct 15 18:09:42 UTC 2021 - Ben Greiner + +- Update to version 3.4 + * Changelog since v1.3: + https://flit.readthedocs.io/en/latest/history.html + ------------------------------------------------------------------- Tue May 26 06:34:17 UTC 2020 - Petr Gajdos diff --git a/python-flit.spec b/python-flit.spec index 5ed185e..2ba69c3 100644 --- a/python-flit.spec +++ b/python-flit.spec @@ -1,7 +1,7 @@ # # spec file for package python-flit # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,57 +19,61 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-flit -Version: 1.3 +Version: 3.4.0 Release: 0 -Summary: Packaging tool for simple packages +Summary: Simplified packaging of Python modules License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/takluyver/flit Source: https://files.pythonhosted.org/packages/source/f/flit/flit-%{version}.tar.gz -Patch0: https://github.com/takluyver/flit/commit/6a6b7ff.patch#/merged_pr_278.patch +BuildRequires: %{python_module base > 3.6} BuildRequires: %{python_module docutils} -BuildRequires: %{python_module pytest >= 2.7.3} -BuildRequires: %{python_module pytoml} -BuildRequires: %{python_module requests-download} -BuildRequires: %{python_module responses} -BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module flit-core} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module requests} +BuildRequires: %{python_module tomli-w} +BuildRequires: %{python_module tomli} +# SECTION test requirements BuildRequires: %{python_module testpath} +BuildRequires: %{python_module pytest >= 2.7.3} +BuildRequires: %{python_module responses} +# /SECTION BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-docutils -Requires: python-pytoml -Requires: python-requests-download +Requires: python-flit-core +Requires: python-requests +Requires: python-tomli +Requires: python-tomli-w Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires(postun):update-alternatives BuildArch: noarch -%if %{python3_version_nodots} < 36 -BuildRequires: %{python_module zipfile36} -%endif -%if %{python3_version_nodots} < 36 -Requires: python-zipfile36 -%endif %python_subpackages %description -A simple packaging tool for simple packages. +Simplified packaging of Python modules %prep %setup -q -n flit-%{version} -%patch0 -p1 -sed -i 's/distutils.core/setuptools/' setup.py %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/flit %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -# test_build_sdist is https://github.com/takluyver/flit/issues/133 +%{python_expand # create python name interpreter for test_find_python_excutable" +mkdir build/testbin +ln -s %{_bindir}/$python build/testbin/python +} +export PATH=$PWD/build/testbin/:$PATH # test_invalid_classifier requires internet -%pytest -k 'not (test_build_sdist or test_invalid_classifier)' +# https://github.com/takluyver/flit/blob/96751efce651f8bae8ccb9e7f144dac460b3f013/flit/validate.py#L126 +# "The error you get on a train, going through Oregon, without wifi" +%pytest -k "not test_invalid_classifier" %post %python_install_alternative flit @@ -81,6 +85,7 @@ sed -i 's/distutils.core/setuptools/' setup.py %doc README.rst %license LICENSE %python_alternative %{_bindir}/flit -%{python_sitelib}/* +%{python_sitelib}/flit +%{python_sitelib}/flit-%{version}*-info %changelog From 663500f244bfa60fd5cface514fd5183dce3299ec5fcf51e4fe6a5d4ce3d4b18 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 15 Oct 2021 20:33:49 +0000 Subject: [PATCH 2/2] - Remove upstreamed patches: - merged_pr_278.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flit?expand=0&rev=6 --- python-flit.changes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python-flit.changes b/python-flit.changes index 032ce5d..158cfff 100644 --- a/python-flit.changes +++ b/python-flit.changes @@ -4,6 +4,8 @@ Fri Oct 15 18:09:42 UTC 2021 - Ben Greiner - Update to version 3.4 * Changelog since v1.3: https://flit.readthedocs.io/en/latest/history.html +- Remove upstreamed patches: + - merged_pr_278.patch ------------------------------------------------------------------- Tue May 26 06:34:17 UTC 2020 - Petr Gajdos