SampleSpecs/pythonmodule: различия между версиями

Материал из ALT Linux Wiki
(Import from freesource.info)
 
(often-used buildreq)
 
(не показано 6 промежуточных версий 3 участников)
Строка 1: Строка 1:
[[Category:Devel]]
<pre>
{{MovedFromFreesourceInfo|AltLinux/Sisyphus/devel/SampleSpecs/pythonmodule}}
%define modulename foo


''По мотивам /usr/share/doc/rpm-build-python-*/python-module-SAMPLE.spec''
Name: python-module-%modulename
<pre>%define version 1.0
Version: 1.0
%define release alt1
Release: alt1


%setup_python_module ...
%setup_python_module %modulename


Summary: ...
Summary: ...
Name: %packagename
Version: %version
Release: %release
Source: %modulename-%version.tar.bz2
License: GPL
License: GPL
Group: Development/Python
Group: Development/Python
Url: http://...
Url: http://...
Packager:
BuildArch: noarch
Source: %name-%version.tar
#BuildPreReq: %py_dependencies setuptools


%description
%description
Строка 24: Строка 27:


%build
%build
mkdir -p buildroot
%python_build


# 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
%install
cp -pr buildroot %buildroot
%python_install
unset RPM_PYTHON
 
%files
%python_sitelibdir/%modulename/
%python_sitelibdir/*.egg-info</pre>
 


%files -f INSTALLED_FILES</pre>
{{Category navigation|title=SampleSpecs|category=SampleSpecs|sortkey={{SUBPAGENAME}}}}

Текущая версия от 05:47, 6 апреля 2009

%define modulename foo

Name: python-module-%modulename
Version: 1.0
Release: alt1

%setup_python_module %modulename

Summary: ...
License: GPL
Group: Development/Python

Url: http://...
Packager:
BuildArch: noarch

Source: %name-%version.tar

#BuildPreReq: %py_dependencies setuptools

%description
...

%prep
%setup

%build
%python_build

%install
%python_install

%files
%python_sitelibdir/%modulename/
%python_sitelibdir/*.egg-info