From bac90a31a3c636920e84387904676ef2e3e2369f Mon Sep 17 00:00:00 2001 From: Deepanshu Garg <51968302+deepanshu2609@users.noreply.github.com> Date: Wed, 25 Mar 2026 13:55:08 +0530 Subject: [PATCH 1/2] Update README with wheel building instructions Added section on building a combined docplex and cplex wheel for simplified distribution. --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/README.md b/README.md index 23e2cac..8a55b88 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,44 @@ This ensures DOcplex correctly detects your CPLEX installation. DOcplex provides a higher-level API and works with both CPLEX and IBM Decision Optimization on Cloud. See the [DOcplex examples repository](https://github.com/IBMDecisionOptimization/docplex/tree/master/examples) for more information. +## Building a Combined docplex + cplex Wheel + +This section explains how to create a single Python wheel (.whl) that bundles both docplex and cplex packages, enabling simplified distribution and configuration. +This approach is intended for advanced users who need to package an existing Python environment (for example, a virtual environment containing cplex) into a single wheel. + +By configuring [setup.cfg](https://github.com/IBMDecisionOptimization/docplex/blob/master/setup.cfg ), you can generate a single wheel that contains both packages. + +``` + [options] +- packages = find: +- install_requires = six ++package_dir = ++ = /home/cdoens/Development/IBM/tmp/python-env-3.11/lib/python3.11/site-packages ++packages = find: ++python_requires = >=3.7 ++install_requires = ++ six ++ ++[options.packages.find] ++where = /home/cdoens/Development/IBM/tmp/python-env-3.11/lib/python3.11/site-packages ++include = cplex*, docplex* + + [options.entry_points] + console_scripts = + docplex = docplex.util.cli:main +``` +### Building the Wheel + +From the directory containing setup.cfg, run: +``` +pip wheel . +``` + +The resulting wheel is fully compatible with: +``` +docplex --config +``` +which correctly detects and configures the bundled cplex. ## Get the documentation and examples From ba07da3f151ba43638fdafdbfd4715249a83e97d Mon Sep 17 00:00:00 2001 From: Deepanshu Garg <51968302+deepanshu2609@users.noreply.github.com> Date: Wed, 25 Mar 2026 14:15:21 +0530 Subject: [PATCH 2/2] Update README.md with formatting corrections --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8a55b88..15f6960 100644 --- a/README.md +++ b/README.md @@ -70,14 +70,14 @@ By configuring [setup.cfg](https://github.com/IBMDecisionOptimization/docplex/bl - packages = find: - install_requires = six +package_dir = -+ = /home/cdoens/Development/IBM/tmp/python-env-3.11/lib/python3.11/site-packages ++ = /lib/python/site-packages +packages = find: +python_requires = >=3.7 +install_requires = + six + +[options.packages.find] -+where = /home/cdoens/Development/IBM/tmp/python-env-3.11/lib/python3.11/site-packages ++where = /lib/python/site-packages +include = cplex*, docplex* [options.entry_points]