[fix] path in setup.py
This commit is contained in:
@@ -332,10 +332,10 @@ libpostal needs to download some data files from S3. This is done automatically
|
|||||||
when you run make. Mapzen maintains an S3 bucket containing said data files
|
when you run make. Mapzen maintains an S3 bucket containing said data files
|
||||||
but they can also be built manually.
|
but they can also be built manually.
|
||||||
|
|
||||||
To install via Python, just use:
|
To install via Python, you should first install the C library and then run:
|
||||||
|
|
||||||
```
|
```
|
||||||
pip install git+https://github.com/openvenues/libpostal.git
|
python setup.py install
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note**: The Python bindings don't implement libpostal's full API currently.
|
**Note**: The Python bindings don't implement libpostal's full API currently.
|
||||||
|
|||||||
6
setup.py
6
setup.py
@@ -1,8 +1,10 @@
|
|||||||
import os
|
import os
|
||||||
|
import subprocess
|
||||||
|
|
||||||
from setuptools import setup, Extension, find_packages
|
from setuptools import setup, Extension, find_packages
|
||||||
|
|
||||||
SRC_DIR = 'src'
|
SRC_DIR = 'src'
|
||||||
|
this_dir = os.path.realpath(os.path.dirname(__file__))
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@@ -21,7 +23,7 @@ def main():
|
|||||||
'utf8proc/utf8proc.c',
|
'utf8proc/utf8proc.c',
|
||||||
)
|
)
|
||||||
] + ['python/postal/text/pytokenize.c'],
|
] + ['python/postal/text/pytokenize.c'],
|
||||||
include_dirs=['.'],
|
include_dirs=[this_dir],
|
||||||
extra_compile_args=['-O0', '-std=c99',
|
extra_compile_args=['-O0', '-std=c99',
|
||||||
'-Wno-unused-function'],
|
'-Wno-unused-function'],
|
||||||
),
|
),
|
||||||
@@ -37,7 +39,7 @@ def main():
|
|||||||
'trie.c',
|
'trie.c',
|
||||||
'trie_search.c',)
|
'trie_search.c',)
|
||||||
] + ['python/postal/text/pynormalize.c'],
|
] + ['python/postal/text/pynormalize.c'],
|
||||||
include_dirs=['.'],
|
include_dirs=[this_dir],
|
||||||
extra_compile_args=['-std=c99', '-DHAVE_CONFIG_H',
|
extra_compile_args=['-std=c99', '-DHAVE_CONFIG_H',
|
||||||
'-Wno-unused-function'],
|
'-Wno-unused-function'],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user