These scripts allow the generation of riscv wheels to be used as python requirements in the cartesi dapps. The project contains a Makefile with several tasks related to building and managing Python wheels for a RISC-V platform, in the context of building Cartesi Dapps
The available tasks are:
- build: Builds the Python wheels based on the requirements specified in the PIP_REQUIREMENTS_FILE. It uses a docker image to make all the builds specified.
- create-pip-index: Creates the necessary files for the pip index, including the wheel files and the index HTML file.
- clean: Cleans up the pip index directory.
- serve-local-index: Serves a local pip index using the generated wheel files.
- config: Displays the current configuration values.
The configuration variables are:
PIP_INDEX_URL
: The URL of the pip index where the wheel files will be uploaded. Defaults tohttps://think-and-dev.github.io/riscv-python-wheels/pip-index/
PIP_TRUSTED_HOST
: The trusted host for the pip index. Defaults tothink-and-dev.github.io
PIP_OUTPUT_REL_DIR
: The relative directory where the wheel files will be stored. Defaults to./wheels
PIP_REQUIREMENTS_FILE
: The file containing the Python package requirements. Defaults topackages-to-build.requirements.txt
PIP_INDEX_DIR
: The directory where the pip index files will be stored. Defaults topip-index
WHL_BINARY_BASE_URL
: The base URL for the binary wheel files. Defaults tohttps://raw.githubusercontent.com/think-and-dev/riscv-python-wheels/main/wheels
LOCAL_INDEX_PORT
: The port number for serving the local pip index. Defaults to8000
TMP_LOCAL_INDEX_DIR
: The temporary directory for the local pip index. Defaults to./local-pip-index
In order to modify the variables used, include the new variables in the make task call. For example:
make build PIP_REQUIREMENTS_FILE=../mycustomproject/requirements.txt
- Complete python requirements file with the needed packages
- Build the requirements by calling the build task
make build
- Fork the repository.
- Create a branch for your contribution.
- Add the wheels you wish to contribute in the
wheels
folder.- Wheels can be built using the
build
task.
- Wheels can be built using the
- Execute the
create-pip-index
task to generate the pip index. - Submit a pull request.
Warning
Ensure that the wheels are placed in the wheels
folder, and that the create-pip-index
task was run, so the wheel can be easily installed.