Created
May 19, 2013 09:32
-
-
Save tkdchen/5607189 to your computer and use it in GitHub Desktop.
Make changes according to your requirements. I use $var to indicate what you have to replace with real value. The template follows the RPM package naming convention in Fedora community. That is all Python package's name should have prefix ``python-`` .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} | |
%global pkg_name $name | |
Name: python-%{pkg_name} | |
Version: $version | |
Release: 1%{?dist} | |
Summary: $summary | |
Group: Development/Languages | |
License: $license | |
URL: $url | |
Source0: %{pkg_name}-%{version}.tar.gz | |
BuildArch: noarch | |
# BuildRequires section here if necessary | |
# Requires section here if necessary | |
%description | |
%prep | |
%setup -q -n %{pkg_name}-%{version} | |
%build | |
%{__python} setup.py build | |
%install | |
rm -rf $RPM_BUILD_ROOT | |
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT | |
%clean | |
rm -rf $RPM_BUILD_ROOT | |
%files | |
%defattr(-,root,root,-) | |
%doc CHANGES.txt LICENSE.txt MANIFEST.in README.rst TODO.txt VERSION.txt | |
%{python_sitelib}/%{pkg_name}/ | |
%{python_sitelib}/%{pkg_name}-%{version}-py*.egg-info/ | |
%changelog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment