From ea22a5ce27291496bfa5d673f2eb5510cc1d7eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Tue, 6 Jun 2023 15:13:58 +0200 Subject: [PATCH] Sync from SUSE:ALP:Source:Standard:1.0 python-pip-run revision b5a691a9587acf4f54535fd7d6f083b5 --- .gitattributes | 23 +++++ _multibuild | 3 + path-16.4.0-py3-none-any.whl | 3 + path.py-12.5.0-py3-none-any.whl | 3 + pip-run-8.8.2.tar.gz | 3 + pip-run-suse-ring1-no-nbformat.patch | 21 +++++ python-pip-run.changes | 29 ++++++ python-pip-run.spec | 136 +++++++++++++++++++++++++++ 8 files changed, 221 insertions(+) create mode 100644 .gitattributes create mode 100644 _multibuild create mode 100644 path-16.4.0-py3-none-any.whl create mode 100644 path.py-12.5.0-py3-none-any.whl create mode 100644 pip-run-8.8.2.tar.gz create mode 100644 pip-run-suse-ring1-no-nbformat.patch create mode 100644 python-pip-run.changes create mode 100644 python-pip-run.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /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/_multibuild b/_multibuild new file mode 100644 index 0000000..83bd4e9 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/path-16.4.0-py3-none-any.whl b/path-16.4.0-py3-none-any.whl new file mode 100644 index 0000000..3da589d --- /dev/null +++ b/path-16.4.0-py3-none-any.whl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e539cfeebd8eaddbeed7e42d0beedba00f15a931675dd49d35ee9863bcc166a +size 26159 diff --git a/path.py-12.5.0-py3-none-any.whl b/path.py-12.5.0-py3-none-any.whl new file mode 100644 index 0000000..fa57f9f --- /dev/null +++ b/path.py-12.5.0-py3-none-any.whl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a43e82eb2c344c3fd0b9d6352f6b856f40b8b7d3d65cc05978b42c3715668496 +size 2251 diff --git a/pip-run-8.8.2.tar.gz b/pip-run-8.8.2.tar.gz new file mode 100644 index 0000000..586e75d --- /dev/null +++ b/pip-run-8.8.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61953e76168f744b2b098ef50f560c113355107abbeeac525f3feada759b3823 +size 29193 diff --git a/pip-run-suse-ring1-no-nbformat.patch b/pip-run-suse-ring1-no-nbformat.patch new file mode 100644 index 0000000..6017975 --- /dev/null +++ b/pip-run-suse-ring1-no-nbformat.patch @@ -0,0 +1,21 @@ +Index: pip-run-8.8.1/pip_run/tests/test_scripts.py +=================================================================== +--- pip-run-8.8.1.orig/pip_run/tests/test_scripts.py ++++ pip-run-8.8.1/pip_run/tests/test_scripts.py +@@ -4,7 +4,6 @@ import sys + import subprocess + + import pytest +-import nbformat + + from pip_run import scripts + +@@ -85,6 +84,8 @@ class TestSourceDepsReader: + class TestNotebookDepsReader: + @pytest.fixture + def notebook_factory(self, tmpdir, request): ++ nbformat = pytest.importorskip("nbformat") ++ + class Factory: + def __init__(self): + self.nb = nbformat.v4.new_notebook() diff --git a/python-pip-run.changes b/python-pip-run.changes new file mode 100644 index 0000000..baacf94 --- /dev/null +++ b/python-pip-run.changes @@ -0,0 +1,29 @@ +------------------------------------------------------------------- +Fri Apr 21 12:29:22 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Tue Apr 18 23:00:49 UTC 2023 - Matej Cepl + +- Switch to single spec version build for PSP + +------------------------------------------------------------------- +Tue Dec 6 04:22:58 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version v8.8.2 + * Packaging refresh. + * Merge https://github.com/jaraco/skeleton + +------------------------------------------------------------------- +Fri Aug 5 09:14:48 UTC 2022 - Ben Greiner + +- Add pip-run-suse-ring1-no-nbformat.patch for removal of nbformat + from Ring1 (pip-run will be in Ring1 for setuptools:test) + +------------------------------------------------------------------- +Wed Jul 13 14:27:22 UTC 2022 - Ben Greiner + +- Initial specfile for v8.8.1 +- Required by setuptools 63 test suite +- Tests use wheels for path and path.py for testing -- not packaged diff --git a/python-pip-run.spec b/python-pip-run.spec new file mode 100644 index 0000000..3ee8b31 --- /dev/null +++ b/python-pip-run.spec @@ -0,0 +1,136 @@ +# +# spec file +# +# Copyright (c) 2022 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} +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +# Disables installing nbformat for tests in Ring1 (see also Patch1) +%bcond_with ringdisabled + +%if 0%{?suse_version} == 1500 && 0%{?sle_version} >= 150400 +%bcond_without ringdisabled +%endif + +Name: python-pip-run%{psuffix} +Version: 8.8.2 +Release: 0 +Summary: Install packages and run Python with them +License: MIT +URL: https://github.com/jaraco/pip-run +Source: https://files.pythonhosted.org/packages/source/p/pip-run/pip-run-%{version}.tar.gz +# Needs the wheels for path and path.py for testing +Source10: https://files.pythonhosted.org/packages/py3/p/path.py/path.py-12.5.0-py3-none-any.whl +Source11: https://files.pythonhosted.org/packages/py3/p/path/path-16.4.0-py3-none-any.whl +# PATCH-FEATURE-OPENSUSE pip-run-suse-ring1-no-nbformat.patch code@bnavigator.de -- Don't test with nbformat if not available +Patch1: pip-run-suse-ring1-no-nbformat.patch +BuildRequires: %{python_module base >= 3.7} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools >= 56} +BuildRequires: %{python_module setuptools_scm >= 3.4.1} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-autocommand +Requires: python-packaging +Requires: python-path >= 15.1 +Requires: python-pip >= 19.3 +Requires(post): update-alternatives +Requires(postun):update-alternatives +%if 0%{?python_version_nodots} < 38 +Requires: python-importlib-metadata +%endif +%if %{with test} +BuildRequires: %{python_module Pygments} +BuildRequires: %{python_module pip-run = %{version}} +BuildRequires: %{python_module pytest >= 6} +BuildRequires: ca-certificates +%if %{without ringdisabled} +BuildRequires: %{python_module nbformat} +%endif +%endif +BuildArch: noarch +%python_subpackages + +%description +On-demand temporary package installation for a single interpreter run. + +pip-run is not intended to solve production dependency management, +but does aim to address the other, one-off scenarios around dependency management + - trials and experiments + - build setup + - test runners + - just in time script running + - interactive development + - bug triage + +pip-run is a compliment to Pip and Virtualenv and Setuptools, intended to more +readily address the on-demand needs. + +%prep +%autosetup -p1 -n pip-run-%{version} + +%if 0%{?suse_version} == 1500 && 0%{?sle_version} >= 150400 +sed -i -e '/nbformat/d' setup.cfg +%endif + +%if !%{with test} +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/pip-run +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif + +%if %{with test} +%check +mkdir -p wheels +cp %{SOURCE10} %{SOURCE11} wheels/ +export PIP_FIND_LINKS=$PWD/wheels/ +dont_test="" +%if 0%{?suse_version} == 1500 && 0%{?sle_version} >= 150400 +dont_test+="" +%endif +%pytest -k "$dont_test" +%endif + +%post +%python_install_alternative pip-run + +%postun +%python_uninstall_alternative pip-run + +%if !%{with test} +%files %{python_files} +%license LICENSE +%doc README.rst CHANGES.rst +%python_alternative %{_bindir}/pip-run +%{python_sitelib}/pip-run.py* +%pycache_only %{python_sitelib}/__pycache__/pip-run*.pyc +%{python_sitelib}/pip_run +%{python_sitelib}/pip_run-%{version}*-info +%endif + +%changelog