Registry / devops / setuptools-odoo

setuptools-odoo

JSON →
library3.3.2pypypiunverified

setuptools-odoo is a Python library that extends setuptools to simplify packaging and distribution of Odoo addons. It handles specific Odoo addon file structures and metadata, ensuring that module manifest files, static assets, and other Odoo-specific components are correctly included in Python packages. The current version is 3.3.2, with a fairly active release cadence primarily for compatibility updates and core addon list refreshes.

pip install setuptools-odoo
INSTALL
IMPORT
SIG · SETUPTOOLS-ODOO
S
setuptools-odoo
devopspythonv3.3.2
Install
2.3s avg
Import
Disk
22MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.3.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 21.1MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.3s · import 0.000s · 22MB
22MB installed
● package 22MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

find_packages
from setuptools_odoo import find_packages
from setuptools import find_packages
Use setuptools_odoo.find_packages for Odoo addon specific package discovery, as it handles manifest files.
OdooDistribution
from setuptools_odoo.dist import OdooDistribution
Required to enable Odoo-specific packaging features like the 'odoo_addons' option in setup().

To package an Odoo addon with setuptools-odoo, you typically define your build system in `pyproject.toml` and optionally use a `setup.py` for advanced `setuptools-odoo` specific configurations. The example demonstrates setting up `build-system` requirements in `pyproject.toml` and a basic `setup.py` that utilizes `OdooDistribution` and `odoo_addons=True` to correctly package an Odoo module.

# pyproject.toml [build-system] requires = ["setuptools>=61.0.0", "setuptools-odoo~=3.3.0", "wheel"] build-backend = "setuptools.build_meta" [project] name = "my_odoo_addon" version = "1.0.0" description = "My custom Odoo addon" authors = [ {name = "Your Name", email = "your@example.com"} ] readme = "README.md" license = {text = "MIT"} requires-python = ">=3.8" classifiers = [ "Framework :: Odoo", "Framework :: Odoo :: 16.0", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10" ] dependencies = [ # Add your Odoo module dependencies here, e.g., 'odoo>=16.0.0' ] # setup.py (optional, but needed for specific Odoo options) import setuptools from setuptools_odoo import find_packages, OdooDistribution if __name__ == '__main__': setuptools.setup( name="my_odoo_addon", version="1.0.0", # Should match pyproject.toml distclass=OdooDistribution, packages=find_packages(), include_package_data=True, odoo_addons=True, # Enable Odoo addon specific packaging # odoo_addon_dir='my_addon_dir', # Optional: if your addon is not at root zip_safe=False, )
setuptools-odoo --version
Debug
Known issues
breakingVersion 3.3.2 explicitly pins `setuptools<82`. Using `setuptools-odoo` with `setuptools` versions 82 or higher will lead to build errors due to incompatibilities.
fix
Ensure your project's `pyproject.toml` or `setup.py` build requirements explicitly pin `setuptools<82` (e.g., `setuptools~=69.0`).
affects: >=3.3.2
gotchaFor new projects, defining `setuptools-odoo` in `build-system.requires` in `pyproject.toml` is the modern and recommended approach. Relying on `setup_requires` directly in `setup.py` is considered legacy and may lead to issues with newer Python packaging tools.
fix
Always include `setuptools-odoo` in the `build-system.requires` section of your `pyproject.toml`.
affects: All versions
gotchaWhen using `odoo_addons=True` in `setup()`, it is crucial to also set `include_package_data=True` and ensure that `distclass=OdooDistribution` is specified. Failure to do so can result in missing manifest files, static assets, or other Odoo-specific data in your packaged distribution.
fix
In your `setup.py`, ensure your `setuptools.setup()` call includes `distclass=OdooDistribution`, `include_package_data=True`, and `odoo_addons=True`.
affects: All versions
Upgrade
Version history
3.3.2latest on PyPI · released Feb 9, 2026
Audit
Dependencies
setuptoolsrequiredCore dependency, extended by this library. Explicitly pinned for compatibility.
Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources
setuptools-odoo — pip install setuptools-odoo · libregistry