Add env vars to build with system double-conversion. Fixes #376 and is useful to Linux distribution packagers.
New environment variables UJSON_BUILD_DC_INCLUDES and UJSON_BUILD_DC_LIBS allow overriding the include path for double-conversion and adding linker flags for an external double-conversion library. They should generally be used together.
Before this commit, debug info is stripped unconditionally on Linux.
This commit adds an environment variable `UJSON_BUILD_NO_STRIP` that disables this behavior. This is helpful for distribution packagers who would otherwise have to patch `setup.py` to prevent stripping.
- remove lib double-conversion building, no need to build it separately.
otherwise, when there's a system-wide double-conversion lib, it's hard
to specific this bundled/wrapped double-conversion lib.
- some format fixup
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
To fix issues with floating-point precision we've made use of Google's
double-conversion lib to handle conversions of doubles to and from strings.
In addition to fixing our precision problems this will improve double
encoding by 4-5x. Decoding is however slightly slower according to the
benchmarks - but accurate at least.
This change removes the double_precision encoding option and the
precise_float decoding option.
this fixes issue #179.
setuptools should itself know when to use cache or create a
new build... however if someone wants to override that, it's
still possible but forcefully doing that on whatever
setuptools target will (and does) introduce problems.
Build directory should be cleaned up via the clean sub-command.
examples:
- clean up temp:
python setup.py clean
- clean up whole build dir
python setup.py clean -a
Or if somebody wants to, the build dir could be removed on the
shell.
both Python 2 and Python 3, removing the need for 2to3 to be run. This
indirectly fixes #177.
* Corrected a duplicate-named method in the unit testing code. Corrected the
now-exposed broken logic that wasn't being tested. This was
highlighted in #186 but the author did not appear to realise that the
method name was being masked in the unit test class.
* Corrected the test case skipping logic to use unittest.skipIf instead
of just returning from the method upon an ImportError so that the skip
can actually be registered as a skipped test instead of a passed test.
* Updated the tests to additionally run on Python 3.5 on Travis. This
covers #195.
* Merged the two benchmarking files into one, and modularised the code.
Also added native RST output so the benchmarking results can be placed
directly into the README file.