Skip to content

Commit

Permalink
Disbale C extensions for 32 bits systems
Browse files Browse the repository at this point in the history
  • Loading branch information
sdispater committed Oct 30, 2018
1 parent c35c24c commit c00ac0a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ profile.html
/docs/site/*
pyproject.lock
/poetry.lock
setup.py

# editor

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ setup: setup-python
test:
@py.test --cov=pendulum --cov-config .coveragerc tests/ -sq

release: wheels_x64 cp_wheels_x64 wheels_i686 cp_wheels_i686 wheel
release: wheels_x64 cp_wheels_x64 wheel

publish:
@poetry publish --no-build
Expand Down
3 changes: 2 additions & 1 deletion pendulum/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import pendulum
import os
import struct

from math import copysign
from datetime import datetime, date, timedelta
Expand All @@ -11,7 +12,7 @@
with_extensions = os.getenv("PENDULUM_EXTENSIONS", "1") == "1"

try:
if not with_extensions:
if not with_extensions or struct.calcsize("P") == 4:
raise ImportError()

from ._extensions._helpers import (
Expand Down
9 changes: 8 additions & 1 deletion pendulum/parsing/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
import re
import copy
import os
import re
import struct

from datetime import datetime, date, time
from dateutil import parser

from .exceptions import ParserError

with_extensions = os.getenv("PENDULUM_EXTENSIONS", "1") == "1"

try:
if not with_extensions or struct.calcsize("P") == 4:
raise ImportError()

from ._iso8601 import parse_iso8601
except ImportError:
from .iso8601 import parse_iso8601
Expand Down

0 comments on commit c00ac0a

Please sign in to comment.