Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
40b59cc4
Commit
40b59cc4
authored
Dec 05, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
72308431
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
56 deletions
+61
-56
Makefile
Makefile
+1
-0
setup.py
setup.py
+60
-56
No files found.
Makefile
View file @
40b59cc4
...
...
@@ -40,6 +40,7 @@ all : pyext wcfs/wcfs
ccan_config
:=
3rdparty/ccan/config.h
pyext
:
$(ccan_config) FORCE
$(PYTHON)
setup.py build_dso
--inplace
$(PYTHON)
setup.py ll_build_ext
--inplace
wcfs/wcfs
:
FORCE
...
...
setup.py
View file @
40b59cc4
...
...
@@ -17,8 +17,8 @@
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
from
golang.pyx.build
import
setup
,
Extension
as
PyGoExt
,
build_ext
as
_build_ext
from
setuptools_dso
import
DSO
,
Extension
from
golang.pyx.build
import
setup
,
DSO
,
Extension
as
PyGoExt
,
build_ext
as
_build_ext
from
setuptools_dso
import
Extension
from
setuptools
import
Command
,
find_packages
from
setuptools.command.build_py
import
build_py
as
_build_py
from
pkg_resources
import
working_set
,
EntryPoint
...
...
@@ -29,58 +29,26 @@ import os
import
sys
"""
libvirtmem = DSO('wendelin.bigfile.libvirtmem',
['bigfile/pagefault.c',
'bigfile/pagemap.c',
'bigfile/ram.c',
'bigfile/ram_shmfs.c',
'bigfile/ram_hugetlbfs.c',
'bigfile/virtmem.c',
'lib/bug.c',
'lib/utils.c'],
include_dirs = [ # XXX dup
'./include',
'./3rdparty/ccan',
'./3rdparty/include'
],
define_macros = [('_GNU_SOURCE',None)], # XXX dup
extra_compile_args = [ # XXX dup
'-std=gnu99', # declarations inside for-loop
'-fplan9-extensions', # anonymous-structs + simple inheritance
'-fvisibility=hidden', # by default symbols not visible outside DSO
# # in C99 declaration after statement is ok, and we explicitly compile with -std=gnu99.
# # Python >= 3.4 however adds -Werror=declaration-after-statement even for extension
# # modules irregardless of their compilation flags:
# #
# # https://bugs.python.org/issue21121
# #
# # ensure there is no warnings / errors for decl-after-statements.
# '-Wno-declaration-after-statement',
# '-Wno-error=declaration-after-statement',
],
extra_link_args = [
'-Wl,--no-undefined', # check DSO for undefined symbols at link time
]
)
"""
#_bigfile = Extension('wendelin.bigfile._bigfile',
_bigfile
=
PyGoExt
(
'wendelin.bigfile._bigfile'
,
sources
=
[
'bigfile/_bigfile.c'
,
# TODO split -> libvirtmem
'bigfile/pagefault.c'
,
'bigfile/pagemap.c'
,
'bigfile/ram.c'
,
'bigfile/ram_shmfs.c'
,
'bigfile/ram_hugetlbfs.c'
,
'bigfile/virtmem.c'
,
'lib/bug.c'
,
'lib/utils.c'
,
## TODO split -> libvirtmem
#'bigfile/pagefault.c',
#'bigfile/pagemap.c',
#'bigfile/ram.c',
#'bigfile/ram_shmfs.c',
#'bigfile/ram_hugetlbfs.c',
#'bigfile/virtmem.c',
#'lib/bug.c',
#'lib/utils.c',
## TODO split -> libwcfs
#'wcfs/internal/_wcfs.pyx',
#'wcfs/internal/wcfs_virtmem.cpp',
#'wcfs/internal/wcfs_watchlink.cpp',
#'wcfs/internal/wcfs_misc.cpp',
],
include_dirs
=
[
'./include'
,
...
...
@@ -110,7 +78,7 @@ _bigfile = PyGoExt('wendelin.bigfile._bigfile',
# '-Wl,--no-undefined', # check DSO for undefined symbols at link time
#]
#
dsos = ['wendelin.bigfile.libvirtmem'],
dsos
=
[
'wendelin.bigfile.libvirtmem'
],
)
...
...
@@ -273,11 +241,45 @@ setup(
keywords
=
'bigdata out-of-core numpy virtual-memory'
,
#x_dsos = [libvirtmem],
x_dsos
=
[
DSO
(
'wendelin.bigfile.libvirtmem'
,
[
'bigfile/pagefault.c'
,
'bigfile/pagemap.c'
,
'bigfile/ram.c'
,
'bigfile/ram_shmfs.c'
,
'bigfile/ram_hugetlbfs.c'
,
'bigfile/virtmem.c'
,
'lib/bug.c'
,
'lib/utils.c'
],
include_dirs
=
[
# XXX dup
'./include'
,
'./3rdparty/ccan'
,
'./3rdparty/include'
],
define_macros
=
[(
'_GNU_SOURCE'
,
None
)],
# XXX dup
extra_compile_args
=
[
# XXX dup
'-std=gnu99'
,
# declarations inside for-loop
'-fplan9-extensions'
,
# anonymous-structs + simple inheritance
'-fvisibility=hidden'
,
# by default symbols not visible outside DSO
# # in C99 declaration after statement is ok, and we explicitly compile with -std=gnu99.
# # Python >= 3.4 however adds -Werror=declaration-after-statement even for extension
# # modules irregardless of their compilation flags:
# #
# # https://bugs.python.org/issue21121
# #
# # ensure there is no warnings / errors for decl-after-statements.
# '-Wno-declaration-after-statement',
# '-Wno-error=declaration-after-statement',
],
extra_link_args
=
[
'-Wl,--no-undefined'
,
# check DSO for undefined symbols at link time
])],
ext_modules
=
[
_bigfile
,
PyGoExt
(
'wcfs.internal._wcfs'
,
PyGoExt
(
'w
endelin.w
cfs.internal._wcfs'
,
[
'wcfs/internal/_wcfs.pyx'
,
'wcfs/internal/wcfs_virtmem.cpp'
,
'wcfs/internal/wcfs_watchlink.cpp'
,
...
...
@@ -290,15 +292,17 @@ setup(
],
extra_compile_args
=
[
'-std=gnu++11'
,
# not c++11 since we use typeof
]),
],
dsos
=
[
'wendelin.bigfile.libvirtmem'
]),
PyGoExt
(
'wcfs.internal.wcfs_test'
,
PyGoExt
(
'w
endelin.w
cfs.internal.wcfs_test'
,
[
'wcfs/internal/wcfs_test.pyx'
]),
Extension
(
'wcfs.internal.io'
,
Extension
(
'w
endelin.w
cfs.internal.io'
,
[
'wcfs/internal/io.pyx'
]),
Extension
(
'wcfs.internal.mm'
,
Extension
(
'w
endelin.w
cfs.internal.mm'
,
[
'wcfs/internal/mm.pyx'
]),
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment