Skip to content

Commit

Permalink
Merge pull request #3951 from neutrinoceros/housekeeping
Browse files Browse the repository at this point in the history
MNT: housekeeping
  • Loading branch information
matthewturk authored Jun 8, 2022
2 parents c0c5de4 + ae9f39c commit 20b55c3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 26 deletions.
11 changes: 0 additions & 11 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,17 +186,6 @@ def pytest_configure(config):
),
)

if find_spec("xarray") is not None:
# this can be removed when upstream issue is closed and a fix published
# https://github.com/pydata/xarray/issues/6092
config.addinivalue_line(
"filterwarnings",
(
"ignore:distutils Version classes are deprecated. "
"Use packaging.version instead.:DeprecationWarning"
),
)


def pytest_collection_modifyitems(config, items):
r"""
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
requires = [
"setuptools>=19.6",
"setuptools>=59.0.1",
# see https://github.com/numpy/numpy/pull/18389
"wheel>=0.36.2",

Expand Down
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ install_requires =
numpy>=1.14.5
packaging>=20.9
pyparsing>0.0 # hard dependency to MPL. We require it (unconstrained) in case MPL drops it in the future
setuptools>=19.6
tomli>=1.2.3
tomli-w>=0.4.0
tqdm>=3.4.0
Expand Down Expand Up @@ -121,7 +120,6 @@ typecheck =
types-chardet==4.0.0
types-requests==2.25.9
types-setuptools==57.4.0
types-toml==0.10.0

[flake8]
max-line-length = 88
Expand Down
25 changes: 13 additions & 12 deletions setupext.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import contextlib
import glob
import logging
import os
import platform
import shutil
Expand All @@ -8,17 +9,17 @@
import tempfile
from textwrap import dedent
from concurrent.futures import ThreadPoolExecutor
from distutils import log
from distutils.ccompiler import CCompiler, new_compiler
from distutils.errors import CompileError, LinkError
from distutils.sysconfig import customize_compiler
from subprocess import PIPE, Popen
from sys import platform as _platform

from pkg_resources import resource_filename
from setuptools.command.build_ext import build_ext as _build_ext
from setuptools.command.sdist import sdist as _sdist
from setuptools.errors import CompileError, LinkError

log = logging.getLogger("setupext")

@contextlib.contextmanager
def stdchannel_redirected(stdchannel, dest_filename):
Expand Down Expand Up @@ -114,14 +115,14 @@ def check_for_openmp():
if len(output) == nthreads:
using_openmp = True
else:
log.warn(
log.warning(
"Unexpected number of lines from output of test "
"OpenMP program (output was %s)",
output,
)
using_openmp = False
else:
log.warn(
log.warning(
"Unexpected output from test OpenMP program (output was %s)", output
)
using_openmp = False
Expand All @@ -132,9 +133,9 @@ def check_for_openmp():
os.chdir(start_dir)

if using_openmp:
log.warn("Using OpenMP to compile parallel extensions")
log.warning("Using OpenMP to compile parallel extensions")
else:
log.warn(
log.warning(
"Unable to compile OpenMP test program so Cython\n"
"extensions will be compiled without parallel support"
)
Expand Down Expand Up @@ -193,7 +194,7 @@ def check_CPP14_flags(possible_compile_flags):
if check_CPP14_flag([flags]):
return flags

log.warn(
log.warning(
"Your compiler seems to be too old to support C++14. "
"yt may not be able to compile. Please use a newer version."
)
Expand Down Expand Up @@ -294,18 +295,18 @@ def read_embree_location():
exit_code = p.returncode

if exit_code != 0:
log.warn(
log.warning(
"Pyembree is installed, but I could not compile Embree test code."
)
log.warn("The error message was: ")
log.warn(err)
log.warn(fail_msg)
log.warning("The error message was: ")
log.warning(err)
log.warning(fail_msg)

# Clean up
file.close()

except OSError:
log.warn(
log.warning(
"read_embree_location() could not find your C compiler. "
"Attempted to use '%s'.",
compiler,
Expand Down

0 comments on commit 20b55c3

Please sign in to comment.