2015-08-25 07:22:56 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-python-editor
|
|
|
|
#
|
2025-06-10 12:58:13 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2015-08-25 07:22:56 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-12-04 13:55:30 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-08-25 07:22:56 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: python-python-editor
|
2025-07-26 05:20:50 +00:00
|
|
|
Version: 1.0.4+git13
|
2015-08-25 07:22:56 +00:00
|
|
|
Release: 0
|
2018-12-19 03:58:59 +00:00
|
|
|
Summary: Python library to programmatically open an editor and capture the result
|
2015-08-25 07:22:56 +00:00
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Languages/Python
|
2018-12-04 17:20:06 +00:00
|
|
|
URL: https://github.com/fmoo/python-editor
|
2025-07-26 05:20:50 +00:00
|
|
|
Source: python-editor-%{version}.tar.gz
|
2025-06-10 12:58:13 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2017-08-22 13:21:27 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2025-06-10 12:58:13 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2025-07-26 05:20:50 +00:00
|
|
|
# tests
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module pytest-mock}
|
|
|
|
|
2025-06-23 05:46:32 +00:00
|
|
|
BuildRequires: fdupes
|
2017-08-22 13:21:27 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2018-12-04 17:20:06 +00:00
|
|
|
BuildArch: noarch
|
2016-09-16 14:36:23 +00:00
|
|
|
%if 0%{?is_opensuse}
|
2016-09-16 13:38:26 +00:00
|
|
|
BuildRequires: nano
|
2016-09-16 14:36:23 +00:00
|
|
|
%endif
|
2017-08-22 13:21:27 +00:00
|
|
|
%python_subpackages
|
2015-08-25 07:22:56 +00:00
|
|
|
|
|
|
|
%description
|
2016-01-13 12:07:58 +00:00
|
|
|
python-editor is a library that provides the editor module for
|
2018-12-19 03:58:59 +00:00
|
|
|
programmatically interfacing with the editor defined in the EDITOR
|
|
|
|
environment variable.
|
2015-08-25 07:22:56 +00:00
|
|
|
|
|
|
|
%prep
|
2025-06-23 05:46:32 +00:00
|
|
|
%autosetup -p1 -n python-editor-%{version}
|
2025-07-26 05:20:50 +00:00
|
|
|
sed -i 's|__VERSION__ = .*|__VERSION__ = "%{version}"|' setup.py
|
2015-08-25 07:22:56 +00:00
|
|
|
|
|
|
|
%build
|
2019-05-09 09:42:53 +00:00
|
|
|
find -type f -exec chmod 644 {} +
|
2025-06-10 12:58:13 +00:00
|
|
|
%pyproject_wheel
|
2015-08-25 07:22:56 +00:00
|
|
|
|
|
|
|
%install
|
2025-06-10 12:58:13 +00:00
|
|
|
%pyproject_install
|
2019-05-09 09:42:53 +00:00
|
|
|
%python_expand sed -i -e '/^#!\/usr\/bin\/env/d' %{buildroot}%{$python_sitelib}/editor.py
|
2025-06-23 05:46:32 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}/
|
2015-08-25 07:22:56 +00:00
|
|
|
|
2025-07-26 05:20:50 +00:00
|
|
|
%check
|
|
|
|
%python_expand pytest test_editor.py
|
2016-09-16 13:38:26 +00:00
|
|
|
|
2017-08-22 13:21:27 +00:00
|
|
|
%files %{python_files}
|
2018-12-04 17:20:06 +00:00
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
2025-06-10 12:58:13 +00:00
|
|
|
%{python_sitelib}/editor.py
|
2025-07-26 05:20:50 +00:00
|
|
|
%{python_sitelib}/python_editor-%{version}.dist-info/
|
2025-06-10 12:58:13 +00:00
|
|
|
%pycache_only %{python_sitelib}/__pycache__/editor*
|
2015-08-25 07:22:56 +00:00
|
|
|
|
|
|
|
%changelog
|