Skip to content

Commit

Permalink
Adding temporary workaround for pypy3.
Browse files Browse the repository at this point in the history
The latest Cython version is intended for `numpy >= 1.17.0` but
on PyPy that version of NumPy doesn't work because of
numpy/numpy#12740
  • Loading branch information
dhermes committed Aug 7, 2019
1 parent 7e9046d commit 7813e41
Show file tree
Hide file tree
Showing 3 changed files with 44,750 additions and 4 deletions.
6 changes: 4 additions & 2 deletions setup_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

from __future__ import print_function

import collections
import copy
import distutils.ccompiler
import os
Expand All @@ -26,6 +25,7 @@
import setuptools.command.build_ext


IS_PYPY = sys.implementation.name == "pypy"
DEBUG_ENV = "DEBUG"
WHEEL_ENV = "BEZIER_WHEEL"
"""Environment variable used to indicate a wheel is being built.
Expand Down Expand Up @@ -91,6 +91,8 @@
FORTRAN_SOURCE_FILENAME = os.path.join("src", "bezier", "{}.f90")
OBJECT_FILENAME = os.path.join("src", "bezier", "{}.o")
SPEEDUP_FILENAME = os.path.join("src", "bezier", "_speedup.c")
if IS_PYPY:
SPEEDUP_FILENAME = os.path.join("src", "bezier", "_pypy_speedup.c")


def gfortran_search_path(library_dirs):
Expand Down Expand Up @@ -227,7 +229,7 @@ def patch_f90_compiler(f90_compiler):

# Only ``gfortran``.
if not isinstance(f90_compiler, gnu.Gnu95FCompiler):
return False
return

f90_compiler.compiler_f77[:] = _update_flags(
f90_compiler.compiler_f77, remove_flags=("-Werror",)
Expand Down
Loading

0 comments on commit 7813e41

Please sign in to comment.