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

Материал из ALT Linux Wiki
(протухло)
(пхиксоред)
Строка 1: Строка 1:
{{MovedFromFreesourceInfo|AltLinux/Sisyphus/devel/SampleSpecs/pythonmodule}}
<pre>
{{crap}}
%define modulename foo
''По мотивам /usr/share/doc/rpm-build-python-*/python-module-SAMPLE.spec''
<pre>%define version 1.0
%define release alt1


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


Summary: ...
Summary: ...
Name: %packagename
Version: %version
Release: %release
Source: %modulename-%version.tar.bz2
License: GPL
License: GPL
Group: Development/Python
Group: Development/Python
Source: %name-%version.tar
Url: http://...
Url: http://...
%setup_python_module %modulename


%description
%description
Строка 23: Строка 23:


%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 -f INSTALLED_FILES</pre>
%files
%python_sitelibdir/%modulename/
%python_sitelibdir/*.egg-info</pre>




{{Category navigation|title=SampleSpecs|category=SampleSpecs|sortkey={{SUBPAGENAME}}}}
{{Category navigation|title=SampleSpecs|category=SampleSpecs|sortkey={{SUBPAGENAME}}}}

Версия от 16:20, 30 марта 2009

%define modulename foo

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

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

Source: %name-%version.tar

Url: http://...

%setup_python_module %modulename

%description
...

%prep
%setup

%build
%python_build
               
%install
%python_install

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