Skip to content

Commit

Permalink
One last cleanup of improved setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-rose committed Jul 3, 2019
1 parent 0586161 commit feacd42
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os, sys
import textwrap
import os

VERSION = '0.7.5'

Expand All @@ -13,11 +12,10 @@ def readme():
with open('README.rst') as f:
return f.read()

# Patch the GNU Fortran compiler not to optimize certain sources
def patch_gnu_fortran():
#from numpy.distutils.fcompiler import gnu
# Patch the Fortran compiler not to optimize certain sources
def patch_fortran():
# This should work for all subclasses of FCompiler
from numpy.distutils import fcompiler
#.fcompiler import FCompiler

def monkeypatched_spawn(old_spawn):
def spawn(self, cmd, *args, **kw):
Expand All @@ -34,9 +32,6 @@ def spawn(self, cmd, *args, **kw):

return old_spawn(self, cmd, *args, **kw)
return spawn

#gnu.GnuFCompiler.spawn = monkeypatched_spawn(gnu.GnuFCompiler.spawn)
#gnu.Gnu95FCompiler.spawn = monkeypatched_spawn(gnu.Gnu95FCompiler.spawn)
fcompiler.FCompiler.spawn = monkeypatched_spawn(fcompiler.FCompiler.spawn)

def configuration(parent_package='',top_path=None):
Expand Down Expand Up @@ -77,7 +72,7 @@ def setup_package():
# higher up in this file.
from setuptools import setup

patch_gnu_fortran()
patch_fortran()

if run_build:
from numpy.distutils.core import setup
Expand Down

0 comments on commit feacd42

Please sign in to comment.