Giter Site home page Giter Site logo

py-leveldb's People

Contributors

carlwgeorge avatar kmike avatar rjpower avatar singpenguin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

py-leveldb's Issues

PyLint error for leveldb.LevelDB()

I run py-leveldb successfully, but pylint always show this error message:
pylint message: 'E1101:Module 'leveldb' has no 'LevelDB' member'

My env is macOS 10.12.5, python 2.7.10, IDE tool is VSCode.

PIP Install issue for leveldb with python3.4.2

I am getting an error very similar to the one described here . https://groups.google.com/forum/#!topic/py-leveldb/VpVtc9hJatw . I am installing the package using pip. I also tried the solution provided in the forum and works fine for me. Can you please fix this so that pip3 install leveldb doesn't doesnt throw errors.

Here is what I get ::

gcc -pthread -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.4m -c leveldb/util/options.cc -o build/temp.linux-x86_64-3.4/leveldb/util/options.o -I./leveldb/include -I./leveldb -I./snappy -I. -fno-builtin-memcmp -O2 -fPIC -DNDEBUG -DSNAPPY -pthread -Wall -DOS_LINUX -DLEVELDB_PLATFORM_POSIX
gcc -pthread -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.4m -c leveldb/util/status.cc -o build/temp.linux-x86_64-3.4/leveldb/util/status.o -I./leveldb/include -I./leveldb -I./snappy -I. -fno-builtin-memcmp -O2 -fPIC -DNDEBUG -DSNAPPY -pthread -Wall -DOS_LINUX -DLEVELDB_PLATFORM_POSIX
gcc -pthread -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.4m -c leveldb/port/port_posix.cc -o build/temp.linux-x86_64-3.4/leveldb/port/port_posix.o -I./leveldb/include -I./leveldb -I./snappy -I. -fno-builtin-memcmp -O2 -fPIC -DNDEBUG -DSNAPPY -pthread -Wall -DOS_LINUX -DLEVELDB_PLATFORM_POSIX
gcc -pthread -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.4m -c leveldb_ext.cc -o build/temp.linux-x86_64-3.4/leveldb_ext.o -I./leveldb/include -I./leveldb -I./snappy -I. -fno-builtin-memcmp -O2 -fPIC -DNDEBUG -DSNAPPY -pthread -Wall -DOS_LINUX -DLEVELDB_PLATFORM_POSIX
In file included from /usr/include/python3.4m/pyatomic.h:8:0,
                 from /usr/include/python3.4m/Python.h:53,
                 from leveldb_ext.h:8,
                 from leveldb_ext.cc:6:
/usr/include/python3.4m/dynamic_annotations.h:472:3: error: template with C linkage
   template <class T>
   ^
error: command 'gcc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-lv3zxucm/leveldb/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-2x2_2bpt-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-lv3zxucm/leveldb/

Cygwin support

The current release seems not supporting Cygwin platform. I got the error below.

$ uname -a
CYGWIN_NT-6.1 Dell 1.7.33-2(0.280/5/3) 2014-11-13 15:47 x86_64 Cygwin
$ python setup.py build
Don't know how to compile leveldb for CYGWIN_NT-6.1!

The latest leveldb has added support fow Cygwin, see here, though I recently found it's not working sometimes.

I managed to install py-leveldb on Cygwin after I applied the following changes:

$ git diff
diff --git a/leveldb/port/port_posix.h b/leveldb/port/port_posix.h
index f2b89bf..4667921 100644
--- a/leveldb/port/port_posix.h
+++ b/leveldb/port/port_posix.h
@@ -55,7 +55,7 @@

 #if defined(OS_MACOSX) || defined(OS_SOLARIS) || defined(OS_FREEBSD) ||\
     defined(OS_NETBSD) || defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD) ||\
-    defined(OS_ANDROID) || defined(OS_HPUX)
+    defined(OS_ANDROID) || defined(OS_HPUX) || defined(CYGWIN)
 // Use fread/fwrite/fflush on platforms without _unlocked variants
 #define fread_unlocked fread
 #define fwrite_unlocked fwrite
diff --git a/setup.py b/setup.py
index 9413d89..860eb94 100644
--- a/setup.py
+++ b/setup.py
@@ -38,6 +38,14 @@ elif system == 'Linux':
         '-DOS_LINUX',
         '-DLEVELDB_PLATFORM_POSIX',
     ]
+elif system.startswith('CYGWIN'):
+    extra_compile_args = common_flags + [
+        '-lpthread',
+        '-Wall',
+        '-DOS_LINUX',
+        '-DLEVELDB_PLATFORM_POSIX',
+        '-DCYGWIN',
+    ]
 else:
     sys.stderr.write("Don't know how to compile leveldb for %s!\n" % system)
     sys.exit(1)
$

I wonder if we can add this feature.

bloom filter

Do not support setup a bloom filter to leveldb at the very beginning ? and why ?

Update levedb

Hi,

it would be great if the pypi package would be up to date.
The underlying leveldb version is 1.7 and it would be great if it would be updated to a newer version.

Thank you.

remove ez_setup import

It would be great if the import of ez_setup would be removed completely.

It makes no sense to run this setup.py in a specific and old version of setuptools.

Thank you.

PS: I'm not the only one that wants that removed but somehow the tickets created at https://code.google.com/p/py-leveldb weren't forward to you.

tagging releases

Would you mind adding git tags to this repo to correspond to the releases on PyPI?

Status of this project?

First of all, thanks for putting this project out there.

Given the last commit is of 5 years ago what is the status of this project and the corresponding PyPI package? There is also https://github.com/arnimarj/py-leveldb which appears to be older.

If you're interested I've made some changes to address issue and add Python 3.12 support. If you're interested in a PR let me know.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.