Skip to content

Commit

Permalink
Error when compiling for 32-bit windows builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrist committed May 28, 2024
1 parent 5e4068c commit 2c37da0
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
import sys
import os

from setuptools import setup
from setuptools.extension import Extension

import versioneer

# Check for 32-bit windows builds, which currently aren't supported. We can't
# rely on `platform.architecture` here since users can still run 32-bit python
# builds on 64 bit architectures.
if sys.platform == "win32" and sys.maxsize == (2**31 - 1):
import textwrap

error = """
====================================================================
`msgspec` currently doesn't support 32-bit Python windows builds. If
this is important for your use case, please open an issue on GitHub:
https://github.com/jcrist/msgspec/issues
====================================================================
"""
print(textwrap.dedent(error))
exit(1)


SANITIZE = os.environ.get("MSGSPEC_SANITIZE", False)
COVERAGE = os.environ.get("MSGSPEC_COVERAGE", False)
DEBUG = os.environ.get("MSGSPEC_DEBUG", SANITIZE or COVERAGE)
Expand Down

0 comments on commit 2c37da0

Please sign in to comment.