Add numpy and numpy3 packages (#1451982)
This commit is contained in:
parent
7ace5f0128
commit
a919cdd969
|
@ -0,0 +1,129 @@
|
||||||
|
--- boost_1_63_0/libs/mpi/build/Jamfile.v2 2016-12-22 06:33:17.000000000 -0600
|
||||||
|
+++ boost_1_63_0/libs/mpi/build/Jamfile.v2 2017-05-19 01:45:05.485563800 -0500
|
||||||
|
@@ -11,6 +11,7 @@
|
||||||
|
import mpi ;
|
||||||
|
import indirect ;
|
||||||
|
import python ;
|
||||||
|
+import feature ;
|
||||||
|
|
||||||
|
libraries = ;
|
||||||
|
|
||||||
|
@@ -53,18 +54,38 @@ lib boost_mpi
|
||||||
|
<library>../../serialization/build//boost_serialization
|
||||||
|
<library>/mpi//mpi [ mpi.extra-requirements ]
|
||||||
|
;
|
||||||
|
+
|
||||||
|
+rule cond ( test ? : yes * : no * ) { if $(test) { return $(yes) ; } else { return $(no) ; } }
|
||||||
|
|
||||||
|
libraries += boost_mpi ;
|
||||||
|
+rule find-py3-version
|
||||||
|
+{
|
||||||
|
+ local versions = [ feature.values python ] ;
|
||||||
|
+ local py3ver ;
|
||||||
|
+ for local v in $(versions)
|
||||||
|
+ {
|
||||||
|
+ if $(v) >= 3.0
|
||||||
|
+ {
|
||||||
|
+ py3ver = $(v) ;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ return $(py3ver) ;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+py3-version = [ find-py3-version ] ;
|
||||||
|
|
||||||
|
if [ python.configured ]
|
||||||
|
{
|
||||||
|
- lib boost_mpi_python
|
||||||
|
+
|
||||||
|
+ rule lib_boost_mpi_python ( is-py3 ? ) {
|
||||||
|
+
|
||||||
|
+ lib [ cond $(is-py3) : boost_mpi_python3 : boost_mpi_python ]
|
||||||
|
: # Sources
|
||||||
|
python/serialize.cpp
|
||||||
|
: # Requirements
|
||||||
|
<library>boost_mpi
|
||||||
|
<library>/mpi//mpi [ mpi.extra-requirements ]
|
||||||
|
- <library>/boost/python//boost_python
|
||||||
|
+ [ cond $(is-py3) : <library>/boost/python//boost_python3 : <library>/boost/python//boost_python ]
|
||||||
|
<link>shared:<define>BOOST_MPI_DYN_LINK=1
|
||||||
|
<link>shared:<define>BOOST_MPI_PYTHON_DYN_LINK=1
|
||||||
|
<link>shared:<define>BOOST_PYTHON_DYN_LINK=1
|
||||||
|
@@ -76,7 +97,6 @@ libraries += boost_mpi ;
|
||||||
|
: # Usage requirements
|
||||||
|
<library>/mpi//mpi [ mpi.extra-requirements ]
|
||||||
|
;
|
||||||
|
- libraries += boost_mpi_python ;
|
||||||
|
|
||||||
|
python-extension mpi
|
||||||
|
: # Sources
|
||||||
|
@@ -93,8 +113,8 @@ libraries += boost_mpi ;
|
||||||
|
python/status.cpp
|
||||||
|
python/py_timer.cpp
|
||||||
|
: # Requirements
|
||||||
|
- <library>/boost/python//boost_python
|
||||||
|
- <library>boost_mpi_python
|
||||||
|
+ [ cond $(is-py3) : <library>/boost/python//boost_python3 : <library>/boost/python//boost_python ]
|
||||||
|
+ [ cond $(is-py3) : <library>boost_mpi_python3 : <library>boost_mpi_python ]
|
||||||
|
<library>boost_mpi
|
||||||
|
<library>/mpi//mpi [ mpi.extra-requirements ]
|
||||||
|
<link>shared:<define>BOOST_MPI_DYN_LINK=1
|
||||||
|
@@ -102,6 +122,16 @@ libraries += boost_mpi ;
|
||||||
|
<link>shared:<define>BOOST_PYTHON_DYN_LINK=1
|
||||||
|
<link>shared <runtime-link>shared
|
||||||
|
;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if $(py3-version) {
|
||||||
|
+ lib_boost_mpi_python yes ;
|
||||||
|
+ libraries += boost_mpi_python3 ;
|
||||||
|
+ } else {
|
||||||
|
+ lib_boost_mpi_python ;
|
||||||
|
+ libraries += boost_mpi_python ;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ! ( --without-mpi in [ modules.peek : ARGV ] )
|
||||||
|
--- boost_1_63_0/libs/python/build/Jamfile 2017-05-19 02:33:53.600132400 -0500
|
||||||
|
+++ boost_1_63_0/libs/python/build/Jamfile 2017-05-19 01:50:43.746550000 -0500
|
||||||
|
@@ -140,7 +140,7 @@ rule lib_boost_numpy ( is-py3 ? )
|
||||||
|
[ cond [ python.numpy ] : <library>/python//python_for_extensions ]
|
||||||
|
[ unless [ python.numpy ] : <build>no ]
|
||||||
|
<include>$(numpy-include)
|
||||||
|
- <library>boost_python
|
||||||
|
+ [ cond $(is-py3) : <library>boost_python3 : <library>boost_python ]
|
||||||
|
<python-debugging>on:<define>BOOST_DEBUG_PYTHON
|
||||||
|
[ cond $(is-py3) : <python>$(py3-version) ]
|
||||||
|
|
||||||
|
@@ -154,22 +154,25 @@ rule lib_boost_numpy ( is-py3 ? )
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
-libraries = boost_python ;
|
||||||
|
+libraries2 = boost_python ;
|
||||||
|
libraries3 = boost_python3 ;
|
||||||
|
if [ python.numpy ]
|
||||||
|
{
|
||||||
|
- libraries += boost_numpy ;
|
||||||
|
+ libraries2 += boost_numpy ;
|
||||||
|
libraries3 += boost_numpy3 ;
|
||||||
|
}
|
||||||
|
|
||||||
|
-lib_boost_python ;
|
||||||
|
-lib_boost_numpy ;
|
||||||
|
-
|
||||||
|
if $(py3-version)
|
||||||
|
{
|
||||||
|
lib_boost_python yes ;
|
||||||
|
lib_boost_numpy yes ;
|
||||||
|
libraries += $(libraries3) ;
|
||||||
|
}
|
||||||
|
+else
|
||||||
|
+{
|
||||||
|
+ lib_boost_python ;
|
||||||
|
+ lib_boost_numpy ;
|
||||||
|
+ libraries += $(libraries2) ;
|
||||||
|
+}
|
||||||
|
|
||||||
|
boost-install $(libraries) ;
|
|
@ -1,46 +0,0 @@
|
||||||
--- boost_1_63_0/tools/build/src/tools/python.jam.orig 2017-02-16 18:51:14.005483084 +0000
|
|
||||||
+++ boost_1_63_0/tools/build/src/tools/python.jam 2017-02-16 18:51:24.912497496 +0000
|
|
||||||
@@ -926,27 +926,27 @@
|
|
||||||
# for a particular target OS as the default. This makes it so that we can
|
|
||||||
# select a python interpreter with only knowledge of the target OS. And hence
|
|
||||||
# can configure different Pythons based on the target OS only.
|
|
||||||
- local toolset-requirements = [ toolset.requirements ] ;
|
|
||||||
- local toolset-target-os-requirements
|
|
||||||
- = [ property.evaluate-conditionals-in-context
|
|
||||||
- [ $(toolset-requirements).raw ] : <target-os>$(target-os) ] ;
|
|
||||||
- if ! <python> in $(toolset-target-os-requirements:G)
|
|
||||||
- {
|
|
||||||
- toolset.add-requirements <target-os>$(target-os):<python>$(version:E=default) ;
|
|
||||||
- }
|
|
||||||
+ #local toolset-requirements = [ toolset.requirements ] ;
|
|
||||||
+ #local toolset-target-os-requirements
|
|
||||||
+ # = [ property.evaluate-conditionals-in-context
|
|
||||||
+ # [ $(toolset-requirements).raw ] : <target-os>$(target-os) ] ;
|
|
||||||
+ #if ! <python> in $(toolset-target-os-requirements:G)
|
|
||||||
+ #{
|
|
||||||
+ # toolset.add-requirements <target-os>$(target-os):<python>$(version:E=default) ;
|
|
||||||
+ #}
|
|
||||||
|
|
||||||
# We also set a default requirement that assigns the first python configured
|
|
||||||
# for a particular target OS as the default. This makes it so that we can
|
|
||||||
# select a python interpreter with only knowledge of the target OS. And hence
|
|
||||||
# can configure different Pythons based on the target OS only.
|
|
||||||
- local toolset-requirements = [ toolset.requirements ] ;
|
|
||||||
- local toolset-target-os-requirements
|
|
||||||
- = [ property.evaluate-conditionals-in-context
|
|
||||||
- [ $(toolset-requirements).raw ] : <target-os>$(target-os) ] ;
|
|
||||||
- if ! <python> in $(toolset-target-os-requirements:G)
|
|
||||||
- {
|
|
||||||
- toolset.add-requirements <target-os>$(target-os):<python>$(version:E=default) ;
|
|
||||||
- }
|
|
||||||
+ #local toolset-requirements = [ toolset.requirements ] ;
|
|
||||||
+ #local toolset-target-os-requirements
|
|
||||||
+ # = [ property.evaluate-conditionals-in-context
|
|
||||||
+ # [ $(toolset-requirements).raw ] : <target-os>$(target-os) ] ;
|
|
||||||
+ #if ! <python> in $(toolset-target-os-requirements:G)
|
|
||||||
+ #{
|
|
||||||
+ # toolset.add-requirements <target-os>$(target-os):<python>$(version:E=default) ;
|
|
||||||
+ #}
|
|
||||||
|
|
||||||
# Register the right suffix for extensions.
|
|
||||||
register-extension-suffix $(extension-suffix) : $(target-requirements) ;
|
|
292
boost.spec
292
boost.spec
|
@ -35,7 +35,7 @@ Name: boost
|
||||||
Summary: The free peer-reviewed portable C++ source libraries
|
Summary: The free peer-reviewed portable C++ source libraries
|
||||||
Version: 1.63.0
|
Version: 1.63.0
|
||||||
%global version_enc 1_63_0
|
%global version_enc 1_63_0
|
||||||
Release: 8%{?dist}
|
Release: 9%{?dist}
|
||||||
License: Boost and MIT and Python
|
License: Boost and MIT and Python
|
||||||
|
|
||||||
%global toplev_dirname %{name}_%{version_enc}
|
%global toplev_dirname %{name}_%{version_enc}
|
||||||
|
@ -70,6 +70,7 @@ Requires: boost-iostreams%{?_isa} = %{version}-%{release}
|
||||||
Requires: boost-locale%{?_isa} = %{version}-%{release}
|
Requires: boost-locale%{?_isa} = %{version}-%{release}
|
||||||
Requires: boost-log%{?_isa} = %{version}-%{release}
|
Requires: boost-log%{?_isa} = %{version}-%{release}
|
||||||
Requires: boost-math%{?_isa} = %{version}-%{release}
|
Requires: boost-math%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: boost-numpy%{?_isa} = %{version}-%{release}
|
||||||
Requires: boost-program-options%{?_isa} = %{version}-%{release}
|
Requires: boost-program-options%{?_isa} = %{version}-%{release}
|
||||||
Requires: boost-python%{?_isa} = %{version}-%{release}
|
Requires: boost-python%{?_isa} = %{version}-%{release}
|
||||||
Requires: boost-random%{?_isa} = %{version}-%{release}
|
Requires: boost-random%{?_isa} = %{version}-%{release}
|
||||||
|
@ -88,8 +89,10 @@ BuildRequires: libstdc++-devel
|
||||||
BuildRequires: bzip2-devel
|
BuildRequires: bzip2-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
|
BuildRequires: python2-numpy
|
||||||
%if %{with python3}
|
%if %{with python3}
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-numpy
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: libicu-devel
|
BuildRequires: libicu-devel
|
||||||
%if %{with quadmath}
|
%if %{with quadmath}
|
||||||
|
@ -127,8 +130,8 @@ Patch68: boost-1.58.0-address-model.patch
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1318383
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1318383
|
||||||
Patch82: boost-1.60.0-no-rpath.patch
|
Patch82: boost-1.60.0-no-rpath.patch
|
||||||
|
|
||||||
# https://github.com/boostorg/build/issues/163
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1451982
|
||||||
Patch83: boost-1.63.0-dual-python-build.patch
|
Patch83: boost-1.63.0-dual-python-build-v2.patch
|
||||||
|
|
||||||
%bcond_with tests
|
%bcond_with tests
|
||||||
%bcond_with docs_generated
|
%bcond_with docs_generated
|
||||||
|
@ -280,6 +283,38 @@ Requires: libquadmath%{?_isa}
|
||||||
Run-time support for C99 and C++ TR1 C-style Functions from the math
|
Run-time support for C99 and C++ TR1 C-style Functions from the math
|
||||||
portion of Boost.TR1.
|
portion of Boost.TR1.
|
||||||
|
|
||||||
|
%package numpy
|
||||||
|
Summary: Run-time component of boost python numpy extension
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
Requires: boost-python%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: python2-numpy
|
||||||
|
|
||||||
|
%description numpy
|
||||||
|
|
||||||
|
The Boost Python Library is a framework for interfacing Python and
|
||||||
|
C++. It allows you to quickly and seamlessly expose C++ classes,
|
||||||
|
functions and objects to Python, and vice versa, using no special
|
||||||
|
tools -- just your C++ compiler. This package contains run-time
|
||||||
|
support for the NumPy extension of the Boost Python Library.
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
|
||||||
|
%package numpy3
|
||||||
|
Summary: Run-time component of boost numpy library for Python 3
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
Requires: boost-python3%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: python3-numpy
|
||||||
|
|
||||||
|
%description numpy3
|
||||||
|
|
||||||
|
The Boost Python Library is a framework for interfacing Python and
|
||||||
|
C++. It allows you to quickly and seamlessly expose C++ classes,
|
||||||
|
functions and objects to Python, and vice versa, using no special
|
||||||
|
tools -- just your C++ compiler. This package contains run-time
|
||||||
|
support for the NumPy extension of the Boost Python Library for Python 3.
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
%package program-options
|
%package program-options
|
||||||
Summary: Run-time component of boost program_options library
|
Summary: Run-time component of boost program_options library
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
|
@ -319,6 +354,7 @@ support for Boost Python Library compiled for Python 3.
|
||||||
%package python3-devel
|
%package python3-devel
|
||||||
Summary: Shared object symbolic links for Boost.Python 3
|
Summary: Shared object symbolic links for Boost.Python 3
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
|
Requires: boost-numpy3%{?_isa} = %{version}-%{release}
|
||||||
Requires: boost-python3%{?_isa} = %{version}-%{release}
|
Requires: boost-python3%{?_isa} = %{version}-%{release}
|
||||||
Requires: boost-devel%{?_isa} = %{version}-%{release}
|
Requires: boost-devel%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
@ -520,12 +556,43 @@ Group: System Environment/Libraries
|
||||||
Requires: boost-openmpi%{?_isa} = %{version}-%{release}
|
Requires: boost-openmpi%{?_isa} = %{version}-%{release}
|
||||||
Requires: boost-python%{?_isa} = %{version}-%{release}
|
Requires: boost-python%{?_isa} = %{version}-%{release}
|
||||||
Requires: boost-serialization%{?_isa} = %{version}-%{release}
|
Requires: boost-serialization%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: python2-openmpi%{?_isa}
|
||||||
|
|
||||||
%description openmpi-python
|
%description openmpi-python
|
||||||
|
|
||||||
Python support for Boost.MPI-OpenMPI, a library providing a clean C++
|
Python support for Boost.MPI-OpenMPI, a library providing a clean C++
|
||||||
API over the OpenMPI implementation of MPI.
|
API over the OpenMPI implementation of MPI.
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
|
||||||
|
%package openmpi-python3
|
||||||
|
Summary: Python 3 run-time component of Boost.MPI library
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
Requires: boost-openmpi%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: boost-python3%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: boost-serialization%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: python3-openmpi%{?_isa}
|
||||||
|
|
||||||
|
%description openmpi-python3
|
||||||
|
|
||||||
|
Python 3 support for Boost.MPI-OpenMPI, a library providing a clean C++
|
||||||
|
API over the OpenMPI implementation of MPI.
|
||||||
|
|
||||||
|
%package openmpi-python3-devel
|
||||||
|
Summary: Shared library symbolic links for Boost.MPI Python 3 component
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
Requires: boost-devel%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: boost-python3-devel%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: boost-openmpi-devel%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: boost-openmpi-python3%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description openmpi-python3-devel
|
||||||
|
|
||||||
|
Devel package for the Python 3 interface of Boost.MPI-OpenMPI, a library
|
||||||
|
providing a clean C++ API over the OpenMPI implementation of MPI.
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
%package graph-openmpi
|
%package graph-openmpi
|
||||||
Summary: Run-time component of parallel boost graph library
|
Summary: Run-time component of parallel boost graph library
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
|
@ -580,12 +647,43 @@ Requires: boost-python%{?_isa} = %{version}-%{release}
|
||||||
Requires: boost-serialization%{?_isa} = %{version}-%{release}
|
Requires: boost-serialization%{?_isa} = %{version}-%{release}
|
||||||
Provides: boost-mpich2-python = %{version}-%{release}
|
Provides: boost-mpich2-python = %{version}-%{release}
|
||||||
Obsoletes: boost-mpich2-python < 1.53.0-9
|
Obsoletes: boost-mpich2-python < 1.53.0-9
|
||||||
|
Requires: python2-mpich%{?_isa}
|
||||||
|
|
||||||
%description mpich-python
|
%description mpich-python
|
||||||
|
|
||||||
Python support for Boost.MPI-MPICH, a library providing a clean C++
|
Python support for Boost.MPI-MPICH, a library providing a clean C++
|
||||||
API over the MPICH implementation of MPI.
|
API over the MPICH implementation of MPI.
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
|
||||||
|
%package mpich-python3
|
||||||
|
Summary: Python 3 run-time component of Boost.MPI library
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
Requires: boost-mpich%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: boost-python3%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: boost-serialization%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: python3-mpich%{?_isa}
|
||||||
|
|
||||||
|
%description mpich-python3
|
||||||
|
|
||||||
|
Python 3 support for Boost.MPI-MPICH, a library providing a clean C++
|
||||||
|
API over the MPICH implementation of MPI.
|
||||||
|
|
||||||
|
%package mpich-python3-devel
|
||||||
|
Summary: Shared library symbolic links for Boost.MPI Python 3 component
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
Requires: boost-devel%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: boost-python3-devel%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: boost-mpich-devel%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: boost-mpich-python3%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description mpich-python3-devel
|
||||||
|
|
||||||
|
Devel package for the Python 3 interface of Boost.MPI-MPICH, a library
|
||||||
|
providing a clean C++ API over the MPICH implementation of MPI.
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
%package graph-mpich
|
%package graph-mpich
|
||||||
Summary: Run-time component of parallel boost graph library
|
Summary: Run-time component of parallel boost graph library
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
|
@ -679,10 +777,7 @@ using gcc : : : <compileflags>$(RPM_OPT_FLAGS) ;
|
||||||
%if %{with openmpi} || %{with mpich}
|
%if %{with openmpi} || %{with mpich}
|
||||||
using mpi ;
|
using mpi ;
|
||||||
%endif
|
%endif
|
||||||
%if %{with python3}
|
|
||||||
using python : %{python2_version} : /usr/bin/python2 : /usr/include/python%{python2_version} : : : : ;
|
using python : %{python2_version} : /usr/bin/python2 : /usr/include/python%{python2_version} : : : : ;
|
||||||
using python : %{python3_version} : /usr/bin/python3 : /usr/include/python%{python3_version}%{python3_abiflags} : : : : %{python3_abiflags} ;
|
|
||||||
%endif
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
./bootstrap.sh --with-toolset=gcc --with-icu
|
./bootstrap.sh --with-toolset=gcc --with-icu
|
||||||
|
@ -691,13 +786,6 @@ EOF
|
||||||
# library in particular) end up being built second time during
|
# library in particular) end up being built second time during
|
||||||
# installation. Unsure why that is, but all sub-builds need to be
|
# installation. Unsure why that is, but all sub-builds need to be
|
||||||
# built with pch=off to avoid this.
|
# built with pch=off to avoid this.
|
||||||
#
|
|
||||||
# The "python=2.*" bit tells jam that we want to _also_ build 2.*, not
|
|
||||||
# just 3.*. When omitted, it just builds for python 3 twice, once
|
|
||||||
# calling the library libboost_python and once libboost_python3. I
|
|
||||||
# assume this is for backward compatibility for apps that are used to
|
|
||||||
# linking against -lboost_python, for when 2->3 transition is
|
|
||||||
# eventually done.
|
|
||||||
|
|
||||||
echo ============================= build serial ==================
|
echo ============================= build serial ==================
|
||||||
./b2 -d+2 -q %{?_smp_mflags} \
|
./b2 -d+2 -q %{?_smp_mflags} \
|
||||||
|
@ -720,6 +808,33 @@ fi
|
||||||
m4 -${DEF}HAS_ATOMIC_FLAG_LOCKFREE -DVERSION=%{version} \
|
m4 -${DEF}HAS_ATOMIC_FLAG_LOCKFREE -DVERSION=%{version} \
|
||||||
%{SOURCE2} > $(basename %{SOURCE2})
|
%{SOURCE2} > $(basename %{SOURCE2})
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
|
||||||
|
# Previously, we built python 2.x and 3.x interfaces simultaneously.
|
||||||
|
# However, this doesn't work once trying to build other Python components
|
||||||
|
# such as libboost_numpy. Therefore, we build for each separately, while
|
||||||
|
# minimizing duplicate compilation as much as possible.
|
||||||
|
|
||||||
|
cat > python3-config.jam << "EOF"
|
||||||
|
import os ;
|
||||||
|
local RPM_OPT_FLAGS = [ os.environ RPM_OPT_FLAGS ] ;
|
||||||
|
|
||||||
|
using gcc : : : <compileflags>$(RPM_OPT_FLAGS) ;
|
||||||
|
%if %{with openmpi} || %{with mpich}
|
||||||
|
using mpi ;
|
||||||
|
%endif
|
||||||
|
using python : %{python3_version} : /usr/bin/python3 : /usr/include/python%{python3_version}%{python3_abiflags} : : : : %{python3_abiflags} ;
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo ============================= build serial-py3 ==================
|
||||||
|
./b2 -d+2 -q %{?_smp_mflags} \
|
||||||
|
--user-config=./python3-config.jam \
|
||||||
|
--with-python --build-dir=serial-py3 \
|
||||||
|
variant=release threading=multi debug-symbols=on pch=off \
|
||||||
|
python=%{python3_version} stage
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
# Build MPI parts of Boost with OpenMPI support
|
# Build MPI parts of Boost with OpenMPI support
|
||||||
|
|
||||||
%if %{with openmpi} || %{with mpich}
|
%if %{with openmpi} || %{with mpich}
|
||||||
|
@ -728,9 +843,6 @@ m4 -${DEF}HAS_ATOMIC_FLAG_LOCKFREE -DVERSION=%{version} \
|
||||||
module purge ||:
|
module purge ||:
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# N.B. python=2.* here behaves differently: it exactly selects a
|
|
||||||
# version that we want to build against. Boost MPI is not portable to
|
|
||||||
# Python 3 due to API changes in Python, so this suits us.
|
|
||||||
%if %{with openmpi}
|
%if %{with openmpi}
|
||||||
%{_openmpi_load}
|
%{_openmpi_load}
|
||||||
echo ============================= build $MPI_COMPILER ==================
|
echo ============================= build $MPI_COMPILER ==================
|
||||||
|
@ -738,6 +850,16 @@ echo ============================= build $MPI_COMPILER ==================
|
||||||
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
|
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
|
||||||
variant=release threading=multi debug-symbols=on pch=off \
|
variant=release threading=multi debug-symbols=on pch=off \
|
||||||
python=%{python2_version} stage
|
python=%{python2_version} stage
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
echo ============================= build $MPI_COMPILER-py3 ==================
|
||||||
|
./b2 -d+2 -q %{?_smp_mflags} \
|
||||||
|
--user-config=./python3-config.jam \
|
||||||
|
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER-py3 \
|
||||||
|
variant=release threading=multi debug-symbols=on pch=off \
|
||||||
|
python=%{python3_version} stage
|
||||||
|
%endif
|
||||||
|
|
||||||
%{_openmpi_unload}
|
%{_openmpi_unload}
|
||||||
export PATH=/bin${PATH:+:}$PATH
|
export PATH=/bin${PATH:+:}$PATH
|
||||||
%endif
|
%endif
|
||||||
|
@ -750,6 +872,16 @@ echo ============================= build $MPI_COMPILER ==================
|
||||||
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
|
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER \
|
||||||
variant=release threading=multi debug-symbols=on pch=off \
|
variant=release threading=multi debug-symbols=on pch=off \
|
||||||
python=%{python2_version} stage
|
python=%{python2_version} stage
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
echo ============================= build $MPI_COMPILER-py3 ==================
|
||||||
|
./b2 -d+2 -q %{?_smp_mflags} \
|
||||||
|
--user-config=./python3-config.jam \
|
||||||
|
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER-py3 \
|
||||||
|
variant=release threading=multi debug-symbols=on pch=off \
|
||||||
|
python=%{python3_version} stage
|
||||||
|
%endif
|
||||||
|
|
||||||
%{_mpich_unload}
|
%{_mpich_unload}
|
||||||
export PATH=/bin${PATH:+:}$PATH
|
export PATH=/bin${PATH:+:}$PATH
|
||||||
%endif
|
%endif
|
||||||
|
@ -782,6 +914,28 @@ echo ============================= install $MPI_COMPILER ==================
|
||||||
variant=release threading=multi debug-symbols=on pch=off \
|
variant=release threading=multi debug-symbols=on pch=off \
|
||||||
python=%{python2_version} stage
|
python=%{python2_version} stage
|
||||||
|
|
||||||
|
# Move Python module to proper location for automatic loading
|
||||||
|
mkdir -p ${RPM_BUILD_ROOT}%{python2_sitearch}/openmpi/boost
|
||||||
|
touch ${RPM_BUILD_ROOT}%{python2_sitearch}/openmpi/boost/__init__.py
|
||||||
|
mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/mpi.so \
|
||||||
|
${RPM_BUILD_ROOT}%{python2_sitearch}/openmpi/boost/
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
echo ============================= install $MPI_COMPILER-py3 ==================
|
||||||
|
./b2 -q %{?_smp_mflags} \
|
||||||
|
--user-config=./python3-config.jam \
|
||||||
|
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER-py3 \
|
||||||
|
--stagedir=${RPM_BUILD_ROOT}${MPI_HOME} \
|
||||||
|
variant=release threading=multi debug-symbols=on pch=off \
|
||||||
|
python=%{python3_version} stage
|
||||||
|
|
||||||
|
# Move Python module to proper location for automatic loading
|
||||||
|
mkdir -p ${RPM_BUILD_ROOT}%{python3_sitearch}/openmpi/boost
|
||||||
|
touch ${RPM_BUILD_ROOT}%{python3_sitearch}/openmpi/boost/__init__.py
|
||||||
|
mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/mpi.so \
|
||||||
|
${RPM_BUILD_ROOT}%{python3_sitearch}/openmpi/boost/
|
||||||
|
%endif
|
||||||
|
|
||||||
# Remove generic parts of boost that were built for dependencies.
|
# Remove generic parts of boost that were built for dependencies.
|
||||||
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}*
|
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}*
|
||||||
|
|
||||||
|
@ -798,6 +952,28 @@ echo ============================= install $MPI_COMPILER ==================
|
||||||
variant=release threading=multi debug-symbols=on pch=off \
|
variant=release threading=multi debug-symbols=on pch=off \
|
||||||
python=%{python2_version} stage
|
python=%{python2_version} stage
|
||||||
|
|
||||||
|
# Move Python module to proper location for automatic loading
|
||||||
|
mkdir -p ${RPM_BUILD_ROOT}%{python2_sitearch}/mpich/boost
|
||||||
|
touch ${RPM_BUILD_ROOT}%{python2_sitearch}/mpich/boost/__init__.py
|
||||||
|
mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/mpi.so \
|
||||||
|
${RPM_BUILD_ROOT}%{python2_sitearch}/mpich/boost/
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
echo ============================= install $MPI_COMPILER-py3 ==================
|
||||||
|
./b2 -q %{?_smp_mflags} \
|
||||||
|
--user-config=./python3-config.jam \
|
||||||
|
--with-mpi --with-graph_parallel --build-dir=$MPI_COMPILER-py3 \
|
||||||
|
--stagedir=${RPM_BUILD_ROOT}${MPI_HOME} \
|
||||||
|
variant=release threading=multi debug-symbols=on pch=off \
|
||||||
|
python=%{python3_version} stage
|
||||||
|
|
||||||
|
# Move Python module to proper location for automatic loading
|
||||||
|
mkdir -p ${RPM_BUILD_ROOT}%{python3_sitearch}/mpich/boost
|
||||||
|
touch ${RPM_BUILD_ROOT}%{python3_sitearch}/mpich/boost/__init__.py
|
||||||
|
mv ${RPM_BUILD_ROOT}${MPI_HOME}/lib/mpi.so \
|
||||||
|
${RPM_BUILD_ROOT}%{python3_sitearch}/mpich/boost/
|
||||||
|
%endif
|
||||||
|
|
||||||
# Remove generic parts of boost that were built for dependencies.
|
# Remove generic parts of boost that were built for dependencies.
|
||||||
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}*
|
rm -f ${RPM_BUILD_ROOT}${MPI_HOME}/lib/libboost_{python,{w,}serialization}*
|
||||||
|
|
||||||
|
@ -823,6 +999,18 @@ echo ============================= install serial ==================
|
||||||
rm -f $RPM_BUILD_ROOT%{_libdir}/libboost_thread.so
|
rm -f $RPM_BUILD_ROOT%{_libdir}/libboost_thread.so
|
||||||
install -p -m 644 $(basename %{SOURCE2}) $RPM_BUILD_ROOT%{_libdir}/
|
install -p -m 644 $(basename %{SOURCE2}) $RPM_BUILD_ROOT%{_libdir}/
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
echo ============================= install serial-py3 ==================
|
||||||
|
./b2 -d+2 -q %{?_smp_mflags} \
|
||||||
|
--user-config=python3-config.jam \
|
||||||
|
--with-python --build-dir=serial-py3 \
|
||||||
|
--prefix=$RPM_BUILD_ROOT%{_prefix} \
|
||||||
|
--libdir=$RPM_BUILD_ROOT%{_libdir} \
|
||||||
|
variant=release threading=multi debug-symbols=on pch=off \
|
||||||
|
python=%{python3_version} install
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
echo ============================= install Boost.Build ==================
|
echo ============================= install Boost.Build ==================
|
||||||
(cd tools/build
|
(cd tools/build
|
||||||
./b2 --prefix=$RPM_BUILD_ROOT%{_prefix} install
|
./b2 --prefix=$RPM_BUILD_ROOT%{_prefix} install
|
||||||
|
@ -974,6 +1162,16 @@ rm -f tmp-doc-directories
|
||||||
|
|
||||||
%postun math -p /sbin/ldconfig
|
%postun math -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%post numpy -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun numpy -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
%post numpy3 -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun numpy3 -p /sbin/ldconfig
|
||||||
|
%endif
|
||||||
|
|
||||||
%post program-options -p /sbin/ldconfig
|
%post program-options -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun program-options -p /sbin/ldconfig
|
%postun program-options -p /sbin/ldconfig
|
||||||
|
@ -982,6 +1180,12 @@ rm -f tmp-doc-directories
|
||||||
|
|
||||||
%postun python -p /sbin/ldconfig
|
%postun python -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
%post python3 -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun python3 -p /sbin/ldconfig
|
||||||
|
%endif
|
||||||
|
|
||||||
%post random -p /sbin/ldconfig
|
%post random -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun random -p /sbin/ldconfig
|
%postun random -p /sbin/ldconfig
|
||||||
|
@ -1115,6 +1319,16 @@ fi
|
||||||
%{_libdir}/libboost_math_tr1f.so.%{sonamever}
|
%{_libdir}/libboost_math_tr1f.so.%{sonamever}
|
||||||
%{_libdir}/libboost_math_tr1l.so.%{sonamever}
|
%{_libdir}/libboost_math_tr1l.so.%{sonamever}
|
||||||
|
|
||||||
|
%files numpy
|
||||||
|
%license LICENSE_1_0.txt
|
||||||
|
%{_libdir}/libboost_numpy.so.%{sonamever}
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
%files numpy3
|
||||||
|
%license LICENSE_1_0.txt
|
||||||
|
%{_libdir}/libboost_numpy3.so.%{sonamever}
|
||||||
|
%endif
|
||||||
|
|
||||||
%files test
|
%files test
|
||||||
%license LICENSE_1_0.txt
|
%license LICENSE_1_0.txt
|
||||||
%{_libdir}/libboost_prg_exec_monitor.so.%{sonamever}
|
%{_libdir}/libboost_prg_exec_monitor.so.%{sonamever}
|
||||||
|
@ -1135,6 +1349,7 @@ fi
|
||||||
|
|
||||||
%files python3-devel
|
%files python3-devel
|
||||||
%license LICENSE_1_0.txt
|
%license LICENSE_1_0.txt
|
||||||
|
%{_libdir}/libboost_numpy3.so
|
||||||
%{_libdir}/libboost_python3.so
|
%{_libdir}/libboost_python3.so
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
@ -1207,6 +1422,7 @@ fi
|
||||||
%{_libdir}/libboost_math_c99.so
|
%{_libdir}/libboost_math_c99.so
|
||||||
%{_libdir}/libboost_math_c99f.so
|
%{_libdir}/libboost_math_c99f.so
|
||||||
%{_libdir}/libboost_math_c99l.so
|
%{_libdir}/libboost_math_c99l.so
|
||||||
|
%{_libdir}/libboost_numpy.so
|
||||||
%{_libdir}/libboost_prg_exec_monitor.so
|
%{_libdir}/libboost_prg_exec_monitor.so
|
||||||
%{_libdir}/libboost_unit_test_framework.so
|
%{_libdir}/libboost_unit_test_framework.so
|
||||||
%{_libdir}/libboost_program_options.so
|
%{_libdir}/libboost_program_options.so
|
||||||
|
@ -1241,12 +1457,27 @@ fi
|
||||||
|
|
||||||
%files openmpi-devel
|
%files openmpi-devel
|
||||||
%license LICENSE_1_0.txt
|
%license LICENSE_1_0.txt
|
||||||
%{_libdir}/openmpi/lib/libboost_*.so
|
%{_libdir}/openmpi/lib/libboost_mpi.so
|
||||||
|
%{_libdir}/openmpi/lib/libboost_mpi_python.so
|
||||||
|
%{_libdir}/openmpi/lib/libboost_graph_parallel.so
|
||||||
|
|
||||||
%files openmpi-python
|
%files openmpi-python
|
||||||
%license LICENSE_1_0.txt
|
%license LICENSE_1_0.txt
|
||||||
%{_libdir}/openmpi/lib/libboost_mpi_python.so.%{sonamever}
|
%{_libdir}/openmpi/lib/libboost_mpi_python.so.%{sonamever}
|
||||||
%{_libdir}/openmpi/lib/mpi.so
|
%{python2_sitearch}/openmpi/boost/
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
|
||||||
|
%files openmpi-python3
|
||||||
|
%license LICENSE_1_0.txt
|
||||||
|
%{_libdir}/openmpi/lib/libboost_mpi_python3.so.%{sonamever}
|
||||||
|
%{python3_sitearch}/openmpi/boost/
|
||||||
|
|
||||||
|
%files openmpi-python3-devel
|
||||||
|
%license LICENSE_1_0.txt
|
||||||
|
%{_libdir}/openmpi/lib/libboost_mpi_python3.so
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
%files graph-openmpi
|
%files graph-openmpi
|
||||||
%license LICENSE_1_0.txt
|
%license LICENSE_1_0.txt
|
||||||
|
@ -1263,12 +1494,27 @@ fi
|
||||||
|
|
||||||
%files mpich-devel
|
%files mpich-devel
|
||||||
%license LICENSE_1_0.txt
|
%license LICENSE_1_0.txt
|
||||||
%{_libdir}/mpich/lib/libboost_*.so
|
%{_libdir}/mpich/lib/libboost_mpi.so
|
||||||
|
%{_libdir}/mpich/lib/libboost_mpi_python.so
|
||||||
|
%{_libdir}/mpich/lib/libboost_graph_parallel.so
|
||||||
|
|
||||||
%files mpich-python
|
%files mpich-python
|
||||||
%license LICENSE_1_0.txt
|
%license LICENSE_1_0.txt
|
||||||
%{_libdir}/mpich/lib/libboost_mpi_python.so.%{sonamever}
|
%{_libdir}/mpich/lib/libboost_mpi_python.so.%{sonamever}
|
||||||
%{_libdir}/mpich/lib/mpi.so
|
%{python2_sitearch}/mpich/boost/
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
|
|
||||||
|
%files mpich-python3
|
||||||
|
%license LICENSE_1_0.txt
|
||||||
|
%{_libdir}/mpich/lib/libboost_mpi_python3.so.%{sonamever}
|
||||||
|
%{python3_sitearch}/mpich/boost/
|
||||||
|
|
||||||
|
%files mpich-python3-devel
|
||||||
|
%license LICENSE_1_0.txt
|
||||||
|
%{_libdir}/mpich/lib/libboost_mpi_python3.so
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
%files graph-mpich
|
%files graph-mpich
|
||||||
%license LICENSE_1_0.txt
|
%license LICENSE_1_0.txt
|
||||||
|
@ -1291,6 +1537,12 @@ fi
|
||||||
%{_mandir}/man1/bjam.1*
|
%{_mandir}/man1/bjam.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jul 01 2017 Yaakov Selkowitz <yselkowi@redhat.com> - 1.63.0-9
|
||||||
|
- Add numpy and numpy3 packages (#1451982)
|
||||||
|
- Fix location of openmpi-python and mpich-python modules
|
||||||
|
- Add openmpi-python3 and mpich-python3 packages
|
||||||
|
- Add missing ldconfig post/postun for python3 package
|
||||||
|
|
||||||
* Sat Jul 01 2017 Jonathan Wakely <jwakely@redhat.com> - 1.63.0-8
|
* Sat Jul 01 2017 Jonathan Wakely <jwakely@redhat.com> - 1.63.0-8
|
||||||
- Remove patch for boost::function strict aliasing problem (#1422456)
|
- Remove patch for boost::function strict aliasing problem (#1422456)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue