From b03e87c3817d73f76bf5ff91361c407fe3190a7c Mon Sep 17 00:00:00 2001 From: Alex Kaszynski Date: Sat, 2 Mar 2024 11:53:40 -0800 Subject: [PATCH] fix contributing; fix env var windows ci --- .github/workflows/build-and-deploy.yml | 2 +- CONTRIBUTING.md | 30 ++++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 0316058..4edc7c6 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -40,7 +40,7 @@ jobs: run: | echo "appdata=$env:LOCALAPPDATA" >> ${env:GITHUB_ENV} echo "GMP_INC=C:\Miniconda\envs\test\Library\include" >> ${env:GITHUB_ENV} - echo "GMP_LIB=C:\Miniconda\envs\test\Library\lib >> ${env:GITHUB_ENV} + echo "GMP_LIB=C:\Miniconda\envs\test\Library\lib" >> ${env:GITHUB_ENV} - name: Build wheels uses: pypa/cibuildwheel@v2.16.5 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d36cda0..1390efe 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,13 +4,39 @@ Thank you for considering contributions to our project! Here's how you can help: ## Setting Up for Development -We're using [scikit-build-core](https://github.com/scikit-build/scikit-build-core) for our build system and building using cmake. You'll need a handful of system dependencies to build locally. On Linux, install them with: +We're using [scikit-build-core](https://github.com/scikit-build/scikit-build-core) for our build system and building using ``cmake``. You'll need a handful of system dependencies to build locally. + + +### Linux +On Linux, install the following OS dependencies with: ``` sudo apt-get update -sudo apt-get install libblas-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libglu1-mesa-dev libsuitesparse-dev xorg-dev ccache +sudo apt-get install libblas-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libglu1-mesa-dev libsuitesparse-dev xorg-dev ccache -y ``` +### Windows + +For contributors using Windows, we also have a setup process to ensure you can compile and test changes locally. Here's how to set up your development environment on Windows: + +1. **Install Miniconda**: We use Miniconda to manage dependencies. Install it from [here](https://docs.anaconda.com/free/miniconda/index.html). + +2. **Setup Miniconda and Install Dependencies**: + ``` + conda install -c conda-forge mpir -y + ``` + +3. **Configure Environment Variables**: + Set the required environment variables for the build. This assumes PowerShell. + + ``` + $Env:GMP_INC = "C:\Miniconda\Library\include" + $Env:GMP_LIB = "C:\Miniconda\Library\lib" + ``` + + Note: You may need to adjust these paths depending on if you use a non-global conda environment. + +### Installation To install the library in editable mode: 1. Clone the repository: