mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
[cdatapack] adds an initial cpython file for the cdatapack implementation
Summary: Just a simple module declaration with no logic yet. Test Plan: ``` [andromeda]:~/work/mercurial/facebook-hg-rpms/remotefilelog:2445a3a> make local <output snipped> [andromeda]:~/work/mercurial/facebook-hg-rpms/remotefilelog:2445a3a> python Python 2.7.11 (default, Mar 1 2016, 18:40:10) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import cdatapack >>> ``` Reviewers: #fastmanifest, durham Reviewed By: durham Subscribers: mitrandir Differential Revision: https://phabricator.intern.facebook.com/D3654786 Signature: t1:3654786:1470175354:c7e8847dcc74c83483d21888ad30cd9242fb461c
This commit is contained in:
parent
58e395d2e6
commit
76f5986ab9
23
remotefilelog/cdatapack/py-cdatapack.c
Normal file
23
remotefilelog/cdatapack/py-cdatapack.c
Normal file
@ -0,0 +1,23 @@
|
||||
// py-cdatapack.cpp - C implementation of a datapack
|
||||
//
|
||||
// Copyright 2016 Facebook, Inc.
|
||||
//
|
||||
// This software may be used and distributed according to the terms of the
|
||||
// GNU General Public License version 2 or any later version.
|
||||
//
|
||||
// no-check-code
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
static PyMethodDef mod_methods[] = {
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
static char mod_description[] =
|
||||
"Module containing a native datapack implementation";
|
||||
|
||||
PyMODINIT_FUNC initcdatapack(void) {
|
||||
PyObject *mod;
|
||||
|
||||
mod = Py_InitModule3("cdatapack", mod_methods, mod_description);
|
||||
}
|
12
setup.py
12
setup.py
@ -14,5 +14,15 @@ setup(
|
||||
license='GPLv2+',
|
||||
packages=['remotefilelog'],
|
||||
install_requires=['lz4'],
|
||||
ext_modules = []
|
||||
ext_modules = [
|
||||
Extension('cdatapack',
|
||||
sources=[
|
||||
'remotefilelog/cdatapack/py-cdatapack.c',
|
||||
],
|
||||
extra_compile_args=[
|
||||
"-std=c99",
|
||||
"-Wall",
|
||||
"-Werror", "-Werror=strict-prototypes"],
|
||||
)
|
||||
],
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user