python-which-vl.spec 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
  2. Name: python-which
  3. Version: 1.1.0
  4. Release: 2%{?_dist_release}
  5. Summary: Small which replacement that can be used as a Python module
  6. Group: Development/Languages
  7. License: MIT
  8. URL: http://trentm.com/projects/which/
  9. Source0: http://trentm.com/downloads/which/%{version}/which-%{version}.zip
  10. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  11. BuildArch: noarch
  12. BuildRequires: python-devel
  13. %description
  14. which.py is a small which replacement. It has the following features:
  15. * it can print all matches on the PATH;
  16. * it can note "near misses" on the PATH (e.g. files that match but
  17. may not, say, have execute permissions); and
  18. * it can be used as a Python module.
  19. %prep
  20. %setup -q -n which-%{version}
  21. %build
  22. %{__python} setup.py build
  23. %install
  24. %__rm -rf $RPM_BUILD_ROOT
  25. %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
  26. # add a script that calls the python module
  27. cat << \EOF > which-python
  28. #!/bin/sh
  29. python -m which $@
  30. EOF
  31. %__mkdir_p $RPM_BUILD_ROOT%{_bindir}
  32. %__install -m0755 -p which-python $RPM_BUILD_ROOT%{_bindir}
  33. %clean
  34. %__rm -rf $RPM_BUILD_ROOT
  35. %files
  36. %defattr(-,root,root,-)
  37. %doc LICENSE.txt README.txt TODO.txt
  38. %{_bindir}/which-python
  39. %{python_sitelib}/which.py*
  40. %{python_sitelib}/which-*.egg-info
  41. %changelog
  42. * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.1.0-2
  43. - rebuild with python-2.7.2
  44. * Thu Jul 14 2011 Munehiro Yamamoto <munepi@vinelinux.org> - 1.1.0-1
  45. - initial build
  46. * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-8
  47. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  48. * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.1.0-7
  49. - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
  50. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-6
  51. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  52. * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-5
  53. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  54. * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.1.0-4
  55. - Rebuild for Python 2.6
  56. * Mon Jan 7 2008 Patrice Dumas <pertusus@free.fr> - 1.1.0-3
  57. - ship egg file
  58. * Sun Oct 28 2007 <ndbecker2@gmail.com> - 1.1.0-2
  59. - Remove ref to GNU
  60. * Sat Oct 27 2007 <ndbecker2@gmail.com> - 1.1.0-1
  61. - Package for fedora
  62. * Thu Jul 19 2007 Patrice Dumas <pertusus@free.fr> 1.1.0-1
  63. - initial packaging