Skip to content

Commit cf165b8

Browse files
committed
Try to fix the missing headers problem with setuptools.
1 parent 37eba74 commit cf165b8

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

setup.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
import glob
2+
import sys
3+
24
from setuptools import setup, Extension
35

6+
def get_c_sources(include_headers=False):
7+
sources=['module.c'] + glob.glob("third-party/*.c")
8+
if include_headers:
9+
sources += glob.glob("third-party/*.h")
10+
return sources
11+
412
_quickjs = Extension('_quickjs',
513
define_macros=[('CONFIG_VERSION', '"2019-07-09"')],
6-
sources=['module.c'] + glob.glob("third-party/*.c"),
14+
# HACK.
15+
# See https://github.com/pypa/packaging-problems/issues/84.
16+
sources=get_c_sources(include_headers=("sdist" in sys.argv)),
717
headers=glob.glob("third-party/*.h"))
818

919
long_description = """
@@ -14,7 +24,7 @@
1424
author_email="[email protected]",
1525
name='quickjs',
1626
url='https://github.com/PetterS/quickjs',
17-
version='1.1.0',
27+
version='1.1.1',
1828
description='Wrapping the quickjs C library.',
1929
long_description=long_description,
2030
packages=["quickjs"],

0 commit comments

Comments
 (0)