Skip to content

Commit

Permalink
add some more comments to explain what i'm thinking
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Mar 21, 2018
1 parent 8d48d0a commit 9ae7284
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ def _native_toolchain(self):

def modify_environment(self, env):
env = self._native_toolchain.modify_environment(env)
# If we're going to be wrapping setup.py-based projects, we really should be
# doing it through a subclass of a distutils UnixCCompiler (in Lib/distutils
# in the CPython source) instead of hoping setup.py knows what to do. The
# default UnixCCompiler from distutils will build a 32/64-bit "fat binary"
# unless you use their undocumented ARCHFLAGS env var, and there may be more
# dragons later on.
env['CC'] = 'gcc'
env['CXX'] = 'g++'
env['ARCHFLAGS'] = '-arch x86_64'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def subsystem_dependencies(cls):

# TODO: seriously consider subclassing UnixCCompiler as well as the build_ext
# command from distutils to control the compiler and linker invocations
# transparently instead of guessing what distutils does by default.
# transparently instead of hoping distutils does the right thing.
@memoized_property
def _python_dist_build_environment(self):
return PythonDistBuildEnvironment.scoped_instance(self)
Expand Down

0 comments on commit 9ae7284

Please sign in to comment.