From 0a13c14138205a675cf4204337936bee688b40b56f25f723ad25d1062a689da8 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Wed, 6 Nov 2024 10:28:36 +0000 Subject: [PATCH] - Add drop-icecream-dep.patch - Update to 3.3.0: * Add mypy type-checking variant of the recently added import test, in packaging.release.test_install. This helps prove packages exposing py.typed in their source tree are including it in their distributions correctly. - 3.2.0: * Minor enhancements to the checks module: - blacken now has a format alias (and will likely reverse the real name and the alias in 4.0) - Added lint task which currently just runs flake8, will likely learn how to be configurable later. - Added all_ default task for the collection, which runs both blacken (in regular, not diff-only mode - idea is to be useful for devs, not CI, which already does both independently) and lint in series. - 3.1.0: * Updated packaging.release.test_install to attempt imports of freshly test-installed packages, to catch import-time errors on top of install-time ones. This can be opted out of by giving the skip_import kwarg (aka the --skip-import flag on the CLI). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-invocations?expand=0&rev=36 --- .gitattributes | 23 +++ .gitignore | 1 + drop-icecream-dep.patch | 19 +++ invocations-3.0.2.tar.gz | 3 + invocations-3.3.0.tar.gz | 3 + invocations-no-bundled.patch | 32 +++++ python-invocations.changes | 265 +++++++++++++++++++++++++++++++++++ python-invocations.spec | 89 ++++++++++++ 8 files changed, 435 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 drop-icecream-dep.patch create mode 100644 invocations-3.0.2.tar.gz create mode 100644 invocations-3.3.0.tar.gz create mode 100644 invocations-no-bundled.patch create mode 100644 python-invocations.changes create mode 100644 python-invocations.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/drop-icecream-dep.patch b/drop-icecream-dep.patch new file mode 100644 index 0000000..43a5b9b --- /dev/null +++ b/drop-icecream-dep.patch @@ -0,0 +1,19 @@ +Index: invocations-3.3.0/tests/conftest.py +=================================================================== +--- invocations-3.3.0.orig/tests/conftest.py ++++ invocations-3.3.0/tests/conftest.py +@@ -5,9 +5,11 @@ from pytest import fixture + from invoke import MockContext + + # Set up icecream globally for convenience. +-from icecream import install +- +-install() ++try: ++ from icecream import install ++ install() ++except ModuleNotFoundError: ++ pass + + + @fixture diff --git a/invocations-3.0.2.tar.gz b/invocations-3.0.2.tar.gz new file mode 100644 index 0000000..4573481 --- /dev/null +++ b/invocations-3.0.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:220c63ce5769cf6ae84bb9551704b98228af43ccbfc43a52c1271c03bb9e36dc +size 50554 diff --git a/invocations-3.3.0.tar.gz b/invocations-3.3.0.tar.gz new file mode 100644 index 0000000..69f04b0 --- /dev/null +++ b/invocations-3.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a5be67b0078ab2ed566497f114ca1b624d5c56543e5d1bd0bf5a371c6f7ccb8 +size 52345 diff --git a/invocations-no-bundled.patch b/invocations-no-bundled.patch new file mode 100644 index 0000000..680ed0a --- /dev/null +++ b/invocations-no-bundled.patch @@ -0,0 +1,32 @@ +Index: invocations-3.3.0/tests/packaging/release.py +=================================================================== +--- invocations-3.3.0.orig/tests/packaging/release.py ++++ invocations-3.3.0/tests/packaging/release.py +@@ -3,7 +3,10 @@ from os import path + import re + import sys + +-from invoke.vendor.lexicon import Lexicon ++try: ++ from invoke.vendor.lexicon import Lexicon ++except ImportError: ++ from lexicon import Lexicon + from invoke import MockContext, Result, Config, Exit + from docutils.utils import Reporter + from unittest.mock import Mock, patch, call +Index: invocations-3.3.0/invocations/packaging/release.py +=================================================================== +--- invocations-3.3.0.orig/invocations/packaging/release.py ++++ invocations-3.3.0/invocations/packaging/release.py +@@ -21,7 +21,10 @@ from io import StringIO + from pathlib import Path + from shutil import rmtree + +-from invoke.vendor.lexicon import Lexicon ++try: ++ from invoke.vendor.lexicon import Lexicon ++except ImportError: ++ from lexicon import Lexicon + + from blessings import Terminal + from docutils.utils import Reporter diff --git a/python-invocations.changes b/python-invocations.changes new file mode 100644 index 0000000..c6edc4c --- /dev/null +++ b/python-invocations.changes @@ -0,0 +1,265 @@ +------------------------------------------------------------------- +Wed Nov 6 10:23:52 UTC 2024 - Daniel Garcia + +- Add drop-icecream-dep.patch +- Update to 3.3.0: + * Add mypy type-checking variant of the recently added import test, + in packaging.release.test_install. This helps prove packages + exposing py.typed in their source tree are including it in their + distributions correctly. +- 3.2.0: + * Minor enhancements to the checks module: + - blacken now has a format alias (and will likely reverse the + real name and the alias in 4.0) + - Added lint task which currently just runs flake8, will likely + learn how to be configurable later. + - Added all_ default task for the collection, which runs both + blacken (in regular, not diff-only mode - idea is to be useful + for devs, not CI, which already does both independently) and + lint in series. +- 3.1.0: + * Updated packaging.release.test_install to attempt imports of + freshly test-installed packages, to catch import-time errors on + top of install-time ones. This can be opted out of by giving the + skip_import kwarg (aka the --skip-import flag on the CLI). + +------------------------------------------------------------------- +Thu Jun 1 13:06:53 UTC 2023 - pgajdos@suse.com + +- python-six is not required + +------------------------------------------------------------------- +Thu May 4 19:15:25 UTC 2023 - Dirk Müller + +- update to 3.0.2: + * backported` Unpin ``tabulate`` in our install + requirements, it's had many more releases since we instituted + a defensive pin vs some bugs in its later 0.7 line! + * We neglected to remove references to ``six`` in a + few spots including some that utilized Invoke's old vendor of same; + this causes issues when trying to use development and + upcoming versions of Invoke. Six is now truly gone! + +------------------------------------------------------------------- +Fri Apr 21 12:27:01 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:42:06 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Tue Jan 3 05:02:34 UTC 2023 - Steve Kowalik + +- Update to 3.0.0: + * The dual_wheels, alt_python, and check_desc arguments/config options for + the invocations.packaging.release module have been removed. + * The invocations.travis module has been removed. + * Drop Python 2 (and 3.5) support. We now support Python 3.6+ only. +- Refreshed invocations-no-bundled.patch. +- Dropped invocations-py3.patch, not required. +- Dropped python-invocations-no-mock.patch, merged upstream. + +------------------------------------------------------------------- +Thu Sep 29 02:48:24 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version 2.6.1 + no changelog +- Update to version 2.6.0 2022-03-25 + [Feature]: Update packaging.release.publish with a new config option, rebuild_with_env, + to support a downstream (Fabric) release use-case. + [Feature]: Enhance packaging.release.test-install so it’s more flexible about the primary directory argument + (re: a dist dir, or a parent of one) and errors usefully when you (probably) gave it an incorrect path. +- Update to version 2.5.0 2022-03-25 + [Feature]: Port make-sshable from the travis module to the new ci one. +- Update to version 2.4.0 2022-03-17 + [Feature]: Add additional CLI flags to the use of gpg when signing releases, + to support headless passphrase entry. It was found that modern GPG versions require --batch and + --pinentry-mode=loopback for --passphrase-fd to function correctly. + [Feature]: Add a new invocations.ci task module for somewhat-more-generic CI support than the now legacy invocations.travis tasks. + [Feature]: Allow supplying additional test runners to pytest.coverage; primarily useful for setting up multiple additive test runs before publishing reports. + +------------------------------------------------------------------- +Wed May 4 12:25:51 UTC 2022 - pgajdos@suse.com + +- do not require python-mock for build +- added patches + fix https://github.com/pyinvoke/invocations/issues/31 + + python-invocations-no-mock.patch + +------------------------------------------------------------------- +Thu Mar 10 06:25:34 UTC 2022 - Steve Kowalik + +- pytest-relaxed now supports pytest 6, so test on all python versions. + +------------------------------------------------------------------- +Mon Dec 13 23:44:38 UTC 2021 - Ben Greiner + +- Update to 2.3.0 + * [Bug]: The packaging.release.upload task wasn’t properly + exposed externally, even though another task’s docstring + referenced it. Fixed. + * [Bug]: Ensure that the venv used for + packaging.release.test_install has its pip upgraded to match + the invoking interpreter’s version of same; this avoids common + pitfalls where the “inner” pip is a bundled-with-venv, + much-older version incapable of modern package installations. + * [Support]: Overhaul testing and release procedures to use + CircleCI & modern Invocations. + * 2.2.0 2021-09-03 + * [Feature]: Added the invocations.environment module with + top-level functions such as in_ci. + * [Feature]: packaging.release.push, in dry-run mode, now + dry-runs its git push subcommand – meaning the subcommand + itself is what is “dry-ran”, instead of truly executing git + push --dry-run – when a CI environment is detected. + * This prevents spurious errors when the git remote (eg Github) + bails out on read-only authentication credentials, which is + common within CI systems. + * It’s also just not very useful to dry-run a real git push + within CI, since almost certainly the commands to generate git + objects to get pushed will themselves not have truly run! + * [Bug]: packaging.release.status (and its use elsewhere, eg + prepare) didn’t adequately reload the local project’s version + module during its second/final recheck; this causes that check + to fail when said version was edited as part of a prepare run. + It now force-reloads said version module. +- Release 2.1.0 + * [Feature]: Added twine check (which validates packaging + metadata’s long_description) as a pre-upload step within + packaging.release.publish. + * This includes some tweaking of readme_renderer behavior (used + internally by twine) so it correctly spots more malformed RST, + as Sphinx does. + * [Feature]: Add packaging.release.push for pushing Git objects + as part of a release. + * [Feature]: The packaging.release.all_ task has been expanded to + actually do “ALL THE THINGS!!!”, given a dry_run flag, and + renamed on the CLI to all (no trailing underscore). + * [Feature]: packaging.release.prepare grew a dry_run flag to + match the rest of its friends. + * [Feature]: Add Codecov support to pytest.coverage. + * [Feature]: Add packaging.release.test_install task and call it + just prior to the final step in packaging.release.upload (so + one doesn’t upload packages which build OK but don’t actually + install OK). + * [Bug]: pytest.coverage incorrectly concatenated its opts + argument to internal options; this has been fixed. + * [Bug]: Correctly test for html report type inside of + pytest.coverage when deciding whether to run open at the end. + * [Bug]: packaging.release.publish missed a spot when it grew + “kwargs beat configuration” behavior - the index kwarg still + got overwritten by the config value, if defined. This has been + fixed. + * [Bug]: packaging.release.prepare now generates annotated Git + tags instead of lightweight ones. This was a perplexing + oversight (Git has always intended annotated tags to be used + for release purposes) so we’re considering it a bugfix instead + of a backwards incompatible feature change. + * [Support]: packaging.release.prepare now runs its internal + status check twice, once at the start (as before) and again at + the end (to prove that the actions taken did in fact satisfy + needs). + * [Support]: Rely on Invoke 1.6+ for some of its new features. +- Release 2.0.0 + * [Feature]: Add a warnings kwarg/flag to pytest.test, allowing + one to call it with --no-warnings as an inline ‘alias’ for + pytest’s own --disable-warnings flag. + * [Bug]: Fix minor display bug causing the pytest task module to + append a trailing space to the invocation of pytest itself. + * [Bug]: release.build and release.publish had bad + kwargs-vs-config logic preventing flags such as --wheel or + --python from actually working (config defaults always won out, + leading to silent ignoring of user input). This has been fixed; + config will now only be honored unless the CLI appears to be + overriding it. + * [Bug]: release.build’s --clean flag has been updated: + - It now honors configuration like the other flags in this + task, specifically packaging.clean. + - It now defaults to False (rationale: most build operations in + the wild tend to assume no cleaning by default, so defaulting + to the opposite was sometimes surprising). + + Warning: This is a backwards incompatible change. + - When True, it applies to both build and dist directories, + instead of just build. + + Warning: This is a backwards incompatible change. + * [Support]: Modify release task tree to look at main branches in + addition to master ones, for “are we on a feature release line + or a bugfix one?” calculations, etc. + * [Support]: Replace some old Python 2.6-compatible syntax bits. + * [Support]: Reverse the default value of release.build and + release.publish)’s wheel argument from False to True. Included + in this change is a new required runtime dependency on the + wheel package. + - Rationale: at this point in time, most users will be + expecting wheels to be available, and not building wheels is + likely to be the uncommon case. + - Warning: This is a backwards incompatible change. + * [Support] #21: Only require enum34 under Python 2 to prevent it + clashing with the stdlib enum under Python 3. Credit: Alex + Gaynor. + * [Support] #12: Upgrade our packaging manifest so tests (also + docs, requirements files, etc) are included in the distribution + archives. Thanks to Tomáš Chvátal for the report. + * [Support]: Drop Python 3.4 support. We didn’t actually do + anything to make the code not work on 3.4, but we’ve removed + some 3.4 related runtime (and development) dependency + limitations. Our CI will also no longer test on 3.4. + - Warning: This is a backwards incompatible change. +- Refresh invocations-no-bundled.patch + +------------------------------------------------------------------- +Mon Dec 13 23:28:12 UTC 2021 - Ben Greiner + +- Don't test on python310 because of pytest-relaxed not supporting + Pytest 6 -- gh#bitprophet/pytest-relaxed#12 + +------------------------------------------------------------------- +Tue Oct 13 10:33:07 UTC 2020 - Benjamin Greiner + +- Upper limit pytest 6.1 -- gh#bitprophet/pytest-relaxed#12 + +------------------------------------------------------------------- +Sat Mar 14 08:35:22 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + +------------------------------------------------------------------- +Thu Jul 4 12:02:23 UTC 2019 - Tomáš Chvátal + +- Disable tests that are tied to sphinx and got utterly exploded + +------------------------------------------------------------------- +Fri Mar 29 10:50:09 UTC 2019 - Tomáš Chvátal + +- Remove release-testing tests as they are pointless for rpm package + +------------------------------------------------------------------- +Sat Aug 11 12:01:52 UTC 2018 - tchvatal@suse.com + +- Drop the multibuild as the cycle is gone +- Add patch to not rely on bundled stuff: + * invocations-no-bundled.patch +- Add patch to fix tests on python3: + * invocations-py3.patch + +------------------------------------------------------------------- +Sat Aug 11 10:01:08 UTC 2018 - tchvatal@suse.com + +- Version update to 1.4: + * Various py3 fixes + * pytest for testing +- Use multibuild to run tests +- Use github tag to get the tarball with tests + +------------------------------------------------------------------- +Thu May 10 03:05:07 UTC 2018 - toddrme2178@gmail.com + +- Use license tag + +------------------------------------------------------------------- +Wed Oct 18 16:38:40 UTC 2017 - toddrme2178@gmail.com + +- Initial version diff --git a/python-invocations.spec b/python-invocations.spec new file mode 100644 index 0000000..6af1640 --- /dev/null +++ b/python-invocations.spec @@ -0,0 +1,89 @@ +# +# spec file for package python-invocations +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# 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 https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-invocations +Version: 3.3.0 +Release: 0 +Summary: Reusable Invoke tasks +License: BSD-2-Clause +URL: https://github.com/pyinvoke/invocations +Source: https://github.com/pyinvoke/invocations/archive/%{version}.tar.gz#/invocations-%{version}.tar.gz +Patch0: invocations-no-bundled.patch +# PATCH-FIX-OPENSUSE drop-icecream-dep.patch -- daniel.garcia@suse.com +Patch1: drop-icecream-dep.patch +BuildRequires: %{python_module blessings >= 1.6} +BuildRequires: %{python_module invoke >= 1.7.2} +BuildRequires: %{python_module lexicon} +BuildRequires: %{python_module pytest-relaxed} +BuildRequires: %{python_module releases >= 1.6} +BuildRequires: %{python_module semantic_version >= 2.4} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module tabulate >= 0.7.5} +BuildRequires: %{python_module tqdm >= 4.8.1} +BuildRequires: %{python_module twine >= 1.15} +BuildRequires: %{python_module wheel >= 0.24.0} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-blessings >= 1.6 +Requires: python-invoke >= 1.7.2 +Requires: python-lexicon +Requires: python-releases >= 1.6 +Requires: python-semantic_version >= 2.4 +Requires: python-tabulate >= 0.7.5 +Requires: python-tqdm >= 4.8.1 +Requires: python-twine >= 1.15 +Requires: python-wheel >= 0.24.0 +BuildArch: noarch +%python_subpackages + +%description +Invocations is a collection of reusable `Invoke `_ +tasks/task modules, including (but not limited to) Python project management +tools such as documentation building and dependency organization. + +It has no stand-alone components and is designed to be imported into your +pre-existing Invoke task files. + +Invocations is currently in pre-alpha status and is unsupported. Please follow +the Invoke project's communication channels for updates. Thanks! + +%prep +%autosetup -p1 -n invocations-%{version} + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# autodoc: With new sphinx this does not work at all so skip it +# packaging: not applicable to openSUSE +# cannot use --ignore because of pytest-relaxed plugin +rm -r tests/autodoc/ tests/packaging/ +%pytest + +%files %{python_files} +%doc README.rst +%license LICENSE +%{python_sitelib}/invocations +%{python_sitelib}/invocations-%{version}*info + +%changelog