Skip to content
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

Issue-43 #44

Merged
merged 4 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 12 additions & 33 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ jobs:

- name: generate license file
run: |
cargo install cargo-about
cargo install cargo-quickinstall
cargo quickinstall cargo-about
cargo about generate --features=pybindings about.hbs > website/license.html
wc -l website/license.html

Expand Down Expand Up @@ -322,6 +323,16 @@ jobs:
with:
python-version: "3.12"

- name: generate license file
shell: bash
run: |
rm LICENSE.*
cargo install cargo-quickinstall
cargo quickinstall cargo-about
cargo about generate --features=pybindings about.hbs > LICENSE.html
ls -l LICENSE*
wc -l LICENSE*

- name: Build wheels (unix)
if: matrix.os != 'windows-latest'
uses: messense/maturin-action@v1
Expand All @@ -337,12 +348,6 @@ jobs:
command: build
args: --release --strip --features pybindings -i C:\hostedtoolcache\windows\Python\${{ steps.setup-python-3-7.outputs.python-version }}\x64\python3.exe C:\hostedtoolcache\windows\Python\${{ steps.setup-python-3-8.outputs.python-version }}\x64\python3.exe C:\hostedtoolcache\windows\Python\${{ steps.setup-python-3-9.outputs.python-version }}\x64\python3.exe C:\hostedtoolcache\windows\Python\${{ steps.setup-python-3-10.outputs.python-version }}\x64\python3.exe C:\hostedtoolcache\windows\Python\${{ steps.setup-python-3-11.outputs.python-version }}\x64\python3.exe C:\hostedtoolcache\windows\Python\${{ steps.setup-python-3-12.outputs.python-version }}\x64\python3.exe

# For some reason, manylinux builds create wheels owned by the root user,
# which breaks our attempts to add the license file below.
- name: Fix wheel ownership on linux
if: matrix.os == 'ubuntu-latest'
run: sudo chown -R runner:docker target

- name: Cross-build wheels for Apple Silicon
if: matrix.os == 'macos-latest'
uses: messense/maturin-action@v1
Expand All @@ -366,32 +371,6 @@ jobs:
if: matrix.os == 'windows-latest'
run: dir target\wheels\

- name: generate license file
run: |
cargo install cargo-about
cargo about generate --features=pybindings about.hbs > LICENSE.html
ls -l LICENSE.html
wc -l LICENSE.html

- name: Add LICENSE.html to all wheels (unix)
if: matrix.os != 'windows-latest'
run: |
for wheel in target/wheels/*.whl; do
zip -ur $wheel LICENSE.html
done

- name: Add LICENSE.html to all wheels (windows)
if: matrix.os == 'windows-latest'
run: |
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') | Out-Null
Get-ChildItem "target\wheels\" -Filter *.whl |
Foreach-Object {
$zip = [System.IO.Compression.ZipFile]::Open($_.FullName, "Update")
$licenseFile = [System.IO.Path]::GetFileName("LICENSE.html")
[System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile($zip, "LICENSE.html", $licenseFile, "Optimal") | Out-Null
$zip.Dispose()
}

- name: Save artifact with wheels for ${{ matrix.os }}
uses: actions/upload-artifact@v2
with:
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0 OR BSL-1.0"
name = "constriction"
readme = "README-rust.md"
repository = "https://github.com/bamler-lab/constriction/"
version = "0.3.4"
version = "0.3.5"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
2 changes: 1 addition & 1 deletion README-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ into a web app by using `constriction` in a WebAssembly module).
### Installing `constriction` for Python

```bash
pip install constriction~=0.3.4
pip install constriction~=0.3.5
```

### Hello, World
Expand Down
2 changes: 1 addition & 1 deletion README-rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Add the following to your `Cargo.toml`:

```toml
[dependencies]
constriction = "0.3.4"
constriction = "0.3.5"
probability = "0.20.3" # Not strictly required but used in many examples.
```

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ unnecessarily limit what you can achieve with `constriction`.
Install `constriction` for Python:

```bash
pip install constriction~=0.3.4
pip install constriction~=0.3.5
```

Then go ahead and encode and decode some data:
Expand Down Expand Up @@ -105,7 +105,7 @@ Add this line to your `Cargo.toml`:

```toml
[dependencies]
constriction = "0.3.4"
constriction = "0.3.5"
probability = "0.17" # Not strictly required but used in many code examples.
```

Expand All @@ -114,7 +114,7 @@ features (and you can't use the `probability` crate):

```toml
[dependencies]
constriction = {version = "0.3.4", default-features = false} # for `no_std` mode
constriction = {version = "0.3.5", default-features = false} # for `no_std` mode
```

Then go ahead and encode and decode some data:
Expand Down
2 changes: 1 addition & 1 deletion examples/python/01-hello-world.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install --upgrade constriction~=0.3.4 # (this will automatically also install numpy)"
"%pip install --upgrade constriction~=0.3.5 # (this will automatically also install numpy)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/python/02-custom-entropy-models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install constriction~=0.3.4 scipy # (this will automatically also install numpy)"
"%pip install constriction~=0.3.5 scipy # (this will automatically also install numpy)"
]
},
{
Expand Down
Loading
Loading