-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from saimn/numpy-2.0
- Loading branch information
Showing
13 changed files
with
140 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import os | ||
|
||
from numpy import get_include | ||
from setuptools import Extension | ||
|
||
ROOT = os.path.relpath(os.path.dirname(__file__)) | ||
|
||
|
||
def get_extensions(): | ||
sources = [os.path.join(ROOT, "astroscrappy.pyx")] | ||
ext = Extension( | ||
name="astroscrappy.astroscrappy", | ||
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")], | ||
include_dirs=[get_include()], | ||
sources=sources, | ||
) | ||
return [ext] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,94 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=61.2", | ||
"setuptools_scm[toml]>=6.2", | ||
"extension-helpers==1.*", | ||
"numpy>=2.0.0rc1", | ||
"Cython>=3.0,<3.1", | ||
] | ||
build-backend = 'setuptools.build_meta' | ||
|
||
requires = ["setuptools", | ||
"setuptools_scm", | ||
"extension-helpers==1.*", | ||
"numpy>=1.25,<2", | ||
"Cython>=3.0,<3.1"] | ||
[project] | ||
name = "astroscrappy" | ||
readme = "README.rst" | ||
authors = [ | ||
{ name = "Curtis McCully", email = "[email protected]" }, | ||
] | ||
description = "Speedy Cosmic Ray Annihilation Package in Python" | ||
license = { text = "BSD-3-Clause" } | ||
# edit-on-github = "False" | ||
# github-project = "astropy/astroscrappy" | ||
requires-python = ">=3.9" | ||
dependencies = [ | ||
"astropy", | ||
"numpy", | ||
] | ||
dynamic = [ "version" ] | ||
|
||
build-backend = 'setuptools.build_meta' | ||
[project.urls] | ||
Homepage = "https://github.com/astropy/astroscrappy" | ||
|
||
[project.optional-dependencies] | ||
docs = ["sphinx-astropy"] | ||
test = ["Cython", "pytest-astropy", "scipy"] | ||
|
||
[tool.setuptools] | ||
license-files = ["licenses/LICENSE.rst"] | ||
include-package-data = true | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["astroscrappy*"] | ||
|
||
[tool.setuptools.package-data] | ||
"*" = [ "data/*" ] | ||
|
||
[tool.setuptools_scm] | ||
write_to = "astroscrappy/version.py" | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = ["astroscrappy", "docs"] | ||
astropy_header = true | ||
doctest_plus = "enabled" | ||
text_file_format = "rst" | ||
addopts = "-p no:warnings --doctest-rst" | ||
doctest_norecursedirs = ["*/setup_package.py"] | ||
filterwarnings = [ | ||
# action:message:category:module:lineno | ||
# "error", | ||
# "ignore:.*divide by zero encountered in double_scalars.*:RuntimeWarning:arviz", | ||
] | ||
|
||
[tool.coverage.run] | ||
source = ["astroscrappy"] | ||
plugins = [ "Cython.Coverage" ] | ||
omit = [ | ||
"astroscrappy/conftest.py", | ||
"astroscrappy/*setup_package*", | ||
"astroscrappy/tests/*", | ||
"astroscrappy/*/tests/*", | ||
"astroscrappy/version*", | ||
"*/astroscrappy/conftest.py", | ||
"*/astroscrappy/*setup_package*", | ||
"*/astroscrappy/tests/*", | ||
"*/astroscrappy/*/tests/*", | ||
"*/astroscrappy/version*", | ||
] | ||
|
||
[tool.coverage.report] | ||
exclude_lines = [ | ||
"pragma: no cover", | ||
"except ImportError", | ||
"raise AssertionError", | ||
"raise NotImplementedError", | ||
"def main\\(.*\\):", | ||
"pragma: py{ignore_python_version}", | ||
"def _ipython_key_completions_", | ||
] | ||
|
||
[tool.cibuildwheel] | ||
# Skip pypy on mac due to numpy/accelerate issues | ||
skip = ["pp*", "*musllinux*"] | ||
build-verbosity = 1 | ||
environment = { PIP_PREFER_BINARY=1 } | ||
test-requires = "pytest scipy" | ||
test-command = "pytest --pyargs astroscrappy" | ||
|
Oops, something went wrong.