From fc8ad6ba67b34c8f5f98adccf8a1f34179fcafb2d1cbfd713ce2acd05f7ad892 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 10 Sep 2021 09:47:33 +0000 Subject: [PATCH] Accepting request 917741 from home:frispete:python Useful tool to use python expressions in the shell. OBS-URL: https://build.opensuse.org/request/show/917741 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyp?expand=0&rev=1 --- .gitattributes | 23 +++++++++++++ .gitignore | 1 + pyp-0.3.4.tar.gz | 3 ++ python-pyp.changes | 13 ++++++++ python-pyp.spec | 80 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 120 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 pyp-0.3.4.tar.gz create mode 100644 python-pyp.changes create mode 100644 python-pyp.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/pyp-0.3.4.tar.gz b/pyp-0.3.4.tar.gz new file mode 100644 index 0000000..e89604f --- /dev/null +++ b/pyp-0.3.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3275b7e27039ef56a9dec70c32e1e45a6b298024eb8a553d46aa2e98af13c4b +size 23598 diff --git a/python-pyp.changes b/python-pyp.changes new file mode 100644 index 0000000..26bd9d9 --- /dev/null +++ b/python-pyp.changes @@ -0,0 +1,13 @@ +------------------------------------------------------------------- +Thu Sep 9 08:38:33 UTC 2021 - Hans-Peter Jansen + +version 0.3.4: + - Reduce reconstructed traceback's reliance on CPython + implementation details + - Fix automatic print behaviour in edge case interaction with + scopes + +------------------------------------------------------------------- +Fri Sep 25 19:07:17 UTC 2020 - Hans-Peter Jansen + +- version 0.3.3: initial build diff --git a/python-pyp.spec b/python-pyp.spec new file mode 100644 index 0000000..120eb7c --- /dev/null +++ b/python-pyp.spec @@ -0,0 +1,80 @@ +# +# spec file for package python-pyp +# +# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2020-2021 LISA GmbH, Bingen, Germany +# +# 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/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python2 1 +Name: python-pyp +Version: 0.3.4 +Release: 0 +Summary: Python at the shell +License: MIT +Group: Development/Libraries/Python +URL: https://github.com/hauntsaninja/pyp +Source0: https://github.com/hauntsaninja/pyp/archive/v%{version}.tar.gz#/pyp-%{version}.tar.gz +BuildRequires: %{python_module astunparse} +BuildRequires: %{python_module base} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +# testing requirements +BuildRequires: bc +BuildRequires: jq +BuildRequires: %{python_module pytest} +Requires: python-astunparse +BuildArch: noarch +Requires(post): update-alternatives +Requires(postun): update-alternatives +%python_subpackages + +%description +Easily run Python at the shell! Magical, but never mysterious. + +See README.md or https://github.com/hauntsaninja/pyp for examples. + +%prep +%setup -q -n pyp-%{version} +sed -i '/^#!\//, 1d' pyp.py + +%build +%python_build + +%install +%python_install +%python_clone -a %{buildroot}%{_bindir}/pyp +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +export PATH=$(pwd):$PATH +%{python_expand ln -sf %{buildroot}%{_bindir}/pyp-%{$python_bin_suffix} pyp +PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} -vv #k 'not test_tracebacks' +} + +%post +%python_install_alternative pyp + +%postun +%python_uninstall_alternative pyp + +%files %{python_files} +%license LICENSE +%doc *.md +%{python_sitelib}/ +%python_alternative %{_bindir}/pyp + +%changelog