Skip to content
Snippets Groups Projects
Commit ac9e1cbe authored by Nathaniel Manista's avatar Nathaniel Manista
Browse files

Merge pull request #4830 from soltanmm/going-slightly-mad

Fix broken Python package builds.
parents d7745f09 14a0a93c
No related branches found
No related tags found
No related merge requests found
...@@ -39,17 +39,7 @@ import sys ...@@ -39,17 +39,7 @@ import sys
import setuptools import setuptools
from setuptools.command import build_py from setuptools.command import build_py
from setuptools.command import test from setuptools.command import test
from setuptools.command import build_ext
# Because we need to support building without Cython but simultaneously need to
# subclass its command class when we need to and because distutils requires a
# special hook to acquire a command class, we attempt to import Cython's
# build_ext, and if that fails we import setuptools'.
try:
# Due to the strange way Cython's Distutils module re-imports build_ext, we
# import the build_ext class directly.
from Cython.Distutils.build_ext import build_ext
except ImportError:
from setuptools.command.build_ext import build_ext
PYTHON_STEM = os.path.dirname(os.path.abspath(__file__)) PYTHON_STEM = os.path.dirname(os.path.abspath(__file__))
...@@ -179,7 +169,7 @@ class BuildPy(build_py.build_py): ...@@ -179,7 +169,7 @@ class BuildPy(build_py.build_py):
build_py.build_py.run(self) build_py.build_py.run(self)
class BuildExt(build_ext): class BuildExt(build_ext.build_ext):
"""Custom build_ext command to enable compiler-specific flags.""" """Custom build_ext command to enable compiler-specific flags."""
C_OPTIONS = { C_OPTIONS = {
...@@ -196,7 +186,7 @@ class BuildExt(build_ext): ...@@ -196,7 +186,7 @@ class BuildExt(build_ext):
if compiler in BuildExt.LINK_OPTIONS: if compiler in BuildExt.LINK_OPTIONS:
for extension in self.extensions: for extension in self.extensions:
extension.extra_link_args += list(BuildExt.LINK_OPTIONS[compiler]) extension.extra_link_args += list(BuildExt.LINK_OPTIONS[compiler])
build_ext.build_extensions(self) build_ext.build_ext.build_extensions(self)
class Gather(setuptools.Command): class Gather(setuptools.Command):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment