Skip to content

Libbson no longer builds on Windows with Python 2.7 #22

@ShaneHarvey

Description

@ShaneHarvey

Libbson no longer builds on Windows with Python 2.7:

$ /cygdrive/c/python/Python27/python setup.py test
running test
running egg_info
creating python_bsonjs.egg-info
writing python_bsonjs.egg-info\PKG-INFO
writing top-level names to python_bsonjs.egg-info\top_level.txt
writing dependency_links to python_bsonjs.egg-info\dependency_links.txt
writing manifest file 'python_bsonjs.egg-info\SOURCES.txt'
reading manifest file 'python_bsonjs.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.h' under directory 'libbson'
writing manifest file 'python_bsonjs.egg-info\SOURCES.txt'
running build_ext
building 'bsonjs' extension
creating build
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\src
creating build\temp.win-amd64-2.7\Release\src\bson
creating build\temp.win-amd64-2.7\Release\src\common
creating build\temp.win-amd64-2.7\Release\src\jsonsl
C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DBS
ON_COMPILATION=1 -Isrc -Isrc/bson -Isrc/jsonsl -Isrc/common -IC:\python\Python27\include -IC:\python\Python27\PC /Tcsrc/bsonjs.c /Fob
uild\temp.win-amd64-2.7\Release\src/bsonjs.obj
bsonjs.c
c:\cygwin\home\administrator\python-bsonjs\src\bson\bson-compat.h(80) : fatal error C1083: Cannot open include file: 'stdint.h': No s
uch file or directory
error: command 'C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exi
t status 2

This was changed in libbson 1.10: https://jira.mongodb.org/browse/CDRIVER-2473 when the minimum version of Visual Studio was raised to VS2010. The Microsoft Visual C++ Compiler for Python 2.7 uses VS2008 and does not include stdint.h.

Our options are to:

  • drop support for Python 2.7 altogether
  • drop support for Python 2.7 on Windows only
  • hack up libbson to add back support for VS2008

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions