diff --git a/pump/headers/buffer.h b/kimchi/headers/buffer.h
similarity index 100%
rename from pump/headers/buffer.h
rename to kimchi/headers/buffer.h
diff --git a/pump/headers/headers.h b/kimchi/headers/headers.h
similarity index 100%
rename from pump/headers/headers.h
rename to kimchi/headers/headers.h
diff --git a/pump/headers/pump.h b/kimchi/headers/kimchi.h
similarity index 90%
rename from pump/headers/pump.h
rename to kimchi/headers/kimchi.h
index b6f0c74..8d3c854 100644
--- a/pump/headers/pump.h
+++ b/kimchi/headers/kimchi.h
@@ -15,8 +15,8 @@
* along with this program. If not, see .
*/
-#ifndef __PUMP_H
-#define __PUMP_H 1
+#ifndef __KIMCHI_H
+#define __KIMCHI_H 1
///
// Serializable Type Definitions
@@ -74,13 +74,13 @@
#include "utils/serialize.c"
- // pump.c Function Prototypes
- static PyObject *deflate(PyObject *, PyObject *);
- static PyObject *inflate(PyObject *, PyObject *);
+ // kimchi.c Function Prototypes
+ static PyObject *dumps(PyObject *, PyObject *);
+ static PyObject *loads(PyObject *, PyObject *);
#if PY_MAJOR_VERSION == 2
- void initpump(void);
+ void initkimchi(void);
#else
- PyMODINIT_FUNC PyInit_pump(void);
+ PyMODINIT_FUNC PyInit_kimchi(void);
#endif
#endif
diff --git a/pump/headers/serialize.h b/kimchi/headers/serialize.h
similarity index 93%
rename from pump/headers/serialize.h
rename to kimchi/headers/serialize.h
index b06c208..8afec07 100644
--- a/pump/headers/serialize.h
+++ b/kimchi/headers/serialize.h
@@ -21,4 +21,4 @@ PyObject *deserialize(UserBuffer *);
// Note, we do not include utils/serialize.c here because it requires all of our serializers to be defined, while
// this file is included before them as they could in turn require access to the serialize and deserialize functions
-// Thusly, utils/serialize.c is included in headers/pump.h
+// Thusly, utils/serialize.c is included near the end of headers/kimchi.h
diff --git a/pump/headers/types.h b/kimchi/headers/types.h
similarity index 100%
rename from pump/headers/types.h
rename to kimchi/headers/types.h
diff --git a/pump/pump.c b/kimchi/kimchi.c
similarity index 75%
rename from pump/pump.c
rename to kimchi/kimchi.c
index 55c0c68..3d8d04f 100644
--- a/pump/pump.c
+++ b/kimchi/kimchi.c
@@ -1,5 +1,5 @@
/*
- * pump.c: A library used to serialize/deserialize certain python objects.
+ * kimchi.c: A library used to serialize/deserialize certain python objects.
* Copyright (C) 2016 Warren Spencer warrenspencer27@gmail.com
* This program is free software: you can redistribute it and/or modify
@@ -22,7 +22,7 @@
* [Type][Size][Serialization]
*
* Type: 1 byte.
- * Bitflag representing what type was serialized here. See pump.h for type definitions.
+ * Bitflag representing what type was serialized here. See headers/kimchi.h for type definitions.
*
* Size: X bytes.
* The number of bytes the size field consumes is determined by the first byte which has its first bit set to 1.
@@ -42,18 +42,18 @@
/* DevNote: To extend this library with the capability to serialize further objects, the following steps must be taken.
* Follow the existing conventions in place in each of the files when making changes.
*
- * 1. Add a new entry to pump/headers/pump.h: Type Definitions.
- * 2. Add an entry to if block chain in pump/utils/types.c discerning whether a generic python object is of your type.
- * 3. Add cases to the switches in pump/utils/serialize.c to serialize and deserialize objects of your type.
- * 4. Add a new file to pump/serializers/ to serialize & deserialize your type.
+ * 1. Add a new entry to kimchi/headers/kimchi.h: Type Definitions.
+ * 2. Add an entry to if block chain in kimchi/utils/types.c discerning whether a generic python object is of your type.
+ * 3. Add cases to the switches in kimchi/utils/serialize.c to serialize and deserialize objects of your type.
+ * 4. Add a new file to kimchi/serializers/ to serialize & deserialize your type.
* Ensure that the Python Object returned from your deserialization has a ref count of 1.
- * 5. Add a new unit test for your type to the pump/tests/ directory.
+ * 5. Add a new unit test for your type to the kimchi/tests/ directory.
* It will be automatically included in the unit tests.
*/
-#include "headers/pump.h"
+#include "headers/kimchi.h"
-static PyObject *deflate(PyObject *self, PyObject *args) {
+static PyObject *dumps(PyObject *self, PyObject *args) {
/* API function which serializes a python object.
*
* Inputs: self - Unused. The required `self` parameter of any python-visible function.
@@ -80,13 +80,13 @@ static PyObject *deflate(PyObject *self, PyObject *args) {
return obj;
}
-static PyObject *inflate(PyObject *self, PyObject *args) {
+static PyObject *loads(PyObject *self, PyObject *args) {
/* API function which deserializes a python object.
*
* Inputs: self - Unused. The required `self` parameter of any python-visible function.
* args - Positional arguments passed to the function.
*
- * Outputs: A copy of the original Python object serialized by the deflate function, or NULL if an error occurs.
+ * Outputs: A copy of the original Python object serialized by the dumps function, or NULL if an error occurs.
*/
PyObject *obj;
@@ -108,31 +108,31 @@ static PyObject *inflate(PyObject *self, PyObject *args) {
return obj;
}
-static PyMethodDef pumpMethods[] = {
- {"deflate", (PyCFunction) deflate, METH_VARARGS, "Serialize a python object as a string."},
- {"inflate", (PyCFunction) inflate, METH_VARARGS, "Deserialize a string as a python object."},
+static PyMethodDef kimchiMethods[] = {
+ {"dumps", (PyCFunction) dumps, METH_VARARGS, "Serialize a python object as a string."},
+ {"loads", (PyCFunction) loads, METH_VARARGS, "Deserialize a string as a python object."},
{NULL, NULL, 0, NULL} /* sentinel */
};
#if PY_MAJOR_VERSION >= 3
-static struct PyModuleDef pumpDef = {
+static struct PyModuleDef kimchiDef = {
PyModuleDef_HEAD_INIT,
- "pump",
+ "kimchi",
"Provides serialization capabilities for most built in objects",
-1,
- pumpMethods,
+ kimchiMethods,
NULL,
NULL,
NULL,
NULL
};
-PyMODINIT_FUNC PyInit_pump(void) {
- return PyModule_Create(&pumpDef);
+PyMODINIT_FUNC PyInit_kimchi(void) {
+ return PyModule_Create(&kimchiDef);
}
#else
-void initpump(void) {
- Py_InitModule("pump", pumpMethods);
+void initkimchi(void) {
+ Py_InitModule("kimchi", kimchiMethods);
}
#endif
diff --git a/pump/serializers/bool.c b/kimchi/serializers/bool.c
similarity index 93%
rename from pump/serializers/bool.c
rename to kimchi/serializers/bool.c
index 9cb6300..3216f5c 100644
--- a/pump/serializers/bool.c
+++ b/kimchi/serializers/bool.c
@@ -1,5 +1,5 @@
/*
- * bool.c: A file containing functions used by pump.c to serialize Python Booleans.
+ * bool.c: A file containing functions used by kimchi.c to serialize Python Booleans.
* Copyright (C) 2016 Warren Spencer warrenspencer27@gmail.com
* This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-#include "headers/pump.h"
+#include "headers/kimchi.h"
// Function Prototypes
int serializeBool(char **, unsigned long long *);
diff --git a/pump/serializers/bytes.c b/kimchi/serializers/bytes.c
similarity index 95%
rename from pump/serializers/bytes.c
rename to kimchi/serializers/bytes.c
index 46339b2..8954258 100644
--- a/pump/serializers/bytes.c
+++ b/kimchi/serializers/bytes.c
@@ -1,5 +1,5 @@
/*
- * bytes.c: A file containing functions used by pump.c to serialize `bytes` objects and Python2 strings.
+ * bytes.c: A file containing functions used by kimchi.c to serialize `bytes` objects and Python2 strings.
* Copyright (C) 2016 Warren Spencer warrenspencer27@gmail.com
* This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-#include "headers/pump.h"
+#include "headers/kimchi.h"
// Function prototypes
int serializeBytes(PyObject *, char **, unsigned long long *);
diff --git a/pump/serializers/dict.c b/kimchi/serializers/dict.c
similarity index 94%
rename from pump/serializers/dict.c
rename to kimchi/serializers/dict.c
index f7c0020..776a3a5 100644
--- a/pump/serializers/dict.c
+++ b/kimchi/serializers/dict.c
@@ -1,5 +1,5 @@
/*
- * dict.c: A file containing functions used by pump.c to serialize Python Dictionaries.
+ * dict.c: A file containing functions used by kimchi.c to serialize Python Dictionaries.
* Copyright (C) 2016 Warren Spencer warrenspencer27@gmail.com
* This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-#include "headers/pump.h"
+#include "headers/kimchi.h"
// Function Prototypes
int serializeDict(PyObject *, char **, unsigned long long *);
diff --git a/pump/serializers/float.c b/kimchi/serializers/float.c
similarity index 94%
rename from pump/serializers/float.c
rename to kimchi/serializers/float.c
index 959aa65..e6bb080 100644
--- a/pump/serializers/float.c
+++ b/kimchi/serializers/float.c
@@ -1,5 +1,5 @@
/*
- * float.c: A file containing functions used by pump.c to serialize floats.
+ * float.c: A file containing functions used by kimchi.c to serialize floats.
* Copyright (C) 2016 Warren Spencer warrenspencer27@gmail.com
* This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-#include "headers/pump.h"
+#include "headers/kimchi.h"
// Function Prototypes
int serializeFloat(PyObject *, char **, unsigned long long *);
diff --git a/pump/serializers/int.c b/kimchi/serializers/int.c
similarity index 97%
rename from pump/serializers/int.c
rename to kimchi/serializers/int.c
index 2d95b43..b835761 100644
--- a/pump/serializers/int.c
+++ b/kimchi/serializers/int.c
@@ -1,5 +1,5 @@
/*
- * int.c: A file containing functions used by pump.c to serialize integers.
+ * int.c: A file containing functions used by kimchi.c to serialize integers.
* Copyright (C) 2016 Warren Spencer warrenspencer27@gmail.com
* This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-#include "headers/pump.h"
+#include "headers/kimchi.h"
// Function Prototypes
static unsigned long long _numBytesToSerialize(unsigned long long);
diff --git a/pump/serializers/list.c b/kimchi/serializers/list.c
similarity index 97%
rename from pump/serializers/list.c
rename to kimchi/serializers/list.c
index 43d0883..8c0e722 100644
--- a/pump/serializers/list.c
+++ b/kimchi/serializers/list.c
@@ -1,5 +1,5 @@
/*
- * list.c: A file containing functions used by pump.c to serialize Python Lists.
+ * list.c: A file containing functions used by kimchi.c to serialize Python Lists.
* Copyright (C) 2016 Warren Spencer warrenspencer27@gmail.com
* This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-#include "headers/pump.h"
+#include "headers/kimchi.h"
// Function Prototypes
static void _freeSerializeListBuffers(char **, unsigned long long *, unsigned long long);
diff --git a/pump/serializers/long.c b/kimchi/serializers/long.c
similarity index 96%
rename from pump/serializers/long.c
rename to kimchi/serializers/long.c
index 1b08afe..d436907 100644
--- a/pump/serializers/long.c
+++ b/kimchi/serializers/long.c
@@ -1,5 +1,5 @@
/*
- * long.c: A file containing functions used by pump.c to serialize longs.
+ * long.c: A file containing functions used by kimchi.c to serialize longs.
* Copyright (C) 2016 Warren Spencer warrenspencer27@gmail.com
* This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-#include "headers/pump.h"
+#include "headers/kimchi.h"
#include "longintrepr.h"
// Function Prototypes
diff --git a/pump/serializers/none.c b/kimchi/serializers/none.c
similarity index 92%
rename from pump/serializers/none.c
rename to kimchi/serializers/none.c
index beac40a..7e27344 100644
--- a/pump/serializers/none.c
+++ b/kimchi/serializers/none.c
@@ -1,5 +1,5 @@
/*
- * none.c: A file containing functions used by pump.c to serialize Python None's.
+ * none.c: A file containing functions used by kimchi.c to serialize Python None's.
* Copyright (C) 2016 Warren Spencer warrenspencer27@gmail.com
* This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-#include "headers/pump.h"
+#include "headers/kimchi.h"
// Function Prototypes
int serializeNone(char **, unsigned long long *);
diff --git a/pump/serializers/set.c b/kimchi/serializers/set.c
similarity index 97%
rename from pump/serializers/set.c
rename to kimchi/serializers/set.c
index f324be1..d9d1455 100644
--- a/pump/serializers/set.c
+++ b/kimchi/serializers/set.c
@@ -1,5 +1,5 @@
/*
- * set.c: A file containing functions used by pump.c to serialize Python Sets and FrozenSets.
+ * set.c: A file containing functions used by kimchi.c to serialize Python Sets and FrozenSets.
* Copyright (C) 2016 Warren Spencer warrenspencer27@gmail.com
* This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-#include "headers/pump.h"
+#include "headers/kimchi.h"
// Function Prototypes
static void _freeSerializeSetBuffers(char **, unsigned long long *, unsigned long long, PyObject *);
diff --git a/pump/serializers/tuple.c b/kimchi/serializers/tuple.c
similarity index 97%
rename from pump/serializers/tuple.c
rename to kimchi/serializers/tuple.c
index 58b0b39..f23d6df 100644
--- a/pump/serializers/tuple.c
+++ b/kimchi/serializers/tuple.c
@@ -1,5 +1,5 @@
/*
- * tuple.c: A file containing functions used by pump.c to serialize Python Tuples.
+ * tuple.c: A file containing functions used by kimchi.c to serialize Python Tuples.
* Copyright (C) 2016 Warren Spencer warrenspencer27@gmail.com
* This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-#include "headers/pump.h"
+#include "headers/kimchi.h"
// Function Prototypes
static void _freeSerializeTupleBuffers(char **, unsigned long long *, unsigned long long);
diff --git a/pump/serializers/unicode.c b/kimchi/serializers/unicode.c
similarity index 95%
rename from pump/serializers/unicode.c
rename to kimchi/serializers/unicode.c
index fe37ad9..013d5ec 100644
--- a/pump/serializers/unicode.c
+++ b/kimchi/serializers/unicode.c
@@ -1,5 +1,5 @@
/*
- * unicode.c: A file containing functions used by pump.c to serialize unicode strings.
+ * unicode.c: A file containing functions used by kimchi.c to serialize unicode strings.
* Copyright (C) 2016 Warren Spencer warrenspencer27@gmail.com
* This program is free software: you can redistribute it and/or modify
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-#include "headers/pump.h"
+#include "headers/kimchi.h"
// Function prototypes
int serializeUnicode(PyObject *, char **, unsigned long long *);
diff --git a/pump/tests/__init__.py b/kimchi/tests/__init__.py
similarity index 80%
rename from pump/tests/__init__.py
rename to kimchi/tests/__init__.py
index 5eecd52..1f99841 100644
--- a/pump/tests/__init__.py
+++ b/kimchi/tests/__init__.py
@@ -11,7 +11,7 @@
sys.path.append('..')
# Projet imports
-import pump
+import kimchi
# Python 2 & 3 compatibility
if sys.version_info.major >= 3:
@@ -24,7 +24,7 @@
TEST_DIR = os.path.split(os.path.dirname(os.path.realpath(__file__)))[-1]
PICKLE_CMP = 0
-class PumpTestCase(unittest.TestCase):
+class KimchiTestCase(unittest.TestCase):
def __test(self, obj, ser, deser):
serName = ser.__name__
@@ -32,39 +32,39 @@ def __test(self, obj, ser, deser):
try:
before = time.time()
- deflated = ser(obj)
+ dumped = ser(obj)
serElapsed = time.time() - before
except Exception as e:
self.fail("Error in (%s) serializing %s:\n%s" % (serName, repr(obj), str(e)))
try:
before = time.time()
- inflated = deser(deflated)
+ loaded = deser(dumped)
deserElapsed = time.time() - before
except Exception as e:
self.fail("Error in (%s) deserializing %s (serialized: %r):\n%s"
- % (deserName, repr(obj), repr(deflated), str(e)))
- if obj != inflated:
- self.fail("%s != %s; using %s, %s" % (repr(obj), repr(inflated), serName, deserName))
+ % (deserName, repr(obj), repr(dumped), str(e)))
+ if obj != loaded:
+ self.fail("%s != %s; using %s, %s" % (repr(obj), repr(loaded), serName, deserName))
- return serElapsed, deserElapsed, len(deflated)
+ return serElapsed, deserElapsed, len(dumped)
def _test(self, toTest):
for obj in toTest:
- pumpSerElapsed, pumpDeserElapsed, pumpSerializedSize = self.__test(obj, pump.deflate, pump.inflate)
+ kimSerElapsed, kimDeserElapsed, kimSerializedSize = self.__test(obj, kimchi.dumps, kimchi.loads)
if PICKLE_CMP:
pickleSerElapsed, pickleDeserElapsed, pickleSerializedSize = self.__test(obj, pickle.dumps, pickle.loads)
print("\n".join(("",
"%s:" % repr(obj)[:125],
"Time to serialize:",
- " pump: %s" % pumpSerElapsed,
+ " kimchi: %s" % kimSerElapsed,
" pickle: %s" % pickleSerElapsed,
"Time to deserialize:",
- " pump: %s" % pumpDeserElapsed,
+ " kimchi: %s" % kimDeserElapsed,
" pickle: %s" % pickleDeserElapsed,
"Serialization length:",
- " pump: %s" % pumpSerializedSize,
+ " kimchi: %s" % kimSerializedSize,
" pickle: %s" % pickleSerializedSize
)))
@@ -96,7 +96,7 @@ def _runSuite(testSuite, verbosity):
def main():
global PICKLE_CMP
- parser = argparse.ArgumentParser(description="Execute pump Unit Tests")
+ parser = argparse.ArgumentParser(description="Execute kimchi Unit Tests")
parser.add_argument("testFiles", nargs="*")
parser.add_argument("--verbosity", nargs="?", choices=['1', '2'], default=1)
args = parser.parse_args()
diff --git a/pump/tests/__main__.py b/kimchi/tests/__main__.py
similarity index 100%
rename from pump/tests/__main__.py
rename to kimchi/tests/__main__.py
diff --git a/pump/tests/test_bool.py b/kimchi/tests/test_bool.py
similarity index 74%
rename from pump/tests/test_bool.py
rename to kimchi/tests/test_bool.py
index 520c705..1a6622b 100644
--- a/pump/tests/test_bool.py
+++ b/kimchi/tests/test_bool.py
@@ -1,8 +1,8 @@
# Project imports
-import pump
+import kimchi
import tests
-class TestBool(tests.PumpTestCase):
+class TestBool(tests.KimchiTestCase):
def testBool(self):
toTest = [
diff --git a/pump/tests/test_dict.py b/kimchi/tests/test_dict.py
similarity index 82%
rename from pump/tests/test_dict.py
rename to kimchi/tests/test_dict.py
index 2d45c31..97cda02 100644
--- a/pump/tests/test_dict.py
+++ b/kimchi/tests/test_dict.py
@@ -1,8 +1,8 @@
# Project imports
-import pump
+import kimchi
import tests
-class TestDict(tests.PumpTestCase):
+class TestDict(tests.KimchiTestCase):
def testDict(self):
toTest = [
diff --git a/pump/tests/test_float.py b/kimchi/tests/test_float.py
similarity index 91%
rename from pump/tests/test_float.py
rename to kimchi/tests/test_float.py
index 40ce389..3ca99af 100644
--- a/pump/tests/test_float.py
+++ b/kimchi/tests/test_float.py
@@ -1,8 +1,8 @@
# Project imports
-import pump
+import kimchi
import tests
-class TestFloat(tests.PumpTestCase):
+class TestFloat(tests.KimchiTestCase):
def testFloat(self):
toTest = [
diff --git a/pump/tests/test_int.py b/kimchi/tests/test_int.py
similarity index 82%
rename from pump/tests/test_int.py
rename to kimchi/tests/test_int.py
index c7b7e77..737a4c1 100644
--- a/pump/tests/test_int.py
+++ b/kimchi/tests/test_int.py
@@ -1,8 +1,8 @@
# Project imports
-import pump
+import kimchi
import tests
-class TestInteger(tests.PumpTestCase):
+class TestInteger(tests.KimchiTestCase):
def testInteger(self):
toTest = [
diff --git a/pump/tests/test_list.py b/kimchi/tests/test_list.py
similarity index 87%
rename from pump/tests/test_list.py
rename to kimchi/tests/test_list.py
index 66db1a3..4021d2c 100644
--- a/pump/tests/test_list.py
+++ b/kimchi/tests/test_list.py
@@ -1,8 +1,8 @@
# Project imports
-import pump
+import kimchi
import tests
-class TestList(tests.PumpTestCase):
+class TestList(tests.KimchiTestCase):
def testList(self):
toTest = [
diff --git a/pump/tests/test_long.py b/kimchi/tests/test_long.py
similarity index 91%
rename from pump/tests/test_long.py
rename to kimchi/tests/test_long.py
index 6ad27f9..88b3a4d 100644
--- a/pump/tests/test_long.py
+++ b/kimchi/tests/test_long.py
@@ -1,8 +1,8 @@
# Project imports
-import pump
+import kimchi
import tests
-class TestLong(tests.PumpTestCase):
+class TestLong(tests.KimchiTestCase):
def testLong(self):
toTest = [
diff --git a/pump/tests/test_none.py b/kimchi/tests/test_none.py
similarity index 71%
rename from pump/tests/test_none.py
rename to kimchi/tests/test_none.py
index 2d35deb..a653251 100644
--- a/pump/tests/test_none.py
+++ b/kimchi/tests/test_none.py
@@ -1,8 +1,8 @@
# Project imports
-import pump
+import kimchi
import tests
-class TestNone(tests.PumpTestCase):
+class TestNone(tests.KimchiTestCase):
def testNone(self):
toTest = [
diff --git a/pump/tests/test_set.py b/kimchi/tests/test_set.py
similarity index 94%
rename from pump/tests/test_set.py
rename to kimchi/tests/test_set.py
index d900278..3ebd564 100644
--- a/pump/tests/test_set.py
+++ b/kimchi/tests/test_set.py
@@ -1,8 +1,8 @@
# Project imports
-import pump
+import kimchi
import tests
-class TestSet(tests.PumpTestCase):
+class TestSet(tests.KimchiTestCase):
def testSet(self):
toTest = [
diff --git a/pump/tests/test_string.py b/kimchi/tests/test_string.py
similarity index 82%
rename from pump/tests/test_string.py
rename to kimchi/tests/test_string.py
index f86ee24..44207b3 100644
--- a/pump/tests/test_string.py
+++ b/kimchi/tests/test_string.py
@@ -1,8 +1,8 @@
# Project imports
-import pump
+import kimchi
import tests
-class TestString(tests.PumpTestCase):
+class TestString(tests.KimchiTestCase):
def testString(self):
toTest = [
diff --git a/pump/tests/test_tuple.py b/kimchi/tests/test_tuple.py
similarity index 89%
rename from pump/tests/test_tuple.py
rename to kimchi/tests/test_tuple.py
index e74fea4..59e99fd 100644
--- a/pump/tests/test_tuple.py
+++ b/kimchi/tests/test_tuple.py
@@ -1,8 +1,8 @@
# Project imports
-import pump
+import kimchi
import tests
-class TestTuple(tests.PumpTestCase):
+class TestTuple(tests.KimchiTestCase):
def testTuple(self):
toTest = [
diff --git a/pump/tests/test_unicode.py b/kimchi/tests/test_unicode.py
similarity index 84%
rename from pump/tests/test_unicode.py
rename to kimchi/tests/test_unicode.py
index 2888c21..4c8ed24 100644
--- a/pump/tests/test_unicode.py
+++ b/kimchi/tests/test_unicode.py
@@ -1,8 +1,8 @@
# Project imports
-import pump
+import kimchi
import tests
-class TestUnicode(tests.PumpTestCase):
+class TestUnicode(tests.KimchiTestCase):
def testUnicode(self):
toTest = [
diff --git a/pump/utils/buffer.c b/kimchi/utils/buffer.c
similarity index 98%
rename from pump/utils/buffer.c
rename to kimchi/utils/buffer.c
index fdcd83f..eee5490 100644
--- a/pump/utils/buffer.c
+++ b/kimchi/utils/buffer.c
@@ -17,7 +17,7 @@
* along with this program. If not, see .
*/
-#include "headers/pump.h"
+#include "headers/kimchi.h"
UserBuffer *initBuffer(char *buffer, unsigned long long bytesRemaining) {
diff --git a/pump/utils/headers.c b/kimchi/utils/headers.c
similarity index 99%
rename from pump/utils/headers.c
rename to kimchi/utils/headers.c
index 8803973..1e58e46 100644
--- a/pump/utils/headers.c
+++ b/kimchi/utils/headers.c
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-#include "headers/pump.h"
+#include "headers/kimchi.h"
// Header constructing functions
diff --git a/pump/utils/serialize.c b/kimchi/utils/serialize.c
similarity index 99%
rename from pump/utils/serialize.c
rename to kimchi/utils/serialize.c
index 9c14b05..9cd83ac 100644
--- a/pump/utils/serialize.c
+++ b/kimchi/utils/serialize.c
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-#include "headers/pump.h"
+#include "headers/kimchi.h"
int serialize(PyObject *object, char **out, Py_ssize_t *outSize) {
diff --git a/pump/utils/types.c b/kimchi/utils/types.c
similarity index 97%
rename from pump/utils/types.c
rename to kimchi/utils/types.c
index 4fd8699..ed42786 100644
--- a/pump/utils/types.c
+++ b/kimchi/utils/types.c
@@ -16,12 +16,12 @@
* along with this program. If not, see .
*/
-#include "headers/pump.h"
+#include "headers/kimchi.h"
#include "longintrepr.h"
unsigned char getType(PyObject *obj) {
-/* Function which determines what type a given python object is (see pump.h for type definitions).
+/* Function which determines what type a given python object is (see kimchi.h for type definitions).
*
* Inputs: obj - The python object to determine the type of.
*
diff --git a/setup.py b/setup.py
index c8c1c48..5ffce2e 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,8 @@
import distutils.core
DEBUG_COMPILE_ARGS = None
-VERSION = "1.0"
+VERSION = "2.0"
+NAME = "kimchi"
if "DEBUG" in os.environ:
DEBUG_COMPILE_ARGS = ['-O0', '-g', '-pedantic-errors', '-Wall', '-Wextra', '-Wmissing-prototypes',
@@ -10,20 +11,22 @@
distutils.core.setup(
- name="pump",
+ name=NAME,
version=VERSION,
- description="An object serialization utility.",
+ description="A built-in object serialization utility.",
author="Warren Spencer",
author_email="warrenspencer27@gmail.com",
- url="https://github.com/warrenspe/pump",
- download_url="https://github.com/warrenspe/pump/tarball/%s" % VERSION,
+ url="https://github.com/warrenspe/%s" % NAME,
+ download_url="https://github.com/warrenspe/%s/tarball/%s" % (NAME, VERSION),
keywords=['serialize', 'pickle'],
classifiers=[],
+ license="https://www.gnu.org/licenses/gpl-3.0.html",
+ platforms=["Linux", "Windows"],
ext_modules=[
distutils.core.Extension(
- "pump",
- sources = ['pump/pump.c'],
- include_dirs = ['pump', 'pump/utils', 'pump/serializers'],
+ NAME,
+ sources = ['{0}/{0}.c'.format(NAME)],
+ include_dirs = [NAME, '%s/utils' % NAME, '%s/serializers' % NAME],
extra_compile_args=DEBUG_COMPILE_ARGS
)
]