2016-08-17 22:55:54 +03:00
|
|
|
from distutils.version import LooseVersion
|
|
|
|
import Cython
|
|
|
|
if LooseVersion(Cython.__version__) < LooseVersion('0.22'):
|
|
|
|
raise RuntimeError('Cython >= 0.22 is required')
|
|
|
|
|
2016-08-11 00:26:05 +03:00
|
|
|
from Cython.Build import cythonize
|
|
|
|
from distutils.core import setup, Extension
|
2016-07-08 15:15:42 +03:00
|
|
|
from glob import glob
|
|
|
|
|
2016-07-22 22:44:59 +03:00
|
|
|
hgext3rd = [
|
|
|
|
p[:-3].replace('/', '.')
|
|
|
|
for p in glob('hgext3rd/*.py')
|
|
|
|
if p != 'hgext3rd/__init__.py'
|
|
|
|
]
|
|
|
|
|
2013-06-20 23:16:36 +04:00
|
|
|
setup(
|
2013-06-20 23:57:57 +04:00
|
|
|
name='fbhgext',
|
2016-08-26 16:27:59 +03:00
|
|
|
version='1.0',
|
|
|
|
author='Facebook Source Control Team',
|
|
|
|
maintainer='Facebook Source Control Team',
|
|
|
|
maintainer_email='sourcecontrol-dev@fb.com',
|
|
|
|
url='https://bitbucket.org/facebook/hg-experimental/',
|
|
|
|
description='Facebook mercurial extensions',
|
2013-06-20 23:16:36 +04:00
|
|
|
long_description="",
|
2016-08-26 16:27:59 +03:00
|
|
|
keywords='facebook fb hg mercurial shallow remote filelog',
|
|
|
|
license='GPLv2+',
|
2016-05-11 04:29:53 +03:00
|
|
|
packages=[
|
2016-05-26 22:34:38 +03:00
|
|
|
'fastmanifest',
|
2016-05-11 04:29:53 +03:00
|
|
|
'phabricator',
|
|
|
|
'sqldirstate',
|
2016-08-26 16:27:59 +03:00
|
|
|
'remotefilelog',
|
2016-05-11 04:29:53 +03:00
|
|
|
],
|
2016-08-26 16:27:59 +03:00
|
|
|
install_requires=['lz4'],
|
2014-05-24 01:39:33 +04:00
|
|
|
py_modules=[
|
2016-07-22 22:44:59 +03:00
|
|
|
'statprof'
|
|
|
|
] + hgext3rd,
|
2016-04-08 21:48:31 +03:00
|
|
|
ext_modules = [
|
2016-08-26 16:27:59 +03:00
|
|
|
Extension('cdatapack',
|
|
|
|
sources=[
|
|
|
|
'remotefilelog/cdatapack/py-cdatapack.c',
|
|
|
|
'remotefilelog/cdatapack/cdatapack.c',
|
|
|
|
],
|
|
|
|
include_dirs=[
|
2016-08-27 03:14:52 +03:00
|
|
|
'clib',
|
2016-08-26 16:27:59 +03:00
|
|
|
'remotefilelog/cdatapack',
|
|
|
|
'/usr/local/include',
|
|
|
|
'/opt/local/include',
|
|
|
|
],
|
|
|
|
library_dirs=[
|
|
|
|
'/usr/local/lib',
|
|
|
|
'/opt/local/lib',
|
|
|
|
],
|
|
|
|
libraries=[
|
|
|
|
'crypto',
|
|
|
|
'lz4',
|
|
|
|
],
|
|
|
|
extra_compile_args=[
|
|
|
|
"-std=c99",
|
|
|
|
"-Wall",
|
|
|
|
"-Werror", "-Werror=strict-prototypes"],
|
|
|
|
),
|
|
|
|
Extension('ctreemanifest',
|
|
|
|
sources=[
|
|
|
|
'remotefilelog/ctreemanifest/py-treemanifest.cpp',
|
|
|
|
'remotefilelog/ctreemanifest/manifest.cpp',
|
|
|
|
'remotefilelog/ctreemanifest/manifest_entry.cpp',
|
|
|
|
'remotefilelog/ctreemanifest/manifest_fetcher.cpp',
|
|
|
|
'remotefilelog/ctreemanifest/pythonutil.cpp',
|
|
|
|
'remotefilelog/ctreemanifest/treemanifest.cpp',
|
|
|
|
],
|
|
|
|
include_dirs=[
|
|
|
|
'remotefilelog/ctreemanifest',
|
|
|
|
],
|
|
|
|
library_dirs=[
|
|
|
|
'/usr/local/lib',
|
|
|
|
'/opt/local/lib',
|
|
|
|
],
|
|
|
|
libraries=[
|
|
|
|
],
|
|
|
|
extra_compile_args=[
|
|
|
|
"-Wall",
|
|
|
|
"-Werror", "-Werror=strict-prototypes"],
|
|
|
|
),
|
2016-05-26 21:34:56 +03:00
|
|
|
Extension('cfastmanifest',
|
|
|
|
sources=['cfastmanifest.c',
|
2016-05-26 21:33:07 +03:00
|
|
|
'cfastmanifest/bsearch.c',
|
2016-08-27 01:45:43 +03:00
|
|
|
'clib/buffer.c',
|
2016-05-26 21:33:07 +03:00
|
|
|
'cfastmanifest/checksum.c',
|
|
|
|
'cfastmanifest/node.c',
|
|
|
|
'cfastmanifest/tree.c',
|
|
|
|
'cfastmanifest/tree_arena.c',
|
|
|
|
'cfastmanifest/tree_convert.c',
|
|
|
|
'cfastmanifest/tree_copy.c',
|
|
|
|
'cfastmanifest/tree_diff.c',
|
|
|
|
'cfastmanifest/tree_disk.c',
|
|
|
|
'cfastmanifest/tree_iterator.c',
|
|
|
|
'cfastmanifest/tree_path.c',
|
2016-04-19 01:40:42 +03:00
|
|
|
],
|
2016-08-27 01:45:43 +03:00
|
|
|
include_dirs=[
|
|
|
|
'cfastmanifest',
|
|
|
|
'clib',
|
|
|
|
'/usr/local/include',
|
|
|
|
'/opt/local/include',
|
2016-04-19 01:40:42 +03:00
|
|
|
],
|
|
|
|
library_dirs=[
|
|
|
|
'/usr/local/lib',
|
|
|
|
'/opt/local/lib',
|
|
|
|
],
|
|
|
|
libraries=['crypto',
|
|
|
|
],
|
2016-06-10 08:45:05 +03:00
|
|
|
extra_compile_args=[
|
|
|
|
"-std=c99",
|
|
|
|
"-Wall",
|
|
|
|
"-Werror", "-Werror=strict-prototypes"],
|
2016-08-11 00:26:05 +03:00
|
|
|
),
|
|
|
|
] + cythonize([
|
|
|
|
Extension('linelog',
|
|
|
|
sources=['linelog/pyext/linelog.pyx'],
|
|
|
|
extra_compile_args=[
|
|
|
|
'-std=c99',
|
|
|
|
'-Wall', '-Wextra', '-Wconversion', '-pedantic',
|
|
|
|
],
|
|
|
|
),
|
|
|
|
]),
|
2013-06-20 23:16:36 +04:00
|
|
|
)
|