Skip to content

Commit 924cc52

Browse files
authored
Fix install section of README (#3)
* Fix install section of README * fix * Support Python 3.11
1 parent 9fc4d66 commit 924cc52

File tree

4 files changed

+60
-46
lines changed

4 files changed

+60
-46
lines changed

.github/workflows/CI.yml

Lines changed: 43 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5,94 +5,99 @@ on:
55
pull_request:
66

77
jobs:
8+
sdist:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-python@v4
13+
with:
14+
python-version: '3.11'
15+
- uses: dtolnay/rust-toolchain@stable
16+
- uses: PyO3/maturin-action@v1
17+
with:
18+
command: sdist
19+
- name: Upload wheels
20+
uses: actions/upload-artifact@v3
21+
with:
22+
name: wheels
23+
path: target/wheels
24+
825
linux:
926
runs-on: ubuntu-latest
1027
strategy:
1128
matrix:
12-
python-version: ['3.7', '3.8', '3.9', '3.10']
29+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
1330
target: [x86_64, i686]
1431
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-python@v2
32+
- uses: actions/checkout@v3
33+
- uses: actions/setup-python@v4
1734
with:
1835
python-version: ${{ matrix.python-version }}
19-
- uses: actions-rs/toolchain@v1
20-
with:
21-
profile: minimal
22-
toolchain: stable
23-
default: true
24-
- uses: messense/maturin-action@v1
36+
- uses: dtolnay/rust-toolchain@stable
37+
- uses: PyO3/maturin-action@v1
2538
with:
2639
target: ${{ matrix.target }}
2740
manylinux: auto
28-
args: -i ${{ matrix.python-version }} --release -o dist
41+
args: -i ${{ matrix.python-version }} --release
2942
- name: Upload wheels
30-
uses: actions/upload-artifact@v2
43+
uses: actions/upload-artifact@v3
3144
with:
3245
name: wheels
33-
path: dist
46+
path: target/wheels
3447

3548
windows:
3649
runs-on: windows-latest
3750
strategy:
3851
matrix:
39-
python-version: ['3.7', '3.8', '3.9', '3.10']
52+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
4053
target: [x64, x86]
4154
steps:
42-
- uses: actions/checkout@v2
43-
- uses: actions/setup-python@v2
55+
- uses: actions/checkout@v3
56+
- uses: actions/setup-python@v4
4457
with:
4558
python-version: ${{ matrix.python-version }}
4659
architecture: ${{ matrix.target }}
47-
- uses: actions-rs/toolchain@v1
48-
with:
49-
profile: minimal
50-
toolchain: stable
51-
default: true
52-
- uses: messense/maturin-action@v1
60+
- uses: dtolnay/rust-toolchain@stable
61+
- uses: PyO3/maturin-action@v1
5362
with:
5463
target: ${{ matrix.target }}
5564
manylinux: auto
56-
args: -i ${{ matrix.python-version }} --release -o dist
65+
args: -i ${{ matrix.python-version }} --release
5766
- name: Upload wheels
58-
uses: actions/upload-artifact@v2
67+
uses: actions/upload-artifact@v3
5968
with:
6069
name: wheels
61-
path: dist
70+
path: target/wheels
6271

6372
macos:
6473
runs-on: macos-latest
6574
strategy:
6675
matrix:
67-
python-version: ['3.7', '3.8', '3.9', '3.10']
76+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
6877
steps:
69-
- uses: actions/checkout@v2
70-
- uses: actions/setup-python@v2
78+
- uses: actions/checkout@v3
79+
- uses: actions/setup-python@v4
7180
with:
7281
python-version: ${{ matrix.python-version }}
73-
- uses: actions-rs/toolchain@v1
74-
with:
75-
profile: minimal
76-
toolchain: stable
77-
default: true
78-
- uses: messense/maturin-action@v1
82+
- uses: dtolnay/rust-toolchain@stable
83+
- uses: PyO3/maturin-action@v1
7984
with:
8085
target: ${{ matrix.target }}
8186
manylinux: auto
82-
args: -i ${{ matrix.python-version }} --release -o dist --universal2
87+
args: -i ${{ matrix.python-version }} --release --universal2
8388
- name: Upload wheels
84-
uses: actions/upload-artifact@v2
89+
uses: actions/upload-artifact@v3
8590
with:
8691
name: wheels
87-
path: dist
92+
path: target/wheels
8893

8994
release:
9095
name: Release
9196
runs-on: ubuntu-latest
9297
if: "startsWith(github.ref, 'refs/tags/')"
93-
needs: [ macos, windows, linux ]
98+
needs: [ sdist, macos, windows, linux ]
9499
steps:
95-
- uses: actions/download-artifact@v2
100+
- uses: actions/download-artifact@v3
96101
with:
97102
name: wheels
98103
- name: Publish to PyPI

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "python-daachorse"
3-
version = "0.1.5"
3+
version = "0.1.6"
44
edition = "2021"
55
authors = [
66
"Koichi Akabe <vbkaisetsu@gmail.com>",
@@ -17,7 +17,7 @@ crate-type = ["cdylib"]
1717

1818
[dependencies]
1919
daachorse = "1.0.0" # MIT or Apache-2.0
20-
pyo3 = { version = "0.17.1", features = ["extension-module"] } # MIT or Apache-2.0
20+
pyo3 = { version = "0.17.3", features = ["extension-module"] } # MIT or Apache-2.0
2121

2222
[profile.release]
2323
lto = true

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,27 @@ This is a Python wrapper.
88

99
## Installation
1010

11-
To use daachorse, run the following command:
11+
### Install pre-built package from PyPI
12+
13+
Run the following command:
1214

1315
```
1416
$ pip install daachorse
1517
```
1618

17-
You can also build a package as follows:
19+
### Build from source
20+
21+
You need to install the Rust compiler following [the documentation](https://www.rust-lang.org/tools/install) beforehand.
22+
daachorse uses `pyproject.toml`, so you also need to upgrade pip to version 19 or later.
23+
24+
```
25+
$ pip install --upgrade pip
26+
```
27+
28+
After setting up the environment, you can install daachorse as follows:
1829

1930
```
20-
$ python3 -m pip install maturin # installs maturin
21-
$ python3 -m maturin build --release -o dist # whl file is placed in dist
22-
$ python3 -m pip install dist/*.whl # installs daachorse
31+
$ pip install git+https://github.com/daac-tools/python-daachorse
2332
```
2433

2534
## Example usage

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["maturin>=0.13,<0.14"]
2+
requires = ["maturin>=0.14,<0.15"]
33
build-backend = "maturin"
44

55
[project]

0 commit comments

Comments
 (0)