Skip to content

Commit

Permalink
Make numba and scipy optional in pip; closes #152 (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
moble authored Nov 2, 2020
1 parent dfa536c commit 54f05ae
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 20 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
name: tests

on:
push:
paths-ignore:
- 'LICENSE'
- 'MANIFEST.in'
- 'README.md'
- 'docs/**'
- 'mkdocs.yml'
- '.readthedocs.yml'
pull_request:
types: [opened, reopened, ready_for_review, review_requested]
on: [push]

jobs:
build_wheels:
Expand All @@ -23,7 +13,7 @@ jobs:
os: [ubuntu-18.04, windows-latest, macos-latest]

env:
CIBW_SKIP: cp27-* cp35-* pp27-* pp36-*
CIBW_SKIP: cp27-* cp35-* pp*
CIBW_BEFORE_BUILD: python -c "print(('#'*140+'\n')*10)" && pip install "numpy>=1.13"
CIBW_TEST_REQUIRES: pytest pytest-cov
CIBW_TEST_COMMAND: "pytest {project}/tests"
Expand Down
12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


# Set this first for easier replacement
version = "2020.9.5.14.42.2"
version = "2020.11.2.17.0.49"

if "win" in platform.lower() and not "darwin" in platform.lower():
extra_compile_args = ["/O2"]
Expand Down Expand Up @@ -55,15 +55,17 @@
ext_modules=extensions,
install_requires=[
"numpy>=1.13",
"scipy",
# See also :environment_marker specs below
# See also extras and :environment_marker specs below
],
extras_require={
":python_version < '3.6' and platform_python_implementation != 'PyPy'": [
"scipy": [
"scipy",
],
"numba:python_version < '3.6' and platform_python_implementation != 'PyPy'": [
"numba<0.49.0",
"llvmlite<0.32.0",
],
":python_version >= '3.6' and platform_python_implementation != 'PyPy'": [
"numba:python_version >= '3.6' and platform_python_implementation != 'PyPy'": [
"numba",
],
"docs": [
Expand Down
2 changes: 1 addition & 1 deletion src/quaternion/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2020, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/quaternion/blob/master/LICENSE>

__version__ = "2020.9.5.14.42.2"
__version__ = "2020.11.2.17.0.49"
__doc_title__ = "Quaternion dtype for NumPy"
__doc__ = "Adds a quaternion dtype to NumPy."
__all__ = ['quaternion',
Expand Down
4 changes: 2 additions & 2 deletions src/quaternion/calculus.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ def fd_indefinite_integral(f, t):

def fd_definite_integral(f, t):
Sfdt = np.zeros_like(f)
Sfdt[1:, ...] = (f[1:, ...] + f[:-1, ...]) * ((t[1:] - t[:-1]) / 2.0)
return np.sum(Sfdt)
Sfdt[1:, ...] = (f[1:, ...] + f[:-1, ...]) * ((t[1:] - t[:-1]) / 2.0).reshape((-1,) + (1,)*(f.ndim-1))
return np.sum(Sfdt, axis=0)


def spline_evaluation(f, t, t_out=None, axis=None, spline_degree=3,
Expand Down

0 comments on commit 54f05ae

Please sign in to comment.