]> git.pld-linux.org Git - packages/python-argcomplete.git/blobdiff - python-argcomplete.spec
- more sure only one set of scripts is installed to __bindir
[packages/python-argcomplete.git] / python-argcomplete.spec
index 09700406528e735ff3dd189bd9d4db05d874f705..65b40a2ccfabefa31bb5e85689d5eebd3c3b0a59 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Conditional build:
-%bcond_without tests   # do not perform "make test"
+%bcond_with    tests   # do not perform "make test"
 %bcond_without python2 # CPython 2.x module
 %bcond_without python3 # CPython 3.x module
 
@@ -10,7 +10,7 @@
 Summary:       Bash tab completion for argparse
 Name:          python-%{pypi_name}
 Version:       1.9.3
-Release:       1
+Release:       3
 License:       Apache v2.0
 Group:         Libraries/Python
 Source0:       https://github.com/kislyuk/argcomplete/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
@@ -18,8 +18,16 @@ Source0:     https://github.com/kislyuk/argcomplete/archive/v%{version}/%{pypi_name}
 URL:           https://github.com/kislyuk/argcomplete
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.714
-%if %{with check}
+%if %{with python3}
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+%endif
+%if %{with tests}
+BuildRequires: bash
 BuildRequires: tcsh
+%if %{with python3}
+BuildRequires: python3-pexpect
+%endif
 %endif
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -41,11 +49,6 @@ resources over the network).
 %package -n python3-%{pypi_name}
 Summary:       %{summary}
 Group:         Libraries/Python
-BuildRequires: python3-devel
-BuildRequires: python3-setuptools
-%if %{with check}
-BuildRequires: python3-pexpect
-%endif
 # pkg_resources module is used from python-argcomplete-check-easy-install-script
 Requires:      python3-setuptools
 
@@ -87,6 +90,7 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %if %{with python3}
+%{__rm} -r $RPM_BUILD_ROOT/%{_bindir}
 %py3_install
 %endif
 
@@ -101,6 +105,12 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc README.rst LICENSE.rst
+%if %{without python3}
+%attr(755,root,root) %{_bindir}/activate-global-python-argcomplete
+%attr(755,root,root) %{_bindir}/python-argcomplete-check-easy-install-script
+%attr(755,root,root) %{_bindir}/python-argcomplete-tcsh
+%attr(755,root,root) %{_bindir}/register-python-argcomplete
+%endif
 %{py_sitescriptdir}/%{module}
 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
 %endif
This page took 0.128796 seconds and 4 git commands to generate.