Skip to content

Instantly share code, notes, and snippets.

@djch
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djch/6225ed5ca8660cd85d25 to your computer and use it in GitHub Desktop.
Save djch/6225ed5ca8660cd85d25 to your computer and use it in GitHub Desktop.
Spec file template for python packages
Name: python-modulename
Version: 0.0.0
Release: 1%{?dist}
License: BSD # Will vary between each package
Summary: Short summary from the project URL
Url: https://github.com/user/reponame
Group: Development/Libraries/Python
Source: modulename-%{version}.tar.gz # Must match your downloaded archive
BuildRequires: python-devel, python-distribute
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
Long description from the project's home URL
%prep
%setup -q -n modulename-%{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 README.rst # That maybe a .txt or .md depending on the package source
%{python_sitelib}/*
%changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment