Skip to content

Commit

Permalink
Merge release branch updates except for C modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefano Cossu committed Apr 9, 2019
1 parent a5bd7ff commit 0f3335e
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 89 deletions.
5 changes: 0 additions & 5 deletions lakesuperior/model/rdf/graph.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ from libc.stdint cimport uint32_t, uint64_t

from cymem.cymem cimport Pool

cimport lakesuperior.cy_include.collections as cc

from lakesuperior.model.base cimport Key, TripleKey
from lakesuperior.model.rdf.triple cimport BufferTriple
from lakesuperior.model.structures.keyset cimport Keyset
Expand All @@ -20,9 +18,6 @@ cdef class Graph:
public Keyset keys
public object uri

cc.key_compare_ft term_cmp_fn
cc.key_compare_ft trp_cmp_fn

void _match_ptn_callback(
self, pattern, Graph gr, lookup_callback_fn_t callback_fn,
bint callback_cond=*, void* ctx=*
Expand Down
1 change: 0 additions & 1 deletion lakesuperior/model/rdf/graph.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ from cpython.object cimport Py_LT, Py_EQ, Py_GT, Py_LE, Py_NE, Py_GE
from libc.string cimport memcpy
from libc.stdlib cimport free

cimport lakesuperior.cy_include.collections as cc
cimport lakesuperior.model.callbacks as cb
cimport lakesuperior.model.structures.keyset as kset

Expand Down
5 changes: 0 additions & 5 deletions lakesuperior/model/rdf/triple.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#from lakesuperior.cy_include cimport cytpl as tpl
from lakesuperior.model.base cimport Buffer
from lakesuperior.model.rdf.term cimport Term

Expand All @@ -13,7 +12,3 @@ ctypedef struct BufferTriple:
Buffer *s
Buffer *p
Buffer *o

#cdef:
# int serialize(tuple trp, tpl.tpl_bin *data) except -1
# tuple deserialize(tpl.tpl_bin data)
43 changes: 0 additions & 43 deletions lakesuperior/model/rdf/triple.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#from lakesuperior.store.ldp_rs cimport term

__doc__ = """
Triple model.
Expand All @@ -9,44 +7,3 @@ pointers to :py:model:`lakesuperior.model.rdf.term` objects, and
``BufferTriple``, with pointers to byte buffers of serialized terms.
"""


#cdef int serialize(tuple trp, tpl.tpl_bin *data) except -1:
# """
# Serialize a triple expressed as a tuple of RDFlib terms.
#
# :param tuple trp: 3-tuple of RDFlib terms.
#
# :rtype: Triple
# """
# cdef:
# Triple strp
# Term *s
# Term *p
# Term *o
#
# strp.s = s
# strp.p = p
# strp.o = o
#
## term.serialize(s)
## term.serialize(p)
## term.serialize(o)
#
# return strp
#
#
#cdef tuple deserialize(Triple strp):
# """
# Deserialize a ``Triple`` structure into a tuple of terms.
#
# :rtype: tuple
# """
# pass
## s = term.deserialize(strp.s.addr, strp.s.sz)
## p = term.deserialize(strp.p.addr, strp.p.sz)
## o = term.deserialize(strp.o.addr, strp.o.sz)
##
## return s, p, o
#
#
89 changes: 54 additions & 35 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,66 +82,78 @@
path.join('lakesuperior', 'model', f'base.{ext}'),
],
include_dirs=include_dirs,
extra_compile_args=['-fopenmp', '-g'],
extra_link_args=['-fopenmp', '-g']
#extra_compile_args=['-fopenmp', '-g'],
#extra_link_args=['-fopenmp', '-g']
),
Extension(
'lakesuperior.model.callbacks',
[
path.join('lakesuperior', 'model', f'callbacks.{ext}'),
],
include_dirs=include_dirs,
extra_compile_args=['-g'],
extra_link_args=['-g'],
#extra_compile_args=['-fopenmp'],
#extra_link_args=['-fopenmp']
#extra_compile_args=['-g'],
#extra_link_args=['-g'],
),
Extension(
'lakesuperior.model.structures.*',
'lakesuperior.model.structures.hash',
[
#path.join(spookyhash_src_dir, 'context.c'),
#path.join(spookyhash_src_dir, 'globals.c'),
path.join(spookyhash_src_dir, 'spookyhash.c'),
path.join(coll_src_dir, 'common.c'),
path.join(coll_src_dir, 'array.c'),
path.join(coll_src_dir, 'hashtable.c'),
path.join(coll_src_dir, 'hashset.c'),
path.join('lakesuperior', 'model', 'structures', f'*.{ext}'),
path.join('lakesuperior', 'model', 'structures', f'hash.{ext}'),
],
include_dirs=include_dirs,
extra_compile_args=['-fopenmp', '-g'],
extra_link_args=['-fopenmp', '-g']
#extra_compile_args=['-g'],
#extra_link_args=['-g']
),
Extension(
'lakesuperior.model.structures.keyset',
[
path.join('lakesuperior', 'model', 'structures', f'keyset.{ext}'),
],
include_dirs=include_dirs,
#extra_compile_args=['-fopenmp', '-g'],
#extra_link_args=['-fopenmp', '-g']
),
Extension(
'lakesuperior.store.base_lmdb_store',
[
path.join(coll_src_dir, 'common.c'),
path.join(coll_src_dir, 'array.c'),
path.join(coll_src_dir, 'hashtable.c'),
path.join(coll_src_dir, 'hashset.c'),
path.join(tpl_src_dir, 'tpl.c'),
path.join(lmdb_src_dir, 'mdb.c'),
path.join(lmdb_src_dir, 'midl.c'),
path.join('lakesuperior', 'store', f'base_lmdb_store.{ext}'),
],
include_dirs=include_dirs,
extra_compile_args=['-g'],
extra_link_args=['-g'],
#extra_compile_args=['-g'],
#extra_link_args=['-g'],
),
Extension(
'lakesuperior.model.rdf.*',
'lakesuperior.model.rdf.term',
[
path.join(tpl_src_dir, 'tpl.c'),
path.join(spookyhash_src_dir, 'context.c'),
path.join(spookyhash_src_dir, 'globals.c'),
path.join(spookyhash_src_dir, 'spookyhash.c'),
path.join(coll_src_dir, 'common.c'),
path.join(coll_src_dir, 'array.c'),
path.join(coll_src_dir, 'hashtable.c'),
path.join(coll_src_dir, 'hashset.c'),
path.join('lakesuperior', 'model', 'rdf', f'*.{ext}'),
path.join('lakesuperior', 'model', 'rdf', f'term.{ext}'),
],
include_dirs=include_dirs,
#extra_compile_args=['-g'],
#extra_link_args=['-g'],
),
Extension(
'lakesuperior.model.rdf.triple',
[
path.join('lakesuperior', 'model', 'rdf', f'triple.{ext}'),
],
include_dirs=include_dirs,
#extra_compile_args=['-fopenmp'],
#extra_link_args=['-fopenmp']
#extra_compile_args=['-g'],
#extra_link_args=['-g'],
),
Extension(
'lakesuperior.model.rdf.graph',
[
path.join('lakesuperior', 'model', 'rdf', f'graph.{ext}'),
],
include_dirs=include_dirs,
#extra_compile_args=['-g'],
#extra_link_args=['-g'],
),
Extension(
'lakesuperior.store.ldp_rs.lmdb_triplestore',
Expand All @@ -156,8 +168,8 @@
'lakesuperior', 'store', 'ldp_rs', f'lmdb_triplestore.{ext}'),
],
include_dirs=include_dirs,
extra_compile_args=['-g', '-fopenmp'],
extra_link_args=['-g', '-fopenmp']
#extra_compile_args=['-g', '-fopenmp'],
#extra_link_args=['-g', '-fopenmp']
),
]

Expand Down Expand Up @@ -192,7 +204,9 @@
'boundscheck': False,
'wraparound': False,
'profile': True,
'embedsignature': True
'embedsignature': True,
'linetrace': True,
'binding': True,
}
)

Expand All @@ -212,6 +226,8 @@

ext_modules=extensions,

zip_safe=False,

# https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 3 - Alpha',
Expand All @@ -233,16 +249,19 @@
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',

'Programming Language :: Cython',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',

'Topic :: Database :: Database Engines/Servers',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
'Topic :: Software Development :: Libraries :: Application Frameworks',
],

keywords='repository linked-data',

python_requires='~=3.6',
python_requires='>=3.6',

packages=find_packages(exclude=['contrib', 'docs', 'tests']),

Expand Down

0 comments on commit 0f3335e

Please sign in to comment.