SampleSpecs/pythonmodule
По мотивам /usr/share/doc/rpm-build-python-*/python-module-SAMPLE.spec
%define version 1.0 %define release alt1 %setup_python_module ... Summary: ... Name: %packagename Version: %version Release: %release Source: %modulename-%version.tar.bz2 License: GPL Group: Development/Python Url: http://... %description ... %prep %setup %build mkdir -p buildroot # Unfortunately build and install steps should be done at once # because otherwise .pyo files won't get into INSTALLED_FILES # record CFLAGS="%optflags" %__python setup.py \ install --optimize=2 \ --root=`pwd`/buildroot \ --record=INSTALLED_FILES %install cp -pr buildroot %buildroot unset RPM_PYTHON %files -f INSTALLED_FILES