mirror of https://github.com/go-python/gopy.git
Enforce the extension module in setup.py
Without this change, [cibuildwheel](https://github.com/pypa/cibuildwheel) cannot build a correct wheel from the generated project. The problem is that the native lib is added by `MANIFEST.in` and `python3 -m pip wheel` ignores it and thinks that the package is pure Python. Thefore it builds a pure wheel and the packaging pipeline crashes.
This commit is contained in:
parent
5271841b4c
commit
d314ab95bb
|
@ -19,6 +19,12 @@ const (
|
|||
with open("README.md", "r") as fh:
|
||||
long_description = fh.read()
|
||||
|
||||
|
||||
class BinaryDistribution(setuptools.Distribution):
|
||||
def has_ext_modules(_):
|
||||
return True
|
||||
|
||||
|
||||
setuptools.setup(
|
||||
name="%[1]s%[2]s",
|
||||
version="%[3]s",
|
||||
|
@ -35,6 +41,7 @@ setuptools.setup(
|
|||
"Operating System :: OS Independent",
|
||||
],
|
||||
include_package_data=True,
|
||||
distclass=BinaryDistribution,
|
||||
)
|
||||
`
|
||||
|
||||
|
|
Loading…
Reference in New Issue