Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
f9040405
Commit
f9040405
authored
Aug 11, 2009
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup.py: if no libevent installation found, go ahead and pretend system-wide libevent is installed
parent
21973133
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
23 deletions
+26
-23
setup.py
setup.py
+26
-23
No files found.
setup.py
View file @
f9040405
...
...
@@ -29,32 +29,35 @@ else:
if
os
.
path
.
isdir
(
dir
):
ev_dir
=
dir
break
if
not
ev_dir
:
sys
.
exit
(
"couldn't find libevent installation or build directory"
)
if
ev_dir
:
print
'found libevent build directory'
,
ev_dir
ev_incdirs
=
[
ev_dir
,
ev_dir
+
'/compat'
]
ev_extargs
=
[]
ev_extobjs
=
[]
ev_libraries
=
[
'event'
]
print
'found libevent build directory'
,
ev_dir
ev_incdirs
=
[
ev_dir
,
ev_dir
+
'/compat'
]
ev_extargs
=
[]
ev_extobjs
=
[]
ev_libraries
=
[
'event'
]
if
sys
.
platform
==
'win32'
:
ev_incdirs
.
extend
([
'%s/WIN32-Code'
%
ev_dir
,
'%s/compat'
%
ev_dir
])
sources
.
extend
([
'%s/%s'
%
(
ev_dir
,
x
)
for
x
in
[
'WIN32-Code/misc.c'
,
'WIN32-Code/win32.c'
,
'log.c'
,
'event.c'
]])
ev_extargs
=
[
'-DWIN32'
,
'-DHAVE_CONFIG_H'
]
ev_libraries
=
[
'wsock32'
]
else
:
ev_extobjs
=
glob
.
glob
(
'%s/*.o'
%
dir
)
if
sys
.
platform
==
'win32'
:
ev_incdirs
.
extend
([
'%s/WIN32-Code'
%
ev_dir
,
'%s/compat'
%
ev_dir
])
sources
.
extend
([
'%s/%s'
%
(
ev_dir
,
x
)
for
x
in
[
'WIN32-Code/misc.c'
,
'WIN32-Code/win32.c'
,
'log.c'
,
'event.c'
]])
ev_extargs
=
[
'-DWIN32'
,
'-DHAVE_CONFIG_H'
]
ev_libraries
=
[
'wsock32'
]
libevent
=
Extension
(
name
=
name
,
sources
=
sources
,
include_dirs
=
ev_incdirs
,
extra_compile_args
=
ev_extargs
,
extra_objects
=
ev_extobjs
,
libraries
=
ev_libraries
)
else
:
ev_extobjs
=
glob
.
glob
(
'%s/*.o'
%
dir
)
libevent
=
Extension
(
name
=
name
,
sources
=
sources
,
include_dirs
=
ev_incdirs
,
extra_compile_args
=
ev_extargs
,
extra_objects
=
ev_extobjs
,
libraries
=
ev_libraries
)
sys
.
stderr
.
write
(
"
\
n
WARNING: couldn't find libevent installation or build directory: assuming system-wide libevent is installed.
\
n
\
n
"
)
libevent
=
Extension
(
name
=
name
,
sources
=
sources
,
libraries
=
[
'event'
])
version
=
re
.
search
(
"__version__
\
s*=
\
s*'(.*)'"
,
open
(
'gevent/__init__.py'
).
read
(),
re
.
M
).
group
(
1
).
strip
()
assert
version
,
version
...
...
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