|
5 | 5 | import glob |
6 | 6 | import os |
7 | 7 |
|
8 | | -from os.path import expanduser |
9 | | -HOMEDIR = expanduser("~") |
10 | 8 |
|
| 9 | +includedirs = [] |
| 10 | +libdirs = [] |
| 11 | +if platform.system() == "Darwin": |
| 12 | + #we are running on Mac OS X with homebrew, stuff is in specific locations: |
| 13 | + libdirs.append("/usr/local/opt/icu4c/lib") |
| 14 | + includedirs.append("/usr/local/opt/icu4c/include") |
| 15 | + libdirs.append("/usr/local/opt/libxml2/lib") |
| 16 | + includedirs.append("/usr/local/opt/libxml2/include") |
11 | 17 |
|
12 | | -includedirs = [HOMEDIR + '/local/include/','/usr/include/', '/usr/include/libxml2','/usr/local/include/' ] |
13 | | -libdirs = [HOMEDIR + '/local/lib/','/usr/lib','/usr/local/lib'] |
| 18 | +#add some common default paths |
| 19 | +includedirs += ['/usr/include/', '/usr/include/libxml2','/usr/local/include/' ] |
| 20 | +libdirs += ['/usr/lib','/usr/local/lib'] |
14 | 21 | if 'VIRTUAL_ENV' in os.environ: |
15 | 22 | includedirs.insert(0,os.environ['VIRTUAL_ENV'] + '/include') |
16 | 23 | libdirs.insert(0,os.environ['VIRTUAL_ENV'] + '/lib') |
| 24 | +if 'INCLUDE_DIRS' in os.environ: |
| 25 | + includedirs = list(os.environ['INCLUDE_DIRS'].split(':')) + includedirs |
| 26 | +if 'LIBRARY_DIRS' in os.environ: |
| 27 | + libdirs = list(os.environ['LIBRARY_DIRS'].split(':')) + libdirs |
17 | 28 |
|
18 | 29 | if platform.system() == "Darwin": |
19 | | - extra_options = ["-stdlib=libc++"] |
| 30 | + extra_options = ["--stdlib=libc++"] |
20 | 31 | else: |
21 | 32 | extra_options = [] |
22 | 33 |
|
|
32 | 43 |
|
33 | 44 | setup( |
34 | 45 | name = 'python-frog', |
35 | | - version = '0.3.5', |
| 46 | + version = '0.3.6', |
36 | 47 | author_email = "proycon@anaproy.nl", |
37 | 48 | description = ("Python binding to FROG, an NLP suite for Dutch doing part-of-speech tagging, lemmatisation, morphological analysis, named-entity recognition, shallow parsing, and dependency parsing."), |
38 | 49 | requires = ['frog (>=0.13.6)'], |
|
0 commit comments