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