-
Notifications
You must be signed in to change notification settings - Fork 44
BLD/DEV: use meson-python, add a basic Pixi workspace #373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lucascolley
wants to merge
1
commit into
data-apis:main
Choose a base branch
from
lucascolley:pixi
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,78 @@ | ||
| project( | ||
| 'array_api_compat', | ||
| version: '1.15.0.dev0', | ||
| license: 'MIT', | ||
| license_files: ['LICENSE'] | ||
| ) | ||
|
|
||
| py = import('python').find_installation() | ||
|
|
||
| sources_raw = { | ||
| 'array_api_compat': [ | ||
| 'src/array_api_compat/__init__.py', | ||
| 'src/array_api_compat/_internal.py', | ||
| ], | ||
|
|
||
| 'array_api_compat/common': [ | ||
| 'src/array_api_compat/common/__init__.py', | ||
| 'src/array_api_compat/common/_aliases.py', | ||
| 'src/array_api_compat/common/_fft.py', | ||
| 'src/array_api_compat/common/_helpers.py', | ||
| 'src/array_api_compat/common/_linalg.py', | ||
| 'src/array_api_compat/common/_typing.py', | ||
| ], | ||
|
|
||
| 'array_api_compat/cupy': [ | ||
| 'src/array_api_compat/cupy/__init__.py', | ||
| 'src/array_api_compat/cupy/_aliases.py', | ||
| 'src/array_api_compat/cupy/_info.py', | ||
| 'src/array_api_compat/cupy/_typing.py', | ||
| 'src/array_api_compat/cupy/fft.py', | ||
| 'src/array_api_compat/cupy/linalg.py', | ||
| ], | ||
|
|
||
| 'array_api_compat/dask': [ | ||
| 'src/array_api_compat/dask/__init__.py', | ||
| ], | ||
|
|
||
| 'array_api_compat/dask/array': [ | ||
| 'src/array_api_compat/dask/array/__init__.py', | ||
| 'src/array_api_compat/dask/array/_aliases.py', | ||
| 'src/array_api_compat/dask/array/_info.py', | ||
| 'src/array_api_compat/dask/array/fft.py', | ||
| 'src/array_api_compat/dask/array/linalg.py', | ||
| ], | ||
|
|
||
| 'array_api_compat/numpy': [ | ||
| 'src/array_api_compat/numpy/__init__.py', | ||
| 'src/array_api_compat/numpy/_aliases.py', | ||
| 'src/array_api_compat/numpy/_info.py', | ||
| 'src/array_api_compat/numpy/_typing.py', | ||
| 'src/array_api_compat/numpy/fft.py', | ||
| 'src/array_api_compat/numpy/linalg.py', | ||
| ], | ||
|
|
||
| 'array_api_compat/torch': [ | ||
| 'src/array_api_compat/torch/__init__.py', | ||
| 'src/array_api_compat/torch/_aliases.py', | ||
| 'src/array_api_compat/torch/_info.py', | ||
| 'src/array_api_compat/torch/_typing.py', | ||
| 'src/array_api_compat/torch/fft.py', | ||
| 'src/array_api_compat/torch/linalg.py', | ||
| ], | ||
| } | ||
|
|
||
| sources = {} | ||
| foreach subdir, paths : sources_raw | ||
| sources += { subdir : files(paths) } | ||
| endforeach | ||
|
|
||
| foreach subdir, files : sources | ||
| py.install_sources(files, subdir: subdir) | ||
| endforeach | ||
|
|
||
| subdir('tests') | ||
|
|
||
| if get_option('vendor_tests') | ||
| subdir('vendor_test') | ||
| endif |
This file contains hidden or 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,6 @@ | ||
| option( | ||
| 'vendor_tests', | ||
| type: 'boolean', | ||
| value: false, | ||
| description: 'Install vendoring tests.' | ||
| ) |
This file contains hidden or 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,60 @@ | ||
| [workspace] | ||
| channels = ["https://prefix.dev/conda-forge"] | ||
| platforms = ["linux-64", "osx-arm64", "win-64"] | ||
| preview = ["pixi-build"] | ||
|
|
||
| ### array-api-compat package definition ### | ||
|
|
||
| [package.build.backend] | ||
| name = "pixi-build-python" | ||
| version = "*" | ||
|
|
||
| [package.build.config] | ||
| extra-args = ["-Csetup-args=-Dvendor_tests=true"] | ||
|
|
||
| [package.host-dependencies] | ||
| uv = "*" | ||
| meson-python = "*" | ||
|
|
||
| ### workspace environments ### | ||
|
|
||
| [environments] | ||
| docs = ["docs"] | ||
| tests = ["tests"] | ||
|
|
||
| ### default feature definition ### | ||
|
|
||
| [dev] | ||
| # this pulls in array-api-compat's host dependencies | ||
| array-api-compat.path = "." | ||
|
|
||
| [dependencies] | ||
| array-api-compat.path = "." | ||
|
|
||
| ### non-default feature definitions ### | ||
|
|
||
| [feature.tests.dependencies] | ||
| pytest = "*" | ||
| array-api-strict = "*" | ||
| numpy = "*" | ||
|
|
||
| [feature.tests.tasks.tests] | ||
| cmd = "pytest -v" | ||
| depends-on = ["setup_vendor_test"] | ||
| description = "Run tests" | ||
|
|
||
| [feature.tests.tasks.setup_vendor_test] | ||
| cmd = "mkdir -p subprojects/array_api_compat && cp meson.build subprojects/array_api_compat && sed -i '' '/^[[:space:]]*subdir/d' subprojects/array_api_compat/meson.build && cp meson_options.txt subprojects/array_api_compat && cp LICENSE subprojects/array_api_compat && cp -R src subprojects/array_api_compat/" | ||
| inputs = ["meson.build", "LICENSE", "src"] | ||
| outputs = ["subprojects/array_api_compat"] | ||
|
|
||
| [feature.docs.dependencies] | ||
| furo = "*" | ||
| linkify-it-py = "*" | ||
| myst-parser = "*" | ||
| sphinx = "*" | ||
| sphinx-copybutton = "*" | ||
| sphinx-autobuild = "*" | ||
|
|
||
| [feature.docs.tasks] | ||
| docs = { cmd = "make html", cwd = "docs", description = "Build docs" } |
This file contains hidden or 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or 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 @@ | ||
| Meson subprojects directory, for use in vendoring tests. |
This file contains hidden or 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 @@ | ||
| py.install_sources([ | ||
| '__init__.py', | ||
| '_helpers.py', | ||
| 'test_all.py', | ||
| 'test_array_namespace.py', | ||
| 'test_common.py', | ||
| 'test_copies_or_views.py', | ||
| 'test_cupy.py', | ||
| 'test_dask.py', | ||
| 'test_isdtype.py', | ||
| 'test_jax.py', | ||
| 'test_no_dependencies.py', | ||
| 'test_torch.py', | ||
| 'test_vendoring.py', | ||
| ], | ||
| subdir: 'array_api_compat/tests' | ||
| ) |
This file contains hidden or 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 hidden or 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,20 @@ | ||
| py.install_sources([ | ||
| '__init__.py', | ||
| 'uses_cupy.py', | ||
| 'uses_dask.py', | ||
| 'uses_numpy.py', | ||
| 'uses_torch.py', | ||
| ], | ||
| subdir: 'array_api_compat/vendor_test' | ||
| ) | ||
|
|
||
| py.install_sources( | ||
| ['__init__.py'], | ||
| subdir: 'vendored_array_api_compat' | ||
| ) | ||
|
|
||
| vendored_compat = subproject('array_api_compat') | ||
| vendored_compat_sources = vendored_compat.get_variable('sources') | ||
| foreach prefix, files : vendored_compat_sources | ||
| py.install_sources(files, subdir: 'vendored_array_api_compat' / prefix) | ||
| endforeach |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Empty file.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.