Skip to content

Commit

Permalink
Merge 9c9a29f into 812009c
Browse files Browse the repository at this point in the history
  • Loading branch information
lwgordonimos committed Jul 24, 2019
2 parents 812009c + 9c9a29f commit 51489fa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
six
cftime!=1.0.2.1
cython
numpy
numpy<1.17.0
antlr4-python3-runtime==4.7.2; python_version >= '3'

# udunits2 cannot be installed with pip, and it is expected to be installed separately.
11 changes: 9 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,15 @@ def numpy_build_ext(pars):

class build_ext(_build_ext):
def finalize_options(self):
# See https://github.com/erikrose/nose-progressive/pull/54
def _set_builtin(name, value):
if isinstance(__builtins__, dict):
__builtins__[name] = value
else:
setattr(__builtins__, name, value)

_build_ext.finalize_options(self)
__builtins__.__NUMPY_SETUP__ = False
_set_builtin('__NUMPY_SETUP__', False)
import numpy
self.include_dirs.append(numpy.get_include())

Expand Down Expand Up @@ -137,7 +144,7 @@ def finalize_options(self):
package_data={'cf_units': list(file_walk_relative('cf_units/etc',
remove='cf_units/'))},
install_requires=load('requirements.txt'),
setup_requires=['pytest-runner', 'numpy'],
setup_requires=['pytest-runner', 'numpy<1.17.0'],
tests_require=load('requirements-dev.txt'),
test_suite='cf_units.tests',
cmdclass=cmdclass,
Expand Down

0 comments on commit 51489fa

Please sign in to comment.