Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["2.7", "3.5", "3.8", "3.9", "pypy3"]
python-version: ["2.7", "3.5", "3.9", "pypy3"]
include:
- python-version: "3.8"
cmake-extras: "-DCMAKE_CXX_STANDARD=17"

name: CMake Python ${{ matrix.python-version }}

Expand All @@ -66,7 +69,7 @@ jobs:
run: python -m pip install -r dev-requirements.txt pytest-github-actions-annotate-failures

- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBOOST_HISTOGRAM_ERRORS=ON
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBOOST_HISTOGRAM_ERRORS=ON ${{ matrix.cmake-extras }}

- name: Build
run: cmake --build build -j 2
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project(BOOST_HISTOGRAM LANGUAGES CXX)
# Version is added later

# Boost histogram requires C++14
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 14 CACHE STRING "The C++ standard to compile with, 14+")
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

Expand Down
2 changes: 1 addition & 1 deletion include/bh_python/register_axis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ py::class_<A> register_axis(py::module& m, Args&&... args) {

.def_property_readonly(
"size",
&A::size,
[](const A& ob){ return ob.size(); },
"Returns the number of bins excluding under- and overflow")

.def_property_readonly(
Expand Down
12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@

del sys.path[-1]

# Use the environment variable NPY_NUM_BUILD_JOBS
ParallelCompile("NPY_NUM_BUILD_JOBS").install()
# Use the environment variable CMAKE_BUILD_PARALLEL_LEVEL to control parallel builds
ParallelCompile("CMAKE_BUILD_PARALLEL_LEVEL").install()

cxx_std = int(os.environ.get("CMAKE_CXX_STANDAR", "14"))

SRC_FILES = [
"src/module.cpp",
Expand Down Expand Up @@ -42,14 +44,14 @@
"boost_histogram._core",
SRC_FILES,
include_dirs=INCLUDE_DIRS,
cxx_std=14,
cxx_std=cxx_std,
extra_compile_args=["/d2FH4-"] if sys.platform.startswith("win32") else [],
)
]


extras = {
"test": ["pytest", "pytest-benchmark", "typing_extensions"],
"test": ["pytest", "pytest-benchmark", "typing_extensions", "cloudpickle"],
"docs": [
"Sphinx~=3.0",
"recommonmark>=0.5.0",
Expand All @@ -58,7 +60,7 @@
"sphinx_copybutton",
],
"examples": ["matplotlib", "xarray", "xhistogram", "netCDF4", "numba", "uproot3"],
"dev": ["ipykernel", "cloudpickle", "typer"],
"dev": ["ipykernel", "typer"],
}
extras["all"] = sum(extras.values(), [])
extras["dev"] += extras["test"]
Expand Down