From 9924c4e9039e2d190ea91ceed9eaf6e84523da5e Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Apr 29 2013 13:09:18 +0000 Subject: Initial import --- diff --git a/.gitignore b/.gitignore index e69de29..92c7146 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/python-optcomplete-1.2.tar.gz diff --git a/python-optcomplete.spec b/python-optcomplete.spec new file mode 100644 index 0000000..ff2c943 --- /dev/null +++ b/python-optcomplete.spec @@ -0,0 +1,94 @@ +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%global with_python3 1 + +Name: python-optcomplete +Version: 1.2 +Release: 0.3.20130428hg9583af7%{?dist} +Summary: Shell Completion Self-Generator for Python + +License: BSD +URL: http://furius.ca/optcomplete +# hg clone --insecure https://hg.furius.ca/public/optcomplete +# cd optcomplete +# hg archive -p python-optcomplete-1.2 ../python-optcomplete-1.2 +Source0: %{name}-%{version}.tar.gz + +BuildArch: noarch +BuildRequires: python2-devel +%if 0%{?with_python3} +BuildRequires: python3-devel +# For 2to3 +BuildRequires: python-tools +%endif # if with_python3 + + +%description +This Python module aims at providing almost automatically shell completion +for any Python program that already uses the optparse module. + + +%if 0%{?with_python3} +%package -n python3-optcomplete +Summary: Shell Completion Self-Generator for Python3 + +%description -n python3-optcomplete +This Python3 module aims at providing almost automatically shell completion +for any Python program that already uses the optparse module. +%endif # if with_python3 + + +%prep +%setup -q + +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +2to3 --write --nobackups %{py3dir} +%endif # with_python3 + + +%build +%{__python} setup.py build + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif # with_python3 + + +%install +rm -rf %{buildroot} +# Must do the python3 install first because the scripts in /usr/bin are +# overwritten with every setup.py install (and we want the python2 version +# to be the default for now). +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install --skip-build --root %{buildroot} +popd +%endif # with_python3 + +%{__python} setup.py install --skip-build --root %{buildroot} + + +%files +%doc CHANGES COPYING CREDITS doc/*.txt README TODO +%{python_sitelib}/* + +%if 0%{?with_python3} +%files -n python3-optcomplete +%doc CHANGES COPYING CREDITS doc/*.txt README TODO +%{python3_sitelib}/* +%endif # with_python3 + + +%changelog +* Sun Apr 28 2013 Orion Poplawski - 1.2-0.3.20130428hg9583af7 +- Update to latest hg version +- Re-add COPYING + +* Sat Apr 27 2013 Orion Poplawski - 1.2-0.2.20130406hg4416852 +- Drop COPYING - wrong license + +* Sun Apr 7 2013 Orion Poplawski - 1.2-0.1.20130406hg4416852 +- Initial Fedora package diff --git a/sources b/sources index e69de29..00d2a8c 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +6448c4dcb877da6af81464894109067e python-optcomplete-1.2.tar.gz