Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 9ba33f1c7eae91de6258f3df12e00d31 > files > 1

python-which-1.1.0-8.mga3.src.rpm

Name:           python-which
Version:        1.1.0
Release:        %mkrel 8
Summary:        Small which replacement that can be used as a Python module

Group:          Development/Python
License:        MIT
URL:            http://trentm.com/projects/which/
Source0:        http://trentm.com/downloads/which/%{version}/which-%{version}.zip
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

BuildArch:      noarch
%py_requires -d

%description
which.py is a small which replacement. It has the following features:

 * it can print all matches on the PATH;
 * it can note "near misses" on the PATH (e.g. files that match but 
   may not, say, have execute permissions); and
 * it can be used as a Python module.


%prep
%setup -q -n which-%{version}


%build
%{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
# add a script that calls the python module
cat << \EOF > which-python
#!/bin/sh
python -m which $@
EOF
mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -m0755 -p which-python $RPM_BUILD_ROOT%{_bindir}

 
%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc LICENSE.txt README.txt TODO.txt
%{_bindir}/which-python
%{python_sitelib}/which.py*
%{python_sitelib}/which-*.egg-info






%changelog

* Sun Jan 13 2013 umeabot <umeabot> 1.1.0-8.mga3
+ Revision: 379681
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Mon Jan 17 2011 pterjan <pterjan> 1.1.0-7.mga1
+ Revision: 21256
- Rebuild for python 2.7

* Sun Jan 09 2011 blino <blino> 1.1.0-6.mga1
+ Revision: 3282
- imported package python-which