forked from pool/python-python-editor
Accepting request 1295796 from home:dancermak:branches:devel:languages:python
Switch to github fork OBS-URL: https://build.opensuse.org/request/show/1295796 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-editor?expand=0&rev=22
This commit is contained in:
15
_service
Normal file
15
_service
Normal file
@@ -0,0 +1,15 @@
|
||||
<services>
|
||||
<service name="obs_scm" mode="manual">
|
||||
<param name="url">https://github.com/openSUSE/python-editor.git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="revision">master</param>
|
||||
<param name="versionformat">@PARENT_TAG@+git@TAG_OFFSET@</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
</service>
|
||||
<service name="set_version" mode="manual"/>
|
||||
<service name="tar" mode="manual"/>
|
||||
<service name="recompress" mode="manual">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">gz</param>
|
||||
</service>
|
||||
</services>
|
4
_servicedata
Normal file
4
_servicedata
Normal file
@@ -0,0 +1,4 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/openSUSE/python-editor.git</param>
|
||||
<param name="changesrevision">eed3bfe17c492af8acd587f514c77bddbc6559ea</param></service></servicedata>
|
3
python-editor-1.0.4+git13.tar.gz
Normal file
3
python-editor-1.0.4+git13.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9bf6292fce526e961fc3a3f1d88726eaae994ea96ac1327809933a3937124712
|
||||
size 9953
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:51fda6bcc5ddbbb7063b2af7509e43bd84bfc32a4ff71349ec7847713882327b
|
||||
size 7132
|
@@ -1,3 +1,20 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 25 13:59:54 UTC 2025 - dcermak@suse.com
|
||||
|
||||
- Update to version 1.0.4+git13:
|
||||
* fix: resolve test failures in package build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 22 14:45:03 UTC 2025 - dcermak@suse.com
|
||||
|
||||
- Update to version 1753113091.b90b296:
|
||||
* feat: recognize emacsclient as emacs
|
||||
* fix: shlex.split() $EDITOR before calling Popen
|
||||
* ci: run the CI on python 3.6 too
|
||||
* Add simple tests using pytest & CI using github actions
|
||||
* support python 3.12
|
||||
* Move the import of disutils.spawn into the scope where it is actually being used so that inquirer can mostly function on default ubuntu python.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 20 11:51:56 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
|
||||
|
||||
|
@@ -17,18 +17,20 @@
|
||||
|
||||
|
||||
Name: python-python-editor
|
||||
Version: 1.0.4
|
||||
Version: 1.0.4+git13
|
||||
Release: 0
|
||||
Summary: Python library to programmatically open an editor and capture the result
|
||||
License: Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/fmoo/python-editor
|
||||
Source: https://files.pythonhosted.org/packages/source/p/python-editor/python-editor-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM support-python312.patch https://github.com/fmoo/python-editor/commit/5023fafd265add111b29baca59b07f140daf75b7
|
||||
Patch0: support-python312.patch
|
||||
Source: python-editor-%{version}.tar.gz
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
# tests
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module pytest-mock}
|
||||
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildArch: noarch
|
||||
@@ -44,6 +46,7 @@ environment variable.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n python-editor-%{version}
|
||||
sed -i 's|__VERSION__ = .*|__VERSION__ = "%{version}"|' setup.py
|
||||
|
||||
%build
|
||||
find -type f -exec chmod 644 {} +
|
||||
@@ -54,16 +57,14 @@ find -type f -exec chmod 644 {} +
|
||||
%python_expand sed -i -e '/^#!\/usr\/bin\/env/d' %{buildroot}%{$python_sitelib}/editor.py
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}/
|
||||
|
||||
# the example does not look like an unit test
|
||||
# %%check
|
||||
# export EDITOR='nano'
|
||||
# Xpython_exec test.py
|
||||
%check
|
||||
%python_expand pytest test_editor.py
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{python_sitelib}/editor.py
|
||||
%{python_sitelib}/python[-_]editor-%{version}*-info
|
||||
%{python_sitelib}/python_editor-%{version}.dist-info/
|
||||
%pycache_only %{python_sitelib}/__pycache__/editor*
|
||||
|
||||
%changelog
|
||||
|
@@ -1,33 +0,0 @@
|
||||
From 5023fafd265add111b29baca59b07f140daf75b7 Mon Sep 17 00:00:00 2001
|
||||
From: Branch Vincent <branchevincent@gmail.com>
|
||||
Date: Sun, 8 Oct 2023 12:52:53 -0700
|
||||
Subject: [PATCH] support python 3.12
|
||||
|
||||
Python 3.12 has removed `distutils`: https://docs.python.org/3.12/whatsnew/3.12.html#removed
|
||||
---
|
||||
editor.py | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: python-editor-1.0.4/editor.py
|
||||
===================================================================
|
||||
--- python-editor-1.0.4.orig/editor.py
|
||||
+++ python-editor-1.0.4/editor.py
|
||||
@@ -8,7 +8,6 @@ import locale
|
||||
import os.path
|
||||
import subprocess
|
||||
import tempfile
|
||||
-from distutils.spawn import find_executable
|
||||
|
||||
|
||||
__all__ = [
|
||||
@@ -52,6 +51,10 @@ def get_editor_args(editor):
|
||||
|
||||
|
||||
def get_editor():
|
||||
+ try:
|
||||
+ from distutils.spawn import find_executable
|
||||
+ except ImportError:
|
||||
+ from shutil import which as find_executable
|
||||
# Get the editor from the environment. Prefer VISUAL to EDITOR
|
||||
editor = os.environ.get('VISUAL') or os.environ.get('EDITOR')
|
||||
if editor:
|
Reference in New Issue
Block a user