Specfile Example
%define name examplepackage
%define version 0.1
%define release 1
Summary: An example package
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}-%{version}.tar.gz
License: UNKNOWN
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Vendor: Bob Smith <bob@smith.com>
Url: http://example.com/foo/
%description
UNKNOWN
%prep
%setup
%build
python setup.py build
%install
python setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
%clean
rm -rf $RPM_BUILD_ROOT
%files -f INSTALLED_FILES
%defattr(-,root,root)
Distutils
- Platform agnostic definition of python packages.
- Create
setup.py
- Fill it like this:
from distutils.core import setup
setup(
name = 'examplepackage',
version = "0.1",
description = "Example package",
author = "Bob Smith",
author_email = "bob@smith.com",
url = "http://example.com/foo",
packages = ['examplepackage'],
scripts = ['bin/examplescript'],
)