forked from felix021/pyshmht
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
60 lines (46 loc) · 1.95 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/python
import os
from distutils.core import setup, Extension
#os.putenv("CFLAGS", "-g")
shmht = Extension('ext_shmht/_shmht',
sources = ['shmht.c', 'hashtable.c']
)
setup(
name = 'ext_shmht',
# minimal changing of the version
version = '0.1',
# not to claim credit for another's work, nor to unfairly attribute my errors
author = '',
author_email = '',
description = 'shared memory hash table with locking',
license = "BSD",
keywords = "shared memory hash table shmem mmap",
url = "http://github.com/stsci-sienkiew/pyshmht",
ext_modules = [shmht],
packages = ["ext_shmht"],
long_description = """
An extended pyshmht - a simple hash table stored in an mmapped file
The basic access is vaguely dict like with the core capability being:
h = ext_shmht.HashTable( filename, max_entries )
h['key'] = 'value'
v = h['key']
The table only uses strings for keys and values, but there is an
interface that uses an object serializer, such as json or some other
serializer that you provide.
There is a max length of key and value that are specified by defines
in the C code.
extensions include:
- file locking for multi-threaded or multi-process access
n.b. do not use the same object in multiple threads - open the
file again in each thread.
- a little bit of documentation
- a few test cases that run in Pandokia. See http://ssb.stsci.edu/testing/pandokia/ or 'pip install pandokia'.
This is extended from pyshmht by [email protected]. My intent is
to enhance the original for my needs, in a way that the changes may
someday make a reasonable pull request into the original. It is a
fork with a new name because I don't have time for the coordination
with someone on the other side of the world right now. (No kidding!
felix is in Shanghai and I am in Baltimore, separated by 160 degrees
longitude, or 10 to 11 time zones.)
""",
)