Add py2_build/py2_install macros

These macros will significantly simplify %build and %install sections

Change-Id: Ic86acb684cd570ec1c7f252bc5882f46225780b6
This commit is contained in:
Haikel Guemar 2016-06-22 13:25:47 +02:00 committed by Dirk Mueller
parent b88e57585d
commit 0c8ed4cb2e

View File

@ -1,2 +1,18 @@
# Macros for building OpenStack RPMs.
#
#
# Python macros
#
%py_setup setup.py
%py2_shbang_opts -s
%py2_build() %{expand:\
CFLAGS="%{optflags}" %{__python2} %{py_setup} %{?py_setup_args} build --executable="%{__python2} %{py2_shbang_opts}" %{?1}\
}
%py2_install() %{expand:\
CFLAGS="%{optflags}" %{__python2} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?1}\
}