Skip to content

Some issues with the build process #19

@wnm3

Description

@wnm3

I had to install uv using pip install uv so perhaps mention that in the BUILDING.md (though the link provided is clear enough you need to do this)

The first time I tried running the build process using the command below from aec/pyaec:
cargo build -p libaec --release
cp -rf ../target/release/libaec.dylib src/pyaec/
WHEEL_TAG="py3-none-macosx_11_0_arm64" uv build

it failed because I hadn't installed rust, so no cargo was found, so please add as the first instruction:
brew install rust

next, the build failed because the ../crates/aec-rs-sys/speexdsp directory was empty, so I had to run the following in the aec directory:
git submodule init && git submodule update

then rerunning the build commands in the aec/pyaec directory I got this error:
pyaec>cargo build -p libaec --release
cp -rf ../target/release/libaec.dylib src/pyaec/
WHEEL_TAG="py3-none-macosx_11_0_arm64" uv build
Compiling aec-rs-sys v1.0.0 (/Users/wnm3/csnext/aec/crates/aec-rs-sys)
error: failed to run custom build command for aec-rs-sys v1.0.0 (/Users/wnm3/csnext/aec/crates/aec-rs-sys)

Caused by:
process didn't exit successfully: /Users/wnm3/csnext/aec/target/release/build/aec-rs-sys-7273a2c3895e46d3/build-script-build (exit status: 101)

and rerunning the command produced a similar error

so, I had to issue the command below from the aec/pyaec directory to remove the ../target directory for a clean retry:
rm -fr ../target

Then I was successful completing the first three commands, and the aec/pyaec/dist directory had the following:
pyaec>ls -l dist
total 832
-rw-r--r-- 1 wnm3 staff 211238 Jul 11 09:51 pyaec-1.0.1-py3-none-macosx_11_0_arm64.whl
-rw-r--r-- 1 wnm3 staff 210720 Jul 11 09:51 pyaec-1.0.1.tar.gz

Of course, the next publish commands fail as the token is invalid (on purpose, as we shouldn't be updating without our own credentials...). --

It would be great if there were instructions to install the content built into the dist directory locally so no PyPi is required... as follows:
pip install --no-index --find-links=./dist/ pyaec
then you can test with:
uv run --with pyaec --no-project -- python -c "import pyaec"

The following may be helpful for people needing to set up PyPi:

Note: the following are used in the TestPyPi environment; you would remove the test. prefix for actual registration:
Register a PyPi account: https://test.pypi.org/account/register/
Get a PyPi token: https://test.pypi.org/help/#apitoken

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions