fix(build): restore editable installs after stream_gears packaging change (#1734)
* fix(build): restore editable installs after stream_gears packaging change Editable installs only put python-source (crates/stream-gears) on sys.path and skip include, so the root biliup/ package was unimportable after maturin develop / pip install -e . Add crates/stream-gears/biliup/__init__.py, which loads the root package under the same name. Wheels are unchanged: maturin only walks stream_gears/ and the include globs, which match the root biliup/ first. * test(stream-gears): cover editable installs test_wheel_ships_stubs only checks RECORD for regular installs, since an editable install's RECORD lists the .pth. A new test puts only python-source on PYTHONPATH and checks that biliup and biliup.__main__ resolve to the root package. * build: move biliup/ and pyproject.toml into crates/stream-gears Editable installs (`maturin develop`, `pip install -e`) only put `python-source` on sys.path and skip `include`, so with `biliup/` at the repository root they could not import it. With `pyproject.toml`, `biliup/` and `stream_gears/` in the same directory, `biliup` goes in through `python-packages`, which editable installs honour. - `biliup/` is moved unchanged; the loader added earlier in this PR is removed because that path is now the real package. - `readme` and `license` point at the repository root, so the wheel's METADATA and `licenses/LICENSE` stay the same. - CI, Termux and the Dockerfile build with `-m crates/stream-gears/Cargo.toml`. Ref #1732 * docs: point source install commands at crates/stream-gears
This commit is contained in:
12 files changed
+61
-27
No files matched your search
@@ -39,7 +39,7 @@ jobs:
|
||||
dpkg-deb -x $FNAME python
|
||||
cp -a python/data/data/com.termux/files/usr/lib/libpython* $ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24
|
||||
sed -i 's/"abi3-py[0-9]*",\? *//g' crates/stream-gears/Cargo.toml
|
||||
sed -i 's/aiohttp\[speedups\] >= 3\.9\.5/aiohttp[speedups] <= 3.9.5/' pyproject.toml
|
||||
sed -i 's/aiohttp\[speedups\] >= 3\.9\.5/aiohttp[speedups] <= 3.9.5/' crates/stream-gears/pyproject.toml
|
||||
- name: Build wheel for aarch64 (Termux)
|
||||
run: |
|
||||
export NDK_BIN=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin
|
||||
@@ -48,6 +48,7 @@ jobs:
|
||||
export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=$NDK_BIN/aarch64-linux-android24-clang
|
||||
export PYO3_CROSS_LIB_DIR=python/data/data/com.termux/files/usr/lib/
|
||||
maturin build \
|
||||
-m crates/stream-gears/Cargo.toml \
|
||||
--release \
|
||||
--strip \
|
||||
--manylinux off \
|
||||
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
target: ${{ matrix.platform.target }}
|
||||
args: --release --out dist
|
||||
args: --release --out dist -m crates/stream-gears/Cargo.toml
|
||||
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
manylinux: ${{ matrix.platform.target == 'aarch64' && '2_28' || 'auto' }}
|
||||
- name: Smoke test wheel
|
||||
@@ -74,7 +74,7 @@ jobs:
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
target: ${{ matrix.platform.target }}
|
||||
args: --release --out dist -i python3.14t
|
||||
args: --release --out dist -m crates/stream-gears/Cargo.toml -i python3.14t
|
||||
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
manylinux: ${{ matrix.platform.target == 'aarch64' && '2_28' || 'auto' }}
|
||||
- name: Upload wheels
|
||||
@@ -112,14 +112,14 @@ jobs:
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
target: ${{ matrix.platform.target }}
|
||||
args: --release --out dist
|
||||
args: --release --out dist -m crates/stream-gears/Cargo.toml
|
||||
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
manylinux: musllinux_1_2
|
||||
- name: Build free-threaded wheels
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
target: ${{ matrix.platform.target }}
|
||||
args: --release --out dist -i python3.14t
|
||||
args: --release --out dist -m crates/stream-gears/Cargo.toml -i python3.14t
|
||||
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
manylinux: musllinux_1_2
|
||||
- name: Upload wheels
|
||||
@@ -154,7 +154,7 @@ jobs:
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
target: ${{ matrix.platform.target }}
|
||||
args: --release --out dist
|
||||
args: --release --out dist -m crates/stream-gears/Cargo.toml
|
||||
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
@@ -164,7 +164,7 @@ jobs:
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
target: ${{ matrix.platform.target }}
|
||||
args: --release --out dist -i python3.14t
|
||||
args: --release --out dist -m crates/stream-gears/Cargo.toml -i python3.14t
|
||||
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
- name: Upload wheels
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -197,13 +197,13 @@ jobs:
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
target: ${{ matrix.platform.target }}
|
||||
args: --release --out dist
|
||||
args: --release --out dist -m crates/stream-gears/Cargo.toml
|
||||
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
- name: Build free-threaded wheels
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
target: ${{ matrix.platform.target }}
|
||||
args: --release --out dist -i python3.14t
|
||||
args: --release --out dist -m crates/stream-gears/Cargo.toml -i python3.14t
|
||||
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
- name: Upload wheels
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -226,7 +226,7 @@ jobs:
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
command: sdist
|
||||
args: --out dist
|
||||
args: --out dist -m crates/stream-gears/Cargo.toml
|
||||
- name: Upload sdist
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
Reference in new issue
Block a user