Skip to content

Commit

Permalink
Merge pull request #41 from microsoft/dev
Browse files Browse the repository at this point in the history
Release 1.2.1 is a go.
  • Loading branch information
daxpryce authored Jan 25, 2024
2 parents 5816da5 + 800ff46 commit eb7ad2d
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 192 deletions.
69 changes: 0 additions & 69 deletions .devops/build.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .devops/publish.yml

This file was deleted.

63 changes: 0 additions & 63 deletions .devops/sign.yml

This file was deleted.

58 changes: 35 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ jobs:
codestyle-check:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Check format
run: |
cargo fmt -- --check
version:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Materialize build number
run: |
pip install -U pip
pip install toml
python .github/build/manifest_version.py packages/pyo3/Cargo.toml version.txt
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: cargo-toml
path: packages/pyo3/Cargo.toml
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: version-txt
path: version.txt
Expand All @@ -37,12 +37,12 @@ jobs:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.9
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: cargo-toml
path: materialized
Expand All @@ -58,31 +58,33 @@ jobs:
# the same steps except for the build, we conditionally do one of the builds depending on the os in question
# note that windows and mac don't do sdists, but ubuntu does; this is just because we don't need to repeat
# ourselves or overwrite the .tar.gz sdist.
- uses: messense/maturin-action@v1

- uses: PyO3/maturin-action@v1
if: ${{ matrix.os == 'windows-latest' }}
name: Maturin Build for Windows
with:
maturin-version: latest
maturin-version: 1.4.0
command: build
target: x64
args: -m packages/pyo3/Cargo.toml --release -i ${{env.pythonLocation}}\python.exe --no-sdist
args: -m packages/pyo3/Cargo.toml --release -i ${{env.pythonLocation}}\python.exe

- uses: messense/maturin-action@v1
- uses: PyO3/maturin-action@v1
if: ${{ matrix.os == 'macos-latest' }}
name: Maturin Build for MacOS
with:
maturin-version: latest
maturin-version: 1.4.0
command: build
args: -m packages/pyo3/Cargo.toml --release --universal2 --no-sdist
target: universal2-apple-darwin
args: -m packages/pyo3/Cargo.toml --release

- uses: messense/maturin-action@v1
- uses: PyO3/maturin-action@v1
if: ${{ matrix.os == 'ubuntu-latest' }}
name: Maturin Build for Linux
with:
maturin-version: latest
maturin-version: 1.4.0
command: build
target: x64
args: -m packages/pyo3/Cargo.toml --release
args: -m packages/pyo3/Cargo.toml --release --sdist
manylinux: 2014

- name: Python Unittests
Expand All @@ -91,9 +93,10 @@ jobs:
pip install ../../target/wheels/*.whl
python -m unittest
shell: bash
- uses: actions/upload-artifact@v2

- uses: actions/upload-artifact@v4
with:
name: dist
name: dist-${{ matrix.os }}
path: |
target/wheels/*.whl
target/wheels/*.tar.gz
Expand All @@ -102,20 +105,29 @@ jobs:
needs: 'build'
if: github.ref=='refs/heads/main' || github.ref=='refs/heads/dev'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: dist-ubuntu-latest
path: dist/
- uses: actions/download-artifact@v4
with:
name: dist-windows-latest
path: dist/
- uses: actions/download-artifact@v4
with:
name: dist
name: dist-macos-latest
path: dist/
- name: Generate SHA256 files for each wheel
run: |
sha256sum dist/*.whl > checksums.txt
sha256sum dist/*.tar.gz >> checksums.txt
cat checksums.txt
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: version-txt
path: version/
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and a package using [pyo3](https://github.com/pyo3/pyo3) will expose the functio
- 64 bit operating system

## Published Versions
We currently build for x86_64 platforms only, Windows, macOS, and Ubuntu, for python versions 3.6, 3.7, 3.8, and 3.9.
We currently build for x86_64 platforms only, Windows, macOS, and Ubuntu, for python versions 3.6 - 3.12.

## Building
If for any reason, the published wheels do not match your architecture or if you have a particularly old version of glibc that isn't sufficiently accounted for in our current build matrix, or you just want to build it yourself, the following build instructions should help.
Expand All @@ -29,7 +29,7 @@ git clone [email protected]:microsoft/graspologic-native.git
cd graspologic-native
python3.8 -m venv venv
pip install -U pip setuptools wheel
pip install pyo3 maturin
pip install maturin
cd packages/pyo3
maturin build --release -i python3.8 # this is where things break on windows. instead of `python3.8` here, you will need the full path to the correct python.exe on your windows machine, something like `-i "C:\python38\bin\python.exe"`
```
Expand Down
9 changes: 1 addition & 8 deletions packages/pyo3/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
[package]
name = "graspologic_native"
version = "1.1.1"
version = "1.2.1"
authors = ["[email protected]"]
edition = "2018"
license = "MIT"
description = "Python native companion module to the graspologic library"
readme = "README.md"

[package.metadata.maturin]
maintainer = "Dax Pryce"
maintainer-email = "[email protected]"
requires-python = ">=3.6,<3.11"
project-url = {"Github" = "https://github.com/microsoft/graspologic-native", "Graspologic"="https://github.com/microsoft/graspologic"}
classifier = ["Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Topic :: Scientific/Engineering :: Mathematics"]

[lib]
name = "graspologic_native"
crate-type = ["rlib","cdylib"]
Expand Down
2 changes: 1 addition & 1 deletion packages/pyo3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ implementation provided at [https://github.com/CWTSLeiden/networkanalysis](https
was used as a starting point.

## Releases
Builds are provided for x86_64 architectures only, for Windows, macOS, and Linux, for Python versions 3.6->3.9.
Builds are provided for x86_64 architectures only, for Windows, macOS, and Linux, for Python versions 3.6->3.12.

## Build Tools
Rust nightly 1.37+ (we are currently using 1.40)
Expand Down
25 changes: 24 additions & 1 deletion packages/pyo3/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
[project]
name = "graspologic-native"
maintainer = "Dax Pryce"
maintainer-email = "[email protected]"
requires-python = ">=3.6,<3.13"
classifier = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Mathematics"]

[project.urls]
Github = "https://github.com/microsoft/graspologic-native"
Graspologic = "https://github.com/microsoft/graspologic"


[build-system]
requires = ["maturin>=0.12,<0.13"]
requires = ["maturin>=1.4,<2.0"]
build-backend = "maturin"

0 comments on commit eb7ad2d

Please sign in to comment.