Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyopencl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Klöckner
pyopencl
Commits
a12b3361
Commit
a12b3361
authored
14 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of tuck.ath.cx:src/pyopencl
parents
26640c90
dde1e34c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitmodules
+3
-0
3 additions, 0 deletions
.gitmodules
MANIFEST.in
+2
-0
2 additions, 0 deletions
MANIFEST.in
aksetup_helper.py
+42
-0
42 additions, 0 deletions
aksetup_helper.py
bpl-subset
+1
-0
1 addition, 0 deletions
bpl-subset
setup.py
+6
-4
6 additions, 4 deletions
setup.py
with
54 additions
and
4 deletions
.gitmodules
0 → 100644
+
3
−
0
View file @
a12b3361
[submodule "bpl-subset"]
path = bpl-subset
url = http://git.tiker.net/trees/bpl-subset.git
This diff is collapsed.
Click to expand it.
MANIFEST.in
+
2
−
0
View file @
a12b3361
...
...
@@ -12,3 +12,5 @@ include configure.py
include Makefile.in
include aksetup_helper.py
include README_SETUP.txt
recursive-include bpl-subset
This diff is collapsed.
Click to expand it.
aksetup_helper.py
+
42
−
0
View file @
a12b3361
...
...
@@ -479,6 +479,48 @@ class BoostLibraries(Libraries):
help
=
"
Library names for Boost C++ %s library (without lib or .so)
"
%
humanize
(
lib_base_name
))
def
set_up_shipped_boost_if_requested
(
conf
):
"""
Set up the package to use a shipped version of Boost.
Return a list of extra C files to build.
"""
if
conf
[
"
USE_SHIPPED_BOOST
"
]:
from
os.path
import
exists
if
not
exists
(
"
bpl-subset/bpl_subset/boost/version.hpp
"
):
raise
RuntimeError
(
"
The shipped Boost library was not found.
"
)
conf
[
"
BOOST_INC_DIR
"
]
=
[
"
bpl-subset/bpl_subset
"
]
conf
[
"
BOOST_LIB_DIR
"
]
=
[]
conf
[
"
BOOST_PYTHON_LIBNAME
"
]
=
[]
from
glob
import
glob
source_files
=
(
glob
(
"
bpl-subset/bpl_subset/libs/*/*/*/*.cpp
"
)
+
glob
(
"
bpl-subset/bpl_subset/libs/*/*/*.cpp
"
)
+
glob
(
"
bpl-subset/bpl_subset/libs/*/*.cpp
"
))
print
len
(
source_files
)
source_files
=
[
f
for
f
in
source_files
if
not
f
.
startswith
(
"
bpl-subset/bpl_subset/libs/thread/src
"
)]
print
len
(
source_files
)
import
sys
if
sys
.
platform
==
"
nt
"
:
print
glob
(
"
bpl-subset/bpl_subset/libs/thread/src/win32/*.cpp
"
)
source_files
+=
glob
(
"
bpl-subset/bpl_subset/libs/thread/src/win32/*.cpp
"
)
else
:
print
glob
(
"
bpl-subset/bpl_subset/libs/thread/src/pthread/*.cpp
"
)
source_files
+=
glob
(
"
bpl-subset/bpl_subset/libs/thread/src/pthread/*.cpp
"
)
return
(
source_files
,
{
"
BOOST_MULTI_INDEX_DISABLE_SERIALIZATION
"
:
1
}
)
else
:
return
[],
{}
def
make_boost_base_options
():
return
[
IncludeDir
(
"
BOOST
"
,
[]),
...
...
This diff is collapsed.
Click to expand it.
bpl-subset
@
eb21ae67
Subproject commit eb21ae675a7e5d9b7ca19303ce1bd2bf95444118
This diff is collapsed.
Click to expand it.
setup.py
+
6
−
4
View file @
a12b3361
...
...
@@ -22,6 +22,8 @@ def get_config_schema():
return
ConfigSchema
(
make_boost_base_options
()
+
[
BoostLibraries
(
"
python
"
),
Switch
(
"
USE_SHIPPED_BOOST
"
,
True
,
"
Use included Boost library
"
),
Switch
(
"
CL_TRACE
"
,
False
,
"
Enable OpenCL API tracing
"
),
Switch
(
"
CL_ENABLE_GL
"
,
False
,
"
Enable OpenCL<->OpenGL interoperability
"
),
...
...
@@ -40,18 +42,18 @@ def get_config_schema():
def
main
():
import
glob
from
aksetup_helper
import
hack_distutils
,
get_config
,
setup
,
\
NumpyExtension
from
aksetup_helper
import
(
hack_distutils
,
get_config
,
setup
,
NumpyExtension
,
set_up_shipped_boost_if_requested
)
hack_distutils
()
conf
=
get_config
(
get_config_schema
())
EXTRA_OBJECTS
,
EXTRA_DEFINES
=
set_up_shipped_boost_if_requested
(
conf
)
LIBRARY_DIRS
=
conf
[
"
BOOST_LIB_DIR
"
]
LIBRARIES
=
conf
[
"
BOOST_PYTHON_LIBNAME
"
]
from
os.path
import
dirname
,
join
,
normpath
EXTRA_DEFINES
=
{
}
EXTRA_INCLUDE_DIRS
=
[]
EXTRA_LIBRARY_DIRS
=
[]
EXTRA_LIBRARIES
=
[]
...
...
@@ -137,7 +139,7 @@ def main():
NumpyExtension
(
"
_cl
"
,
[
"
src/wrapper/wrap_cl.cpp
"
,
],
]
+
EXTRA_OBJECTS
,
include_dirs
=
INCLUDE_DIRS
+
EXTRA_INCLUDE_DIRS
,
library_dirs
=
LIBRARY_DIRS
+
conf
[
"
CL_LIB_DIR
"
],
libraries
=
LIBRARIES
+
conf
[
"
CL_LIBNAME
"
],
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment