From 25b3338600361aad644aa20e29bbbf12c10dcfdc Mon Sep 17 00:00:00 2001 From: Al Date: Sun, 20 Sep 2015 20:07:59 -0400 Subject: [PATCH] [setup] setup.py for pypostal so it can be installed from the Github url --- setup.py | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 setup.py diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..72e8511d --- /dev/null +++ b/setup.py @@ -0,0 +1,41 @@ +import os + +from setuptools import setup, Extension, find_packages + +SRC_DIR = 'src' + + +def main(): + setup( + name='postal', + version='0.1', + install_requires=[ + 'six', + ], + ext_modules=[ + Extension('postal.text._tokenize', + sources=[ + os.path.join(SRC_DIR, 'scanner.c'), + os.path.join(SRC_DIR, 'string_utils.c'), + os.path.join(SRC_DIR, 'tokens.c'), + os.path.join(SRC_DIR, 'utf8proc/utf8proc.c'), + 'python/postal/text/pytokenize.c', + ], + include_dirs=[SRC_DIR], + extra_compile_args=['-O0'], + ), + + ], + packages=find_packages(), + include_package_data=True, + zip_safe=False, + url='http://mapzen.com', + description='Fast address standardization and deduplication', + license='MIT License', + maintainer='mapzen.com', + maintainer_email='pelias@mapzen.com' + ) + + +if __name__ == '__main__': + main()