15
0
Files
python-pexpect/python-pexpect.spec
Dirk Mueller afff37e088 - update to 4.9:
* Add support for Python 3.12 #769.
  * Clean up temporary files after UnicodeTests #753.
  * Add Python 3.5, 3.6 and 3.12.0-rc.1 to test matrix #763.
  * Set prompt correctly for zsh #712.
  * Add zsh convenience function to replwrap module #751.
  * Rework async unittests to rely on
    unittest.IsolatedAsyncioTestCase #764.
  * Make test_expect.py work on POSIX systems that are not Linux
    based #698.
  * Add support for ``socket``, which allows sockets to be used
    crossplatform #745.
  * Update async to work on newer versions of python #732.
  * Remove deprecated RSAAuthentication option (SSHv1) #744.
  * Multiple CI fixes #743 #737 #742 #739 #722.
  * Use Github Actions for CI #734.
  * Remove pytest-capturelog from testing requirements #730.
  * Fix usage for Solaris #663 #604 #560.
  * Fix threading for new versions of python #684.
  * Fix documentation builds for use with Sphinx 3 #638.
  * Use ``sys.executable`` for tests and wrapper, allowing the
    calling python executable to be used instead #623.
  * Update documentation about Wexpect #623.
  * Added project urls to ``setup.py`` #620.
  * Provide examples for how to use Pexpect and Pyte #587.
  * Coerce compiled regex patterns type according to spawn
    encoding #560.
  * Several doc updates #626 #635 #643 #644 #728.
  drop 31fab7b0edbe9b3401507b5dfa4db6aaf3fabca5.patch,
       684.patch, 715.patch, 742.patch,

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pexpect?expand=0&rev=80
2023-11-25 09:38:45 +00:00

80 lines
2.7 KiB
RPMSpec

#
# spec file for package python-pexpect
#
# Copyright (c) 2023 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-pexpect
Version: 4.9.0
Release: 0
Summary: Pure Python Expect-like module
License: ISC
URL: https://github.com/pexpect/pexpect
Source: https://files.pythonhosted.org/packages/source/p/pexpect/pexpect-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module ptyprocess}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module wheel}
# For test command calls
# For bash validation
BuildRequires: bash
BuildRequires: fdupes
# For man validation
BuildRequires: man
BuildRequires: openssl
BuildRequires: python-rpm-macros
Requires: python-ptyprocess
BuildArch: noarch
%python_subpackages
%description
Pexpect is a pure Python module for spawning child applications;
controlling them; and responding to expected patterns in their output.
%prep
%autosetup -p1 -n pexpect-%{version}
# Fix wrong-script-interpreter
find examples -type f -name "*.py" -exec sed -i "s|#!%{_bindir}/env python||" {} \;
find examples -type f -name "*.cgi" -exec sed -i "s|##!%{_bindir}/env python|##!%{_bindir}/python|" {} \;
# Mark example *.py as non-executable (we already patch the shebang out, so they can't be started anyway)
find examples -type f -name "*.py" -exec chmod 644 {} \;
# Remove shebang
sed -i '1 {/^#!/d}' pexpect/FSM.py
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export LANG=en_US.UTF-8
echo "set enable-bracketed-paste off" > .inputrc
export INPUTRC=$(readlink -f .inputrc) TRAVIS=true
# test_pager_as_cat - needs manpages that would pull extra deps
# test_interrupt, test_multiple_interrupts - hangs under linux-user emulation
%pytest -k "not (test_pager_as_cat or test_zsh %{?qemu_user_space_build: or test_interrupt or test_multiple_interrupts})"
%files %{python_files}
%license LICENSE
%doc doc examples
%{python_sitelib}/pexpect
%{python_sitelib}/pexpect-%{version}*-info
%changelog