Skip to content

Commit

Permalink
Automatic installation of build/install requirements.
Browse files Browse the repository at this point in the history
  • Loading branch information
hameerabbasi committed Feb 4, 2025
1 parent 9e9f2cb commit 66db99d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 17 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
schedule:
# At 09:00 on Monday. (see https://crontab.guru)
- cron: '0 9 * * 1'
pull_request:
branches:
- main

defaults:
run:
Expand Down Expand Up @@ -124,6 +127,7 @@ jobs:
release-wheel:
runs-on: 'ubuntu-latest'
needs: build-wheel
if: github.event_name == 'pull_request'
permissions:
id-token: write
contents: write
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.vscode/
build/
*.egg_info
dist/
11 changes: 2 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ requires = [
"ninja",
"cmake>=3.12",
"pybind11>=2.10.4",
"numpy",
"numpy >= 2",
"PyYAML",
"nanobind",
"delvewheel; platform_system=='Windows'",
]

[tool.cibuildwheel]
Expand All @@ -21,23 +22,15 @@ test-command = "python -m pytest --pyargs sparse.mlir_backend"
skip = ["*-manylinux_i686", "*-musllinux*"]
environment = { PATH = "/usr/lib/ccache:/usr/lib64/ccache:/usr/lib/ccache/bin:$PATH" }
before-build = [
"pip install -r {project}/Finch-mlir/requirements/requirements.txt",
"{project}/Finch-mlir/scripts/docker_prepare_ccache.sh"
]
environment-pass = ["HOST_CCACHE_DIR", "SPARSE_BACKEND"]

[tool.cibuildwheel.macos]
environment = { PATH = "/usr/local/opt/ccache/libexec:$PATH" }
before-build = [
"pip install -r {project}/Finch-mlir/requirements/requirements.txt",
]
repair-wheel-command = [
"delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} --ignore-missing-dependencies"
]

[tool.cibuildwheel.windows]
build = "cp310-win_amd64 cp311-win_amd64 cp312-win_amd64 cp313-win_amd64"
before-build = [
"pip install delvewheel",
"pip install -r {project}\\Finch-mlir\\requirements\\requirements.txt",
]
8 changes: 0 additions & 8 deletions requirements/requirements.txt

This file was deleted.

1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def create_dir(name: str) -> Path:
llvm_source_dir=f"./llvm-project/llvm",
finch_source_dir="./Finch-mlir",
)],
install_requires=["PyYAML >=6", "numpy >=1.17"],
cmdclass={"build_ext": CMakeBuild},
zip_safe=False,
)

0 comments on commit 66db99d

Please sign in to comment.