Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
22e00c42
Commit
22e00c42
authored
May 06, 2003
by
Skip Montanaro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build bsddb185 module in certain restricted circumstances
parent
8c044d8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
setup.py
setup.py
+28
-0
No files found.
setup.py
View file @
22e00c42
...
...
@@ -287,6 +287,11 @@ class PyBuildExt(build_ext):
inc_dirs
+=
[
'/system/include'
,
'/atheos/autolnk/include'
]
inc_dirs
+=
os
.
getenv
(
'C_INCLUDE_PATH'
,
''
).
split
(
os
.
pathsep
)
# OSF/1 has some stuff in /usr/ccs/lib (like -ldb)
if
platform
[:
4
]
==
'osf1'
:
platform
=
'osf1'
lib_dirs
+=
[
'/usr/ccs/lib'
]
# Check for MacOS X, which doesn't need libm.a at all
math_libs
=
[
'm'
]
if
platform
in
[
'darwin'
,
'beos'
,
'mac'
]:
...
...
@@ -560,6 +565,29 @@ class PyBuildExt(build_ext):
dblibs
=
[]
dblib_dir
=
None
# Look for Berkeley db 1.85. Note that it is built as a different
# module name so it can be included even when later versions are
# available. A very restrictive search is performed to avoid
# accidentally building this module with a later version of the
# underlying db library. May BSD-ish Unixes incorporate db 1.85
# symbols into libc and place the include file in /usr/include.
f
=
"/usr/include/db.h"
if
os
.
path
.
exists
(
f
):
data
=
open
(
f
).
read
()
m
=
re
.
search
(
r"#s*define\
s+HASHVERSION
\s+2\
s*
", data)
if m is not None:
# bingo - old version used hash file format version 2
### XXX this should be fixed to not be platform-dependent
### but I don't have direct access to an osf1 platform and
### seemed to be muffing the search somehow
libraries = platform == "
osf1
" and ['db'] or None
if libraries is not None:
exts.append(Extension('bsddb185', ['bsddbmodule.c'],
libraries=libraries))
else:
exts.append(Extension('bsddb185', ['bsddbmodule.c']))
# The standard Unix dbm module:
if platform not in ['cygwin']:
if find_file("
ndbm
.
h
", inc_dirs, []) is not None:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment