Run the vendor.sh script from the root directory of python-bsonjs (this will clone mongo-c-driver into the same directory where python-bsonjs is cloned). Be aware that if you wish to change the version of libbson that you are vendoring, you must change line 6 to git checkout <your version tag>
Then you have compare the previous version of bson-config.h with the new one and copy over the chunks of code that are still relevant. ie. if bson-config.h has a line #define BSON_BYTE_ORDER 1234 then you know that you have to copy over this chunk because this tells us what operating systems that is actually defined on:
* Define to 1234 for Little Endian, 4321 for Big Endian.
*/
#ifdef WORDS_BIGENDIAN
# define BSON_BYTE_ORDER 4321
#else
# define BSON_BYTE_ORDER 1234
#endif
Then copy all the .h/.c files from your cmake-build directory and from src/libbson/src to the corresponding folders in python-bsonjs (should be src/bson/ or src/jsonsl/)
Instructions for re-vendoring libbson:
vendor.sh
script from the root directory ofpython-bsonjs
(this will clonemongo-c-driver
into the same directory wherepython-bsonjs
is cloned). Be aware that if you wish to change the version oflibbson
that you are vendoring, you must change line 6 togit checkout <your version tag>
bson-config.h
with the new one and copy over the chunks of code that are still relevant. ie. ifbson-config.h
has a line#define BSON_BYTE_ORDER 1234
then you know that you have to copy over this chunk because this tells us what operating systems that is actually defined on: