Add py2_build/py2_install macros
These macros will significantly simplify %build and %install sections Change-Id: Ic86acb684cd570ec1c7f252bc5882f46225780b6
This commit is contained in:
parent
b88e57585d
commit
0c8ed4cb2e
@ -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}\
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user