|
|
2869f42 |
diff -Nurp leveldb-0.194.orig/MANIFEST.in leveldb-0.194/MANIFEST.in
|
|
|
2869f42 |
--- leveldb-0.194.orig/MANIFEST.in 2016-09-16 19:05:03.000000000 -0500
|
|
|
2869f42 |
+++ leveldb-0.194/MANIFEST.in 2018-10-24 17:26:00.380442126 -0500
|
|
|
2869f42 |
@@ -1,14 +1,2 @@
|
|
|
2869f42 |
-include leveldb/include/leveldb/*.h
|
|
|
2869f42 |
-include leveldb/db/*.h
|
|
|
2869f42 |
-include leveldb/table/*.h
|
|
|
2869f42 |
-include leveldb/util/*.h
|
|
|
2869f42 |
-include leveldb/port/*.h
|
|
|
2869f42 |
-include leveldb/db/*.cc
|
|
|
2869f42 |
-include leveldb/table/*.cc
|
|
|
2869f42 |
-include leveldb/util/*.cc
|
|
|
2869f42 |
-include leveldb/port/*.cc
|
|
|
2869f42 |
-include leveldb/*.cc
|
|
|
2869f42 |
-include snappy/*.h
|
|
|
2869f42 |
-include snappy/*.cc
|
|
|
2869f42 |
include *.cc
|
|
|
2869f42 |
include *.h
|
|
|
2869f42 |
diff -Nurp leveldb-0.194.orig/setup.py leveldb-0.194/setup.py
|
|
|
2869f42 |
--- leveldb-0.194.orig/setup.py 2016-09-16 19:05:55.000000000 -0500
|
|
|
2869f42 |
+++ leveldb-0.194/setup.py 2018-10-24 17:26:58.512460333 -0500
|
|
|
2869f42 |
@@ -7,47 +7,8 @@
|
|
|
2869f42 |
#
|
|
|
2869f42 |
# See LICENSE for details.
|
|
|
2869f42 |
|
|
|
2869f42 |
-import platform
|
|
|
2869f42 |
-import sys
|
|
|
2869f42 |
-
|
|
|
2869f42 |
from setuptools import setup, Extension
|
|
|
2869f42 |
|
|
|
2869f42 |
-system, node, release, version, machine, processor = platform.uname()
|
|
|
2869f42 |
-common_flags = [
|
|
|
2869f42 |
- '-I./leveldb/include',
|
|
|
2869f42 |
- '-I./leveldb',
|
|
|
2869f42 |
- '-I./snappy',
|
|
|
2869f42 |
- '-I.',
|
|
|
2869f42 |
- '-fno-builtin-memcmp',
|
|
|
2869f42 |
- '-O2',
|
|
|
2869f42 |
- '-fPIC',
|
|
|
2869f42 |
- '-DNDEBUG',
|
|
|
2869f42 |
- '-DSNAPPY',
|
|
|
2869f42 |
-]
|
|
|
2869f42 |
-
|
|
|
2869f42 |
-if system == 'Darwin':
|
|
|
2869f42 |
- extra_compile_args = common_flags + [
|
|
|
2869f42 |
- '-DOS_MACOSX',
|
|
|
2869f42 |
- '-DLEVELDB_PLATFORM_POSIX',
|
|
|
2869f42 |
- '-Wno-error=unused-command-line-argument-hard-error-in-future',
|
|
|
2869f42 |
- ]
|
|
|
2869f42 |
-elif system == 'Linux':
|
|
|
2869f42 |
- extra_compile_args = common_flags + [
|
|
|
2869f42 |
- '-pthread',
|
|
|
2869f42 |
- '-Wall',
|
|
|
2869f42 |
- '-DOS_LINUX',
|
|
|
2869f42 |
- '-DLEVELDB_PLATFORM_POSIX',
|
|
|
2869f42 |
- ]
|
|
|
2869f42 |
-elif system == 'SunOS':
|
|
|
2869f42 |
- extra_compile_args = common_flags + [
|
|
|
2869f42 |
- '-pthread',
|
|
|
2869f42 |
- '-Wall',
|
|
|
2869f42 |
- '-DOS_SOLARIS',
|
|
|
2869f42 |
- '-DLEVELDB_PLATFORM_POSIX',
|
|
|
2869f42 |
- ]
|
|
|
2869f42 |
-else:
|
|
|
2869f42 |
- sys.stderr.write("Don't know how to compile leveldb for %s!\n" % system)
|
|
|
2869f42 |
- sys.exit(1)
|
|
|
2869f42 |
|
|
|
2869f42 |
setup(
|
|
|
2869f42 |
name = 'leveldb',
|
|
|
2869f42 |
@@ -81,58 +42,11 @@ setup(
|
|
|
2869f42 |
ext_modules = [
|
|
|
2869f42 |
Extension('leveldb',
|
|
|
2869f42 |
sources = [
|
|
|
2869f42 |
- # snappy
|
|
|
2869f42 |
- './snappy/snappy.cc',
|
|
|
2869f42 |
- './snappy/snappy-stubs-internal.cc',
|
|
|
2869f42 |
- './snappy/snappy-sinksource.cc',
|
|
|
2869f42 |
- './snappy/snappy-c.cc',
|
|
|
2869f42 |
-
|
|
|
2869f42 |
- #leveldb
|
|
|
2869f42 |
- 'leveldb/db/builder.cc',
|
|
|
2869f42 |
- 'leveldb/db/c.cc',
|
|
|
2869f42 |
- 'leveldb/db/db_impl.cc',
|
|
|
2869f42 |
- 'leveldb/db/db_iter.cc',
|
|
|
2869f42 |
- 'leveldb/db/dbformat.cc',
|
|
|
2869f42 |
- 'leveldb/db/filename.cc',
|
|
|
2869f42 |
- 'leveldb/db/log_reader.cc',
|
|
|
2869f42 |
- 'leveldb/db/log_writer.cc',
|
|
|
2869f42 |
- 'leveldb/db/memtable.cc',
|
|
|
2869f42 |
- 'leveldb/db/repair.cc',
|
|
|
2869f42 |
- 'leveldb/db/table_cache.cc',
|
|
|
2869f42 |
- 'leveldb/db/version_edit.cc',
|
|
|
2869f42 |
- 'leveldb/db/version_set.cc',
|
|
|
2869f42 |
- 'leveldb/db/write_batch.cc',
|
|
|
2869f42 |
- 'leveldb/table/block.cc',
|
|
|
2869f42 |
- 'leveldb/table/block_builder.cc',
|
|
|
2869f42 |
- 'leveldb/table/filter_block.cc',
|
|
|
2869f42 |
- 'leveldb/table/format.cc',
|
|
|
2869f42 |
- 'leveldb/table/iterator.cc',
|
|
|
2869f42 |
- 'leveldb/table/merger.cc',
|
|
|
2869f42 |
- 'leveldb/table/table.cc',
|
|
|
2869f42 |
- 'leveldb/table/table_builder.cc',
|
|
|
2869f42 |
- 'leveldb/table/two_level_iterator.cc',
|
|
|
2869f42 |
- 'leveldb/util/arena.cc',
|
|
|
2869f42 |
- 'leveldb/util/bloom.cc',
|
|
|
2869f42 |
- 'leveldb/util/cache.cc',
|
|
|
2869f42 |
- 'leveldb/util/coding.cc',
|
|
|
2869f42 |
- 'leveldb/util/comparator.cc',
|
|
|
2869f42 |
- 'leveldb/util/crc32c.cc',
|
|
|
2869f42 |
- 'leveldb/util/env.cc',
|
|
|
2869f42 |
- 'leveldb/util/env_posix.cc',
|
|
|
2869f42 |
- 'leveldb/util/filter_policy.cc',
|
|
|
2869f42 |
- 'leveldb/util/hash.cc',
|
|
|
2869f42 |
- 'leveldb/util/histogram.cc',
|
|
|
2869f42 |
- 'leveldb/util/logging.cc',
|
|
|
2869f42 |
- 'leveldb/util/options.cc',
|
|
|
2869f42 |
- 'leveldb/util/status.cc',
|
|
|
2869f42 |
- 'leveldb/port/port_posix.cc',
|
|
|
2869f42 |
-
|
|
|
2869f42 |
- # python stuff
|
|
|
2869f42 |
'leveldb_ext.cc',
|
|
|
2869f42 |
'leveldb_object.cc',
|
|
|
2869f42 |
],
|
|
|
2869f42 |
libraries = ['stdc++'],
|
|
|
2869f42 |
- extra_compile_args = extra_compile_args,
|
|
|
2869f42 |
+ extra_link_args=['-lleveldb', '-lsnappy']
|
|
|
2869f42 |
)
|
|
|
2869f42 |
]
|
|
|
2869f42 |
)
|