Skip to content

Commit c9e81c0

Browse files
authored
ci: fix Win PyPy and Py2 builds (#467)
* fix: doc issues breaking Windows Py2 wheels * fix: cleaner SDist - still has tests for conda-forge to test with * chore: bump pre-commit versions * chore: add some trove classifiers
1 parent defaee7 commit c9e81c0

File tree

11 files changed

+44
-19
lines changed

11 files changed

+44
-19
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ repos:
55
- id: black
66

77
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v3.2.0
8+
rev: v3.3.0
99
hooks:
1010
- id: check-added-large-files
1111
- id: check-case-conflict
@@ -26,20 +26,20 @@ repos:
2626
additional_dependencies: [pyyaml]
2727

2828
- repo: https://github.com/pycqa/flake8
29-
rev: 3.8.3
29+
rev: 3.8.4
3030
hooks:
3131
- id: flake8
3232
exclude: docs/conf.py
3333
additional_dependencies: [flake8-bugbear, flake8-print]
3434

3535
- repo: https://github.com/pre-commit/mirrors-mypy
36-
rev: v0.782
36+
rev: v0.790
3737
hooks:
3838
- id: mypy
3939
files: src
4040

4141
- repo: https://github.com/mgedmin/check-manifest
42-
rev: "0.43"
42+
rev: "0.44"
4343
hooks:
4444
- id: check-manifest
4545
stages: [manual]

MANIFEST.in

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
graft include
2-
graft scripts
32
graft src
43
graft tests
5-
graft docs
64

75
graft extern/assert/include
86
graft extern/config/include
@@ -17,14 +15,12 @@ graft extern/pybind11/tools
1715
graft extern/pybind11/pybind11
1816
include extern/pybind11/CMakeLists.txt
1917

20-
prune docs/_build
21-
2218
global-exclude .git*
2319
global-exclude .pytest_cache
2420
global-exclude .DS_Store
2521
global-exclude .ipynb_checkpoints
2622
global-exclude *.py[co]
2723
global-exclude __pycache__
2824

29-
include CMakeLists.txt LICENSE README.md setup.py setup_helpers.py dev-requirements.txt setup.cfg pyproject.toml CONTRIBUTING.md
25+
include CMakeLists.txt LICENSE README.md setup.py setup.cfg pyproject.toml
3026
recursive-include extern *LICENSE*

docs/conf.py

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,16 @@
1717
import os
1818
import re
1919

20+
# Docs require Python 3.6+ to generate
21+
from pathlib import Path
22+
23+
import shutil
2024
import sys
2125

22-
DIR = os.path.abspath(os.path.dirname(__file__))
23-
BASEDIR = os.path.abspath(os.path.dirname(DIR))
24-
sys.path.append(os.path.join(BASEDIR, "src"))
26+
DIR = Path(__file__).parent.resolve()
27+
BASEDIR = DIR.parent
28+
29+
sys.path.append(str(BASEDIR / "src"))
2530

2631
# -- Project information -----------------------------------------------------
2732

@@ -112,3 +117,27 @@
112117
# Simpler docs (no build required)
113118

114119
autodoc_mock_imports = ["boost_histogram._core"]
120+
121+
122+
def prepare(app):
123+
outer = BASEDIR / "notebooks"
124+
inner = DIR / "notebooks"
125+
notebooks = outer.glob("*.ipynb")
126+
127+
for notebook in notebooks:
128+
shutil.copy(notebook, inner / notebook.name)
129+
130+
131+
def clean_up(app, exception):
132+
inner = DIR / "notebooks"
133+
for notebook in inner.glob("*.ipynb"):
134+
notebook.unlink()
135+
136+
137+
def setup(app):
138+
139+
# Copy the notebooks in
140+
app.connect("builder-inited", prepare)
141+
142+
# Clean up the generated notebooks
143+
app.connect("build-finished", clean_up)

docs/notebooks/BoostHistogramHandsOn.ipynb

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/notebooks/PerformanceComparison.ipynb

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/notebooks/SimpleExample.ipynb

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/notebooks/ThreadedFills.ipynb

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/notebooks/aghast.ipynb

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/notebooks/xarray.ipynb

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
ipython
12
nbsphinx
23
numpy
34
recommonmark>=0.5.0
4-
Sphinx>=2.0.0
5+
Sphinx>=3.0.0
56
sphinx-book-theme>=0.0.33
67
sphinx_copybutton

0 commit comments

Comments
 (0)