Skip to content

Commit eb63f66

Browse files
committed
feat: init
1 parent 58908e2 commit eb63f66

14 files changed

+616
-1
lines changed

.envrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake .

.github/workflows/CI.yml

+169
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
# This file is autogenerated by maturin v1.7.0
2+
# To update, run
3+
#
4+
# maturin generate-ci github
5+
#
6+
name: CI
7+
8+
on:
9+
push:
10+
branches:
11+
- main
12+
- master
13+
tags:
14+
- '*'
15+
pull_request:
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
linux:
23+
runs-on: ${{ matrix.platform.runner }}
24+
strategy:
25+
matrix:
26+
platform:
27+
- runner: ubuntu-latest
28+
target: x86_64
29+
- runner: ubuntu-latest
30+
target: x86
31+
- runner: ubuntu-latest
32+
target: aarch64
33+
- runner: ubuntu-latest
34+
target: armv7
35+
- runner: ubuntu-latest
36+
target: s390x
37+
- runner: ubuntu-latest
38+
target: ppc64le
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: actions/setup-python@v5
42+
with:
43+
python-version: 3.x
44+
- name: Build wheels
45+
uses: PyO3/maturin-action@v1
46+
with:
47+
target: ${{ matrix.platform.target }}
48+
args: --release --out dist --find-interpreter
49+
sccache: 'true'
50+
manylinux: auto
51+
- name: Upload wheels
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: wheels-linux-${{ matrix.platform.target }}
55+
path: dist
56+
57+
musllinux:
58+
runs-on: ${{ matrix.platform.runner }}
59+
strategy:
60+
matrix:
61+
platform:
62+
- runner: ubuntu-latest
63+
target: x86_64
64+
- runner: ubuntu-latest
65+
target: x86
66+
- runner: ubuntu-latest
67+
target: aarch64
68+
- runner: ubuntu-latest
69+
target: armv7
70+
steps:
71+
- uses: actions/checkout@v4
72+
- uses: actions/setup-python@v5
73+
with:
74+
python-version: 3.x
75+
- name: Build wheels
76+
uses: PyO3/maturin-action@v1
77+
with:
78+
target: ${{ matrix.platform.target }}
79+
args: --release --out dist --find-interpreter
80+
sccache: 'true'
81+
manylinux: musllinux_1_2
82+
- name: Upload wheels
83+
uses: actions/upload-artifact@v4
84+
with:
85+
name: wheels-musllinux-${{ matrix.platform.target }}
86+
path: dist
87+
88+
windows:
89+
runs-on: ${{ matrix.platform.runner }}
90+
strategy:
91+
matrix:
92+
platform:
93+
- runner: windows-latest
94+
target: x64
95+
- runner: windows-latest
96+
target: x86
97+
steps:
98+
- uses: actions/checkout@v4
99+
- uses: actions/setup-python@v5
100+
with:
101+
python-version: 3.x
102+
architecture: ${{ matrix.platform.target }}
103+
- name: Build wheels
104+
uses: PyO3/maturin-action@v1
105+
with:
106+
target: ${{ matrix.platform.target }}
107+
args: --release --out dist --find-interpreter
108+
sccache: 'true'
109+
- name: Upload wheels
110+
uses: actions/upload-artifact@v4
111+
with:
112+
name: wheels-windows-${{ matrix.platform.target }}
113+
path: dist
114+
115+
macos:
116+
runs-on: ${{ matrix.platform.runner }}
117+
strategy:
118+
matrix:
119+
platform:
120+
- runner: macos-12
121+
target: x86_64
122+
- runner: macos-14
123+
target: aarch64
124+
steps:
125+
- uses: actions/checkout@v4
126+
- uses: actions/setup-python@v5
127+
with:
128+
python-version: 3.x
129+
- name: Build wheels
130+
uses: PyO3/maturin-action@v1
131+
with:
132+
target: ${{ matrix.platform.target }}
133+
args: --release --out dist --find-interpreter
134+
sccache: 'true'
135+
- name: Upload wheels
136+
uses: actions/upload-artifact@v4
137+
with:
138+
name: wheels-macos-${{ matrix.platform.target }}
139+
path: dist
140+
141+
sdist:
142+
runs-on: ubuntu-latest
143+
steps:
144+
- uses: actions/checkout@v4
145+
- name: Build sdist
146+
uses: PyO3/maturin-action@v1
147+
with:
148+
command: sdist
149+
args: --out dist
150+
- name: Upload sdist
151+
uses: actions/upload-artifact@v4
152+
with:
153+
name: wheels-sdist
154+
path: dist
155+
156+
release:
157+
name: Release
158+
runs-on: ubuntu-latest
159+
if: "startsWith(github.ref, 'refs/tags/')"
160+
needs: [linux, musllinux, windows, macos, sdist]
161+
steps:
162+
- uses: actions/download-artifact@v4
163+
- name: Publish to PyPI
164+
uses: PyO3/maturin-action@v1
165+
env:
166+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
167+
with:
168+
command: upload
169+
args: --non-interactive --skip-existing wheels-*/*

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/target
2+
3+
4+
# nix
5+
.devenv
6+
.direnv
7+
./nix/secrets/*.age

Cargo.lock

+171
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[package]
2+
name = "minecraft-essentials-py"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
[lib]
8+
name = "minecraft_essentials"
9+
crate-type = ["cdylib"]
10+
11+
[dependencies]
12+
pyo3 = "0.22.0"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# pypi
1+
# Python
22
The python version of Minecraft essentials

0 commit comments

Comments
 (0)