colcon-python-setup-py is an extension for the colcon build system that enables it to properly discover, configure, and build Python packages that define their metadata using a `setup.py` file. It ensures `colcon` can correctly handle Python packages, resolve their dependencies, and integrate them into a larger workspace. The current version is 0.2.9, with active development and infrequent but stable releases, typically every 3-9 months.
pip install colcon-python-setup-pyNo compatibility data collected yet for this library.
This quickstart demonstrates how to set up a `colcon` workspace, create a basic Python package with a `setup.py` file, and then use `colcon build` to compile and install it. The `colcon-python-setup-py` extension automatically detects the `setup.py` file and uses it to build the package.
Ensure your package has a `setup.py` file. If migrating to `pyproject.toml`, consider other `colcon` extensions or ensure `pyproject.toml` delegates to `setup.py` or uses a compatible build backend.
Before installing or using `colcon-python-setup-py`, make sure `colcon-core` is installed: `pip install colcon-core`.
Carefully review your `setup.py` according to `setuptools` documentation. Use `python setup.py install --prefix /tmp/test_install` to test the `setup.py` in isolation.
Install `colcon-core`: `pip install colcon-core`.
Verify that `colcon-python-setup-py` is installed (`pip show colcon-python-setup-py`). Ensure your package's `setup.py` file is correctly located at the root of your package directory within the `src` folder. Check for typos or incorrect file permissions.
Add the missing dependency to the `install_requires` list in your `setup.py`. If it's a system dependency, ensure it's installed on your system. If the package has complex build steps, consider adding a custom `build` hook if necessary.