python2 -> python3
Change-Id: Ia3ce7fbddf0c2041840386706ac66df436c06fbe
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
%define boost_libs1 boost-date-time boost-filesystem boost-graph
%define boost_libs2 boost-iostreams boost-math boost-test
%define boost_libs1 boost-date-time boost-filesystem boost-graph
%define boost_libs2 boost-iostreams boost-math boost-test
-%define boost_libs3 boost-program-options boost-python boost-serialization
+%define boost_libs3 boost-program-options boost-python3 boost-serialization
%define boost_libs4 boost-system boost-thread
%define boost_libs5 boost-wave boost-regex boost-contract
%define boost_libs6 boost-random boost-chrono boost-locale
%define boost_libs4 boost-system boost-thread
%define boost_libs5 boost-wave boost-regex boost-contract
%define boost_libs6 boost-random boost-chrono boost-locale
BuildRequires: zlib-devel
BuildRequires: expat-devel
BuildRequires: libicu-devel
BuildRequires: zlib-devel
BuildRequires: expat-devel
BuildRequires: libicu-devel
-BuildRequires: python
-BuildRequires: python-devel
+BuildRequires: pkgconfig(python3)
BuildRequires: xz
BuildRequires: fdupes
Url: http://www.boost.org
BuildRequires: xz
BuildRequires: fdupes
Url: http://www.boost.org
This package contains the Boost::ProgramOptions Runtime libraries.
This package contains the Boost::ProgramOptions Runtime libraries.
-%package -n boost-python
+%package -n boost-python3
Summary: Boost::Python Runtime Libraries
Group: System/Libraries
Requires: boost-license
Summary: Boost::Python Runtime Libraries
Group: System/Libraries
Requires: boost-license
-%description -n boost-python
+%description -n boost-python3
This package contains the Boost::Python Runtime libraries.
%package -n boost-serialization
This package contains the Boost::Python Runtime libraries.
%package -n boost-serialization
export LONG_DOUBLE_FLAGS="--disable-long-double"
%endif
BJAM_CONFIG="-d2 -j$JOBS -sICU_PATH=%{_prefix}"
export LONG_DOUBLE_FLAGS="--disable-long-double"
%endif
BJAM_CONFIG="-d2 -j$JOBS -sICU_PATH=%{_prefix}"
-PYTHON_VERSION=$(python -c 'import sys; print sys.version[:3]')
-PYTHON_FLAGS="--with-python-root=/usr --with-python-version=$PYTHON_VERSION"
+PYTHON_VERSION=$(python3 -c 'import sys; print (sys.version[:3])')
+PYTHON_FLAGS=" --with-python-root=/usr/lib/python${PYTHON_VERSION} --with-python-version=${PYTHON_VERSION}"
export REGEX_FLAGS="--with-icu"
export EXPAT_INCLUDE=/usr/include EXPAT_LIBPATH=%{_libdir}
export PYTHON_FLAGS
export REGEX_FLAGS="--with-icu"
export EXPAT_INCLUDE=/usr/include EXPAT_LIBPATH=%{_libdir}
export PYTHON_FLAGS
+
+cat << EOF >>user-config.jam
+
+using python
+ : ${PYTHON_VERSION}
+ : /usr/bin/python3
+ : %{_includedir}/python${PYTHON_VERSION}m
+ :
+ :
+ ;
+
+EOF
+
# perform the compilation
./b2 %{?_smp_mflags} --prefix=%{_prefix} --libdir=%{_libdir} \
--user-config=./user-config.jam ${CFLAGS:+cflags="$CFLAGS"} \
# perform the compilation
./b2 %{?_smp_mflags} --prefix=%{_prefix} --libdir=%{_libdir} \
--user-config=./user-config.jam ${CFLAGS:+cflags="$CFLAGS"} \
%post -n boost-log -p /sbin/ldconfig
%post -n boost-test -p /sbin/ldconfig
%post -n boost-program-options -p /sbin/ldconfig
%post -n boost-log -p /sbin/ldconfig
%post -n boost-test -p /sbin/ldconfig
%post -n boost-program-options -p /sbin/ldconfig
-%post -n boost-python -p /sbin/ldconfig
+%post -n boost-python3 -p /sbin/ldconfig
%post -n boost-regex -p /sbin/ldconfig
%post -n boost-serialization -p /sbin/ldconfig
%post -n boost-thread -p /sbin/ldconfig
%post -n boost-regex -p /sbin/ldconfig
%post -n boost-serialization -p /sbin/ldconfig
%post -n boost-thread -p /sbin/ldconfig
%postun -n boost-log -p /sbin/ldconfig
%postun -n boost-test -p /sbin/ldconfig
%postun -n boost-program-options -p /sbin/ldconfig
%postun -n boost-log -p /sbin/ldconfig
%postun -n boost-test -p /sbin/ldconfig
%postun -n boost-program-options -p /sbin/ldconfig
-%postun -n boost-python -p /sbin/ldconfig
+%postun -n boost-python3 -p /sbin/ldconfig
%postun -n boost-regex -p /sbin/ldconfig
%postun -n boost-serialization -p /sbin/ldconfig
%postun -n boost-thread -p /sbin/ldconfig
%postun -n boost-regex -p /sbin/ldconfig
%postun -n boost-serialization -p /sbin/ldconfig
%postun -n boost-thread -p /sbin/ldconfig
%license LICENSE_1_0.txt
%{_libdir}/libboost_program_options*.so.*
%license LICENSE_1_0.txt
%{_libdir}/libboost_program_options*.so.*
%manifest %{name}.manifest
%defattr(-, root, root, -)
%license LICENSE_1_0.txt
%manifest %{name}.manifest
%defattr(-, root, root, -)
%license LICENSE_1_0.txt