diff --git a/argcomplete-1.8.2.tar.gz b/argcomplete-1.8.2.tar.gz deleted file mode 100644 index 5d1a880..0000000 --- a/argcomplete-1.8.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7a2ccde074eb6631232b2f91f8d8d5985d5bebf0e36b091113096e3a0385546b -size 53626 diff --git a/argcomplete-1.9.2.tar.gz b/argcomplete-1.9.2.tar.gz new file mode 100644 index 0000000..27b68b5 --- /dev/null +++ b/argcomplete-1.9.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6ea272a93bb0387f758def836e73c36fff0c54170258c212de3e84f7db8d5ed +size 46445 diff --git a/python-argcomplete.changes b/python-argcomplete.changes index 675c5e5..e41651b 100644 --- a/python-argcomplete.changes +++ b/python-argcomplete.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Fri Sep 15 13:49:08 UTC 2017 - adrian.glaubitz@suse.com + +- New upstream release + + Version 1.9.2 +- Update patch to skip broken tcsh tests + + skip_tcsh_tests.patch +- Fix issues with singlespec auto-conversion + + Install %{python_sitelib}/bash_completion.d/python-argcomplete.sh + into %{_sysconfdir}/bash_completion.d/ + + Use %python_clone to create both Python 2 and Python 3 versions + of all scripts below /usr/bin and /etc/bash_completion.d + with the %{python_version} suffix; also install the Python 3 + versions without the suffix + +------------------------------------------------------------------- +Thu Aug 24 13:32:49 UTC 2017 - jmatejek@suse.com + +- singlespec auto-conversion + ------------------------------------------------------------------- Thu Jul 20 09:48:53 UTC 2017 - sebix+novell.com@sebix.at @@ -114,4 +134,3 @@ Fri Apr 26 20:49:09 UTC 2013 - darin@darins.net Fri Apr 26 20:44:08 UTC 2013 - darin@darins.net - Initial packaging - diff --git a/python-argcomplete.spec b/python-argcomplete.spec index d0a1a68..8e1d52f 100644 --- a/python-argcomplete.spec +++ b/python-argcomplete.spec @@ -18,8 +18,9 @@ %{!?license: %global license %doc} +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-argcomplete -Version: 1.8.2 +Version: 1.9.2 Release: 0 Summary: Bash tab completion for argparse License: Apache-2.0 @@ -27,18 +28,18 @@ Group: Development/Languages/Python Url: https://github.com/kislyuk/argcomplete Source: https://files.pythonhosted.org/packages/source/a/argcomplete/argcomplete-%{version}.tar.gz Patch0: skip_tcsh_tests.patch -BuildRequires: python-devel -BuildRequires: python-setuptools +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros # SECTION tests -BuildRequires: python-coverage -BuildRequires: python-flake8 -BuildRequires: python-pexpect -BuildRequires: python-wheel +BuildRequires: %{python_module coverage} +BuildRequires: %{python_module flake8} +BuildRequires: %{python_module pexpect} +BuildRequires: %{python_module wheel} # END SECTIONS tests Requires: python-wheel -Requires(post): update-alternatives -Requires(postun): update-alternatives BuildArch: noarch +%python_subpackages %description Argcomplete provides easy, extensible command line tab completion of @@ -56,46 +57,37 @@ resources over the network). %prep %setup -q -n argcomplete-%{version} -%patch0 +%patch0 -p1 %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install rm -rf %{buildroot}%{python_sitelib}/test rm %{buildroot}%{_bindir}/activate-global-python-argcomplete -rm %{buildroot}%{_bindir}/register-python-argcomplete -mv %{buildroot}%{_bindir}/python-argcomplete-check-easy-install-script \ - %{buildroot}%{_bindir}/python-argcomplete-check-easy-install-script-%{python_version} -mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/ -ln -sf %{_sysconfdir}/alternatives/python-argcomplete.sh %{buildroot}%{_sysconfdir}/bash_completion.d/ -ln -sf %{_sysconfdir}/alternatives/python-argcomplete-check-easy-install-script %{buildroot}%{_bindir}/python-argcomplete-check-easy-install-script +%python_clone %{buildroot}%{_bindir}/python-argcomplete-check-easy-install-script +%python_clone %{buildroot}%{_bindir}/register-python-argcomplete +install -DTm644 %{buildroot}%{python_sitelib}/argcomplete/bash_completion.d/python-argcomplete.sh %{buildroot}%{_sysconfdir}/bash_completion.d/python-argcomplete.sh +%python_clone %{buildroot}%{_sysconfdir}/bash_completion.d/python-argcomplete.sh # tcsh support is broken rm %{buildroot}%{_bindir}/python-argcomplete-tcsh -sed -i 's/^#!\/usr\/bin\/python$/#!\/usr\/bin\/python2/' %{buildroot}%{_bindir}/python-argcomplete-check-easy-install-script-%{python_version} %check export LANG=en_US.UTF-8 -python setup.py test +%python_exec setup.py test -%post -update-alternatives \ - --install %{_sysconfdir}/bash_completion.d/python-argcomplete.sh python-argcomplete.sh \ - %{python_sitelib}/argcomplete/bash_completion.d/python-argcomplete.sh 20 \ - --slave %{_bindir}/python-argcomplete-check-easy-install-script \ - python-argcomplete-check-easy-install-script \ - %{_bindir}/python-argcomplete-check-easy-install-script-%{py_ver} - -%files +%files %{python_files} +%defattr(-,root,root) %doc README.rst %license LICENSE.rst -%ghost %{_bindir}/python-argcomplete-check-easy-install-script -%{_bindir}/python-argcomplete-check-easy-install-script-%{py_ver} -%{python_sitelib}/argcomplete-%{version}-py%{py_ver}.egg-info +%{python_sitelib}/argcomplete-%{version}-py%{python_version}.egg-info %{python_sitelib}/argcomplete -%{_sysconfdir}/bash_completion.d/python-argcomplete.sh -%ghost %{_sysconfdir}/alternatives/python-argcomplete.sh -%ghost %{_sysconfdir}/alternatives/python-argcomplete-check-easy-install-script +%python3_only %{_bindir}/python-argcomplete-check-easy-install-script +%python3_only %{_bindir}/register-python-argcomplete +%python3_only %{_sysconfdir}/bash_completion.d/python-argcomplete.sh +%{_bindir}/python-argcomplete-check-easy-install-script-%{python_version} +%{_bindir}/register-python-argcomplete-%{python_version} +%{_sysconfdir}/bash_completion.d/python-argcomplete.sh-%{python_version} %changelog diff --git a/skip_tcsh_tests.patch b/skip_tcsh_tests.patch index d1007e1..eda967a 100644 --- a/skip_tcsh_tests.patch +++ b/skip_tcsh_tests.patch @@ -1,10 +1,58 @@ ---- test/test.py 2017-01-26 21:58:24.000000000 +0100 -+++ test/test.py 2017-07-20 11:36:11.820934599 +0200 -@@ -1041,6 +1041,7 @@ - self.assertEqual(self.sh.run_command('python ./prog basic f\t'), 'foo\r\n') +diff -Nru argcomplete-1.9.2.orig/test/test.py argcomplete-1.9.2/test/test.py +--- argcomplete-1.9.2.orig/test/test.py 2017-08-23 19:29:25.000000000 +0200 ++++ argcomplete-1.9.2/test/test.py 2017-09-15 11:55:27.264394475 +0200 +@@ -1149,30 +1149,30 @@ + self.assertEqual(self.sh.run_command('python -m package.prog basic f\t'), 'foo\r\n') -+@unittest.expectedFailure - class TestTcsh(_TestSh, unittest.TestCase): - expected_failures = [ - 'test_unquoted_space', +-class TestTcsh(_TestSh, unittest.TestCase): +- expected_failures = [ +- 'test_unquoted_space', +- 'test_quoted_space', +- 'test_continuation', +- 'test_parse_special_characters', +- 'test_parse_special_characters_dollar', +- ] +- +- def setUp(self): +- sh = Shell('tcsh') +- path = ' '.join([os.path.join(BASE_DIR, 'scripts'), TEST_DIR, '$path']) +- sh.run_command('set path = ({0})'.format(path)) +- sh.run_command('setenv PYTHONPATH {0}'.format(BASE_DIR)) +- output = sh.run_command('eval `register-python-argcomplete --shell tcsh prog`') +- self.assertEqual(output, '') +- self.sh = sh +- +- def tearDown(self): +- # The shell wrapper is fragile; exactly which exception is raised +- # differs depending on environment. +- with self.assertRaises((pexpect.EOF, OSError)): +- self.sh.run_command('exit') +- self.sh.run_command('') ++# class TestTcsh(_TestSh, unittest.TestCase): ++# expected_failures = [ ++# 'test_unquoted_space', ++# 'test_quoted_space', ++# 'test_continuation', ++# 'test_parse_special_characters', ++# 'test_parse_special_characters_dollar', ++# ] ++ ++# def setUp(self): ++# sh = Shell('tcsh') ++# path = ' '.join([os.path.join(BASE_DIR, 'scripts'), TEST_DIR, '$path']) ++# sh.run_command('set path = ({0})'.format(path)) ++# sh.run_command('setenv PYTHONPATH {0}'.format(BASE_DIR)) ++# output = sh.run_command('eval `register-python-argcomplete --shell tcsh prog`') ++# self.assertEqual(output, '') ++# self.sh = sh ++ ++# def tearDown(self): ++# # The shell wrapper is fragile; exactly which exception is raised ++# # differs depending on environment. ++# with self.assertRaises((pexpect.EOF, OSError)): ++# self.sh.run_command('exit') ++# self.sh.run_command('') + + + class Shell(object):