[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:
Tony Tung 2016-08-03 15:29:29 -07:00
parent 58e395d2e6
commit 76f5986ab9
2 changed files with 34 additions and 1 deletions

View 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);
}

View File

@ -14,5 +14,15 @@ setup(
license='GPLv2+', license='GPLv2+',
packages=['remotefilelog'], packages=['remotefilelog'],
install_requires=['lz4'], 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"],
)
],
) )