4d949d7ce2
py-enet is a python wrapper for the ENet library. from james turner (MAINTAINER) with tweaks by me ok landry@
44 lines
1.3 KiB
Plaintext
44 lines
1.3 KiB
Plaintext
$OpenBSD: patch-setup_py,v 1.1.1.1 2011/06/29 10:40:26 jasper Exp $
|
|
--- setup.py.orig Tue Jun 28 16:29:47 2011
|
|
+++ setup.py Tue Jun 28 17:24:47 2011
|
|
@@ -7,36 +7,24 @@ import sys
|
|
|
|
source_files = ["enet.pyx"]
|
|
|
|
-_enet_files = glob.glob("enet/*.c")
|
|
-
|
|
-if not _enet_files:
|
|
- print("You need to download and extract the enet 1.3 source to enet/")
|
|
- print("Download the source from: http://enet.bespin.org/SourceDistro.html")
|
|
- print("See the README for more instructions")
|
|
- sys.exit(1)
|
|
-
|
|
-source_files.extend(_enet_files)
|
|
-
|
|
define_macros = [('HAS_POLL', None),
|
|
('HAS_FCNTL', None),
|
|
('HAS_MSGHDR_FLAGS', None),
|
|
('HAS_SOCKLEN_T', None) ]
|
|
|
|
-libraries = []
|
|
+libraries = ['enet']
|
|
|
|
if sys.platform == 'win32':
|
|
define_macros.extend([('WIN32', None)])
|
|
libraries.extend(['ws2_32', 'Winmm'])
|
|
|
|
-if sys.platform != 'darwin':
|
|
- define_macros.extend([('HAS_GETHOSTBYNAME_R', None), ('HAS_GETHOSTBYADDR_R', None)])
|
|
-
|
|
ext_modules = [
|
|
Extension(
|
|
"enet",
|
|
extra_compile_args=["-O3"],
|
|
sources=source_files,
|
|
- include_dirs=["enet/include/"],
|
|
+ include_dirs=["${LOCALBASE}/include"],
|
|
+ library_dirs=["${LOCALBASE}/lib"],
|
|
define_macros=define_macros,
|
|
libraries=libraries)]
|
|
|