File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,14 +138,49 @@ rule lib_boost_python ( is-py3 ? )
138138 <link>static:<define>BOOST_PYTHON_STATIC_LIB
139139 <python-debugging>on:<define>BOOST_DEBUG_PYTHON
140140 ;
141+ }
141142
143+ rule lib_boost_numpy ( is-py3 ? )
144+ {
145+ lib [ cond $(is-py3) : boost_numpy3 : boost_numpy ]
146+ : # sources
147+ numpy/dtype.cpp
148+ numpy/matrix.cpp
149+ numpy/ndarray.cpp
150+ numpy/numpy.cpp
151+ numpy/scalars.cpp
152+ numpy/ufunc.cpp
153+ : # requirements
154+ [ cond [ python.numpy ] : <library>/python//python_for_extensions ]
155+ [ unless [ python.numpy ] : <build>no ]
156+ <library>boost_python
157+ <python-debugging>on:<define>BOOST_DEBUG_PYTHON
158+ [ cond $(is-py3) : <python>$(py3-version) ]
159+ : # default build
160+ <link>shared
161+ : # usage requirements
162+ <python-debugging>on:<define>BOOST_DEBUG_PYTHON
163+ ;
142164}
143165
144166lib_boost_python ;
145- boost-install boost_python ;
146-
167+ lib_boost_numpy ;
147168if $(py3-version)
148169{
149170 lib_boost_python yes ;
150- boost-install boost_python3 ;
171+ lib_boost_numpy yes ;
172+ }
173+
174+ libraries = boost_python ;
175+ libraries3 = boost_python3 ;
176+ if [ python.numpy ]
177+ {
178+ libraries += boost_numpy ;
179+ libraries3 += boost_numpy3 ;
180+ }
181+
182+ boost-install $(libraries) ;
183+ if $(py3-version)
184+ {
185+ boost-install $(libraries3) ;
151186}
Original file line number Diff line number Diff line change 44# Distributed under the Boost Software License, Version 1.0. (See accompanying
55# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
66
7+ import boostbook ;
8+ import quickbook ;
9+ import docutils ;
10+ import os ;
11+
712path-constant here : . ;
813path-constant images : html/images ;
914
10-
1115project python/doc
1216 : requirements
1317 -<xsl:param>boost.defaults=Boost
@@ -17,9 +21,16 @@ project python/doc
1721 <format>html:<xsl:param>chunk.section.depth=1
1822 ;
1923
20- import boostbook ;
21- import quickbook ;
22- import docutils ;
24+ make numpy : numpy/index.rst : @sphinx-build ;
25+
26+ if [ os.name ] = NT
27+ {
28+ actions sphinx-build { chdir numpy && make clean && make html}
29+ }
30+ else
31+ {
32+ actions sphinx-build { make -C numpy clean html}
33+ }
2334
2435boostbook python : python.qbk
2536 : <format>html:<name>$(here)/html
@@ -51,5 +62,5 @@ html article : article.rst
5162###############################################################################
5263alias boostdoc ;
5364explicit boostdoc ;
54- alias boostrelease : python tutorial reference article ;
65+ alias boostrelease : python tutorial reference numpy article ;
5566explicit boostrelease ;
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ SPHINXOPTS =
66SPHINXBUILD = sphinx-build
77PAPER =
88BUILDDIR = _build
9+ HTMLDIR = ../numpy/html
910
1011# Internal variables.
1112PAPEROPT_a4 = -D latex_paper_size=a4
3940 -rm -rf $(BUILDDIR ) /*
4041
4142html :
42- $(SPHINXBUILD ) -b html $(ALLSPHINXOPTS ) $(BUILDDIR ) /html
43+ $(SPHINXBUILD ) -b html $(ALLSPHINXOPTS ) $(HTMLDIR )
4344 @echo
44- @echo " Build finished. The HTML pages are in $( BUILDDIR ) /html ."
45+ @echo " Build finished. The HTML pages are in $( HTMLDIR ) ."
4546
4647dirhtml :
4748 $(SPHINXBUILD ) -b dirhtml $(ALLSPHINXOPTS ) $(BUILDDIR ) /dirhtml
Original file line number Diff line number Diff line change 2727}
2828
2929.admonition-title { font-weight : bold;}
30- # table-of-contents
30+ . toctree-wrapper
3131{
3232 border : 1px solid # dcdcdc ;
3333 padding : 1em ;
3434 margin : 0 2em ;
3535}
36- # table-of-contents .caption ,
37- # table-of-contents .topic-title { font-weight : bold;}
36+ . toctree-wrapper .caption ,
37+ . toctree-wrapper .topic-title { font-weight : bold;}
3838
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ Welcome to the documentation of the Boost.Python NumPy extension!
77=================================================================
88
99.. toctree ::
10- :caption: Table of Contents
1110 :name: mastertoc
1211 :maxdepth: 2
1312
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ if "%SPHINXBUILD%" == "" (
66 set SPHINXBUILD = sphinx-build
77)
88set BUILDDIR = _build
9+ set HTMLDIR = ../html/numpy
910set ALLSPHINXOPTS = -d %BUILDDIR% /doctrees %SPHINXOPTS% .
1011if NOT " %PAPER% " == " " (
1112 set ALLSPHINXOPTS = -D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
@@ -41,10 +42,10 @@ if "%1" == "clean" (
4142)
4243
4344if " %1 " == " html" (
44- %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR% /html
45+ %SPHINXBUILD% -b html %ALLSPHINXOPTS% %HTMLDIR%
4546 if errorlevel 1 exit /b 1
4647 echo .
47- echo .Build finished. The HTML pages are in %BUILDDIR% /html .
48+ echo .Build finished. The HTML pages are in %HTMLDIR% .
4849 goto end
4950)
5051
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ Boost.Python NumPy extension Reference
22======================================
33
44.. toctree ::
5- :caption: Table of Contents
65 :name: reftoc
76 :maxdepth: 2
87
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ Boost.Python NumPy extension Tutorial
22=====================================
33
44.. toctree ::
5- :caption: Table of Contents
65 :name: tuttoc
76 :maxdepth: 2
87
Original file line number Diff line number Diff line change @@ -237,4 +237,14 @@ bpl-test crossmod_opaque
237237[ py-compile-fail ./as_to_python_function.cpp ]
238238[ py-compile-fail ./object_fail1.cpp ]
239239
240+ # --- NumPy tests ---
241+
242+ [ numpy-test numpy/dtype ]
243+ [ numpy-test numpy/ufunc ]
244+ [ numpy-test numpy/templates ]
245+ [ numpy-test numpy/ndarray ]
246+ [ numpy-test numpy/indexing ]
247+ [ numpy-test numpy/shapes ]
248+
249+
240250 ;
You can’t perform that action at this time.
0 commit comments