We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62dbc4c commit 96ec0d2Copy full SHA for 96ec0d2
1 file changed
setup.py
@@ -1,4 +1,12 @@
1
from setuptools import setup, Extension
2
+import sys
3
+
4
+# On Linux, iconv is part of glibc and doesn't need separate linkage
5
+# Otherwise, link against libiconv
6
+if sys.platform.startswith('linux'):
7
+ libraries = []
8
+else:
9
+ libraries = ["iconv"]
10
11
setup(
12
name="python-iconv",
@@ -15,5 +23,5 @@
15
23
all iconv-provided encodings.
16
24
""",
17
25
py_modules=["iconvcodec"],
18
- ext_modules=[Extension("iconv", sources=["iconvmodule.c"], libraries=["iconv"])],
26
+ ext_modules=[Extension("iconv", sources=["iconvmodule.c"], libraries=libraries)],
19
27
)
0 commit comments