Skip to content

Commit 10b57d6

Browse files
authored
Merge pull request #41 from jkyeung/patch-3
Compile `direct.c` only on PASE
2 parents bbd67c0 + 79cc953 commit 10b57d6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from setuptools import setup, find_packages, Extension
2+
from platform import system
23

34

45
setup(
@@ -16,7 +17,7 @@
1617
ext_modules=[
1718
Extension('itoolkit/transport/_direct',
1819
['src/itoolkit/transport/direct.c'])
19-
],
20+
] if system() == 'OS400' else [],
2021
classifiers=[
2122
"License :: OSI Approved :: MIT License",
2223
"Programming Language :: Python :: 2.7",

src/itoolkit/transport/direct.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
from .base import XmlServiceTransport
44
try:
55
from . import _direct
6+
# Guard against the dummy version of _direct (for non-PASE builds)
67
_available = hasattr(_direct, '_xmlservice')
78
except ImportError:
8-
# For Sphinx build
99
_available = False
1010

1111
__all__ = [

0 commit comments

Comments
 (0)