Skip to content

Commit

Permalink
feat: v0.6.0rc0 (#46, #47, #50)
Browse files Browse the repository at this point in the history
* feat: explicit build targets (#46, #47)

* fix: implementation

* fix: test on normalized

* fix: ci

* fix: ci

* test: upgrade actions

* test: mac build

* fix: macos

* fix: agnostic architecture

* test: setup-python@v5

* feat: discover brew dynamically

* fix: tests

* test: normalize

* test: executable

* fix: python

* fix: recreate hatch env in ci

* test: fix pip

* test: `macos-max-compat = false`

* chore: misc tests

* fix: no /usr/local fallback

* fix: race cond due to extensions

* refactor: templates
  • Loading branch information
joshua-auchincloss authored Apr 28, 2024
1 parent eb543af commit 0488f78
Show file tree
Hide file tree
Showing 41 changed files with 860 additions and 350 deletions.
50 changes: 29 additions & 21 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,34 +32,36 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: stable

- name: Install Task
run: |
go install github.com/go-task/task/v3/cmd/task@latest
- name: Install llvm
if: startsWith(matrix.os, 'macos-')
if: startsWith(matrix.os, 'macos')
run: |
brew cleanup
brew update -f
brew remove --ignore-dependencies python
rm -rf /usr/local/bin/2to3*
rm -rf /usr/local/bin/idle3*
rm -rf /usr/local/bin/pydoc3*
rm -rf /usr/local/bin/python*
brew install libomp
brew install llvm
brew cleanup
brew update -f
brew install libomp llvm
echo "
export PATH=\"/usr/local/opt/llvm/bin:\$PATH\"
export LDFLAGS=\"-L/usr/local/opt/llvm/lib\"
export CPPFLAGS=\"-I/usr/local/opt/llvm/include\"
export PATH=\"$(brew --prefix)/opt/llvm/bin:\$PATH\"
export DYLD_LIBRARY_PATH=\"$(brew --prefix)/lib:$DYLD_LIBRARY_PATH\"
export LDFLAGS=\"-L$(brew --prefix)/opt/llvm/lib\"
export CPPFLAGS=\"-I$(brew --prefix)/opt/llvm/include\"
export LD=ld.lld
export AR=llvm-ar
export RANLIB=llvm-ranlib
" >> $HOME/.bash_profile
- uses: actions/setup-go@v5
with:
go-version: stable

- name: Install Task
run: |
go install github.com/go-task/task/v3/cmd/task@latest
- uses: hecrj/setup-rust-action@v2
with:
rust-version: stable
Expand All @@ -71,13 +73,14 @@ jobs:
cargo binstall -y jaq
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
architecture: x64
python-version: ${{ matrix.python-version }}

- name: Install Hatch
run: pip install --upgrade hatch
run: |
pip install --upgrade pip
pip install --upgrade hatch
- name: Run tests
run: hatch run cov
Expand All @@ -92,13 +95,18 @@ jobs:
run: |
task simple-structure
- name: Test build target directives
shell: bash
run: |
task only-included
sdist:
needs: [validate]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -121,7 +129,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
architecture: x64
python-version: ${{ matrix.python-version }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
Expand All @@ -16,3 +16,5 @@ jobs:
run: pytest --cov --ignore=test_libraries
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
46 changes: 27 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,36 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: stable

- name: Install Task
run: |
go install github.com/go-task/task/v3/cmd/task@latest
- name: Install llvm
if: startsWith(matrix.os, 'macos-')
if: startsWith(matrix.os, 'macos')
run: |
brew cleanup
brew update -f
brew remove --ignore-dependencies python
rm -rf /usr/local/bin/2to3*
rm -rf /usr/local/bin/idle3*
rm -rf /usr/local/bin/pydoc3*
rm -rf /usr/local/bin/python*
brew install libomp
brew install llvm
brew cleanup
brew update -f
brew install libomp llvm
echo "
export PATH=\"/usr/local/opt/llvm/bin:\$PATH\"
export LDFLAGS=\"-L/usr/local/opt/llvm/lib\"
export CPPFLAGS=\"-I/usr/local/opt/llvm/include\"
export PATH=\"$(brew --prefix)/opt/llvm/bin:\$PATH\"
export DYLD_LIBRARY_PATH=\"$(brew --prefix)/lib:$DYLD_LIBRARY_PATH\"
export LDFLAGS=\"-L$(brew --prefix)/opt/llvm/lib\"
export CPPFLAGS=\"-I$(brew --prefix)/opt/llvm/include\"
export LD=ld.lld
export AR=llvm-ar
export RANLIB=llvm-ranlib
" >> $HOME/.bash_profile
- uses: actions/setup-go@v5
with:
go-version: stable

- name: Install Task
run: |
go install github.com/go-task/task/v3/cmd/task@latest
- uses: hecrj/setup-rust-action@v2
with:
rust-version: stable
Expand All @@ -66,13 +68,14 @@ jobs:
cargo binstall -y jaq
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
architecture: x64
python-version: ${{ matrix.python-version }}

- name: Install Hatch
run: pip install --upgrade hatch
run: |
pip install --upgrade pip
pip install --upgrade hatch
- name: Run tests
run: hatch run cov
Expand All @@ -86,3 +89,8 @@ jobs:
shell: bash
run: |
task simple-structure
- name: Test build target directives
shell: bash
run: |
task only-included
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,22 @@ All notable changes to this project will be documented in this file.

### Bug Fixes

- Implementation

### Features

- Explicit build targets (#46, #47)

## [0.5.1] - 2024-02-19

### Bug Fixes

- Build permissions ([#28](https://github.com/joshua-auchincloss/hatch-cython/issues/28))
- Ci
- No auto changelog
- Release ci [ci skip] ([#40](https://github.com/joshua-auchincloss/hatch-cython/issues/40))
- Ci
- Release

### Features

Expand All @@ -27,12 +39,19 @@ All notable changes to this project will be documented in this file.
- Changelog
- Pr #38 from dev
- Tighten ci ([#39](https://github.com/joshua-auchincloss/hatch-cython/issues/39))
- Changelog
- V0.5.1

### Merge

- #29 from build
- Pr #37 from dev

### Release

- V0.5.1
- V0.5.1

## [0.5.0] - 2023-11-30

### Bug Fixes
Expand Down
14 changes: 7 additions & 7 deletions COVERAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
| src/hatch_cython/\_\_init\_\_.py | 2 | 0 | 0 | 0 | 100% |
| src/hatch_cython/config/\_\_init\_\_.py | 2 | 0 | 0 | 0 | 100% |
| src/hatch_cython/config/autoimport.py | 9 | 0 | 2 | 0 | 100% |
| src/hatch_cython/config/config.py | 139 | 9 | 58 | 5 | 92% |
| src/hatch_cython/config/defaults.py | 6 | 0 | 0 | 0 | 100% |
| src/hatch_cython/config/files.py | 27 | 1 | 12 | 2 | 92% |
| src/hatch_cython/config/config.py | 143 | 9 | 60 | 6 | 92% |
| src/hatch_cython/config/defaults.py | 28 | 3 | 10 | 2 | 87% |
| src/hatch_cython/config/files.py | 35 | 1 | 16 | 2 | 94% |
| src/hatch_cython/config/flags.py | 70 | 1 | 24 | 0 | 99% |
| src/hatch_cython/config/includes.py | 15 | 1 | 8 | 1 | 91% |
| src/hatch_cython/config/macros.py | 12 | 0 | 7 | 0 | 100% |
| src/hatch_cython/config/platform.py | 75 | 2 | 30 | 4 | 94% |
| src/hatch_cython/config/templates.py | 62 | 7 | 30 | 3 | 89% |
| src/hatch_cython/config/templates.py | 62 | 6 | 32 | 4 | 89% |
| src/hatch_cython/constants.py | 11 | 0 | 0 | 0 | 100% |
| src/hatch_cython/devel.py | 5 | 0 | 0 | 0 | 100% |
| src/hatch_cython/hooks.py | 5 | 1 | 2 | 0 | 86% |
| src/hatch_cython/plugin.py | 232 | 12 | 144 | 10 | 94% |
| src/hatch_cython/plugin.py | 244 | 12 | 156 | 10 | 94% |
| src/hatch_cython/temp.py | 13 | 0 | 2 | 0 | 100% |
| src/hatch_cython/utils.py | 43 | 4 | 18 | 1 | 89% |
| **TOTAL** | **728** | **38** | **337** | **26** | **94%** |
| src/hatch_cython/utils.py | 44 | 4 | 20 | 1 | 89% |
| **TOTAL** | **775** | **40** | **369** | **30** | **94%** |
Loading

0 comments on commit 0488f78

Please sign in to comment.