-
Notifications
You must be signed in to change notification settings - Fork 9
/
setup.py
18 lines (16 loc) · 876 Bytes
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from distutils.core import setup, Extension
import sys
import platform
linux_module = Extension('_posixshmem',
define_macros = [('HAVE_SHM_OPEN', '1'), ('HAVE_SHM_UNLINK', '1'), ('HAVE_SYS_MMAN_H', '1')],
libraries = ['rt'],
sources = ['posixshmem.c'])
darwin_module = Extension('_posixshmem',
define_macros = [('HAVE_SHM_OPEN', '1'), ('HAVE_SHM_UNLINK', '1'), ('HAVE_SYS_MMAN_H', '1')],
sources = ['posixshmem.c'])
setup (name = 'shared-memory-backport',
version = '2.0.0',
description = 'Simple backport of the multiprocessing.shared_memory module freshlay landed in python 3.8',
py_modules = ['shared_memory'],
ext_modules = [linux_module] if platform.system() == 'Linux' else [darwin_module] if platform.system() == 'Darwin' else []
)