%global commit 3a24d82e98206e48091d41dd197a4a2dca3cf53d %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global pkgname applib Name: python-applib Version: 1.2 Release: 2%{?dist} Summary: Cross-platform application utilities for Python originally implemented for PyPM License: MIT URL: https://github.com/ActiveState/%{pkgname} Source0: https://github.com/ActiveState/%{pkgname}/archive/%{commit}/%{pkgname}-%{version}-%{shortcommit}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: pytest BuildRequires: python-sh %description applib is a set of cross-platform application utilities that originated in the PyPM project at ActiveState. It contains the following modules: * sh: shell related operations including compression routines * textui: utilities for textual UI such as progress bar and column printing * log: log file rolling, exception-and-verbosity, sub commands, etc. %prep %setup -q -n %{pkgname}-%{commit} rm -rf %{pkgname}.egg-info %build %{__python} setup.py build %install %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT chmod a+x $RPM_BUILD_ROOT%{python_sitelib}/%{pkgname}/_cmdln.py %check # from applib import sh # ImportError: No module named applib %files %doc LICENSE.txt README.rst MANIFEST.in NEWS.txt %{python_sitelib}/* %changelog * Mon Aug 19 2013 Marcelo Barbosa - 1.2-2 - Adjust SOURCE - Adjust env file * Fri Aug 2 2013 Marcelo Barbosa - 1.2-1 - Initial package