X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=python-argcomplete.spec;h=65b40a2ccfabefa31bb5e85689d5eebd3c3b0a59;hb=935ce037d42a49c8739ecc2939c45fddccc3dd00;hp=09700406528e735ff3dd189bd9d4db05d874f705;hpb=c2ac89bf1c49ca15620f1fd460d4519428eb0ad1;p=packages%2Fpython-argcomplete.git diff --git a/python-argcomplete.spec b/python-argcomplete.spec index 0970040..65b40a2 100644 --- a/python-argcomplete.spec +++ b/python-argcomplete.spec @@ -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