I'm trying to compile python-rapidjson with a system-wide installation of rapidjson using the --rj-include-dir.
This fails with an error message along those lines:
RapidJSON sources not found: if you cloned the git repository,
Looking at the code, this is the location, where this is triggered:
|
if not os.path.isdir(os.path.join(ROOT_PATH, 'rapidjson', 'include')): |
|
raise RuntimeError("RapidJSON sources not found: if you cloned the git repository," |
|
" you should initialize the rapidjson submodule as explained in" |
|
" the README.rst; in all other cases you may want to report the" |
|
" issue.") |
Since the --rj-include-dir option is only checked for later on, this cannot work:
|
rj_include_dir = './rapidjson/include' |
|
|
|
for idx, arg in enumerate(sys.argv[:]): |
|
if arg.startswith('--rj-include-dir='): |
|
sys.argv.pop(idx) |
|
rj_include_dir = arg.split('=', 1)[1] |
|
break |
|
|
|
extension_options = { |
|
'sources': ['./rapidjson.cpp'], |
|
'include_dirs': [rj_include_dir], |
|
'define_macros': [('PYTHON_RAPIDJSON_VERSION', VERSION)], |
|
} |
This needs to be re-arranged. Looking in os.path.join(ROOT_PATH, 'rapidjson', 'include') for the sources before even evaluating the --rj-include-dir cannot work.
I'm trying to compile python-rapidjson with a system-wide installation of rapidjson using the
--rj-include-dir.This fails with an error message along those lines:
Looking at the code, this is the location, where this is triggered:
python-rapidjson/setup.py
Lines 32 to 36 in ab10353
Since the
--rj-include-diroption is only checked for later on, this cannot work:python-rapidjson/setup.py
Lines 47 to 59 in ab10353
This needs to be re-arranged. Looking in os.path.join(ROOT_PATH, 'rapidjson', 'include') for the sources before even evaluating the --rj-include-dir cannot work.