From 6f55acec97173285913f30b8d78b93e48d64658d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 22 Mar 2022 09:04:41 -0700 Subject: [PATCH 1/5] README.rst: Update for PEP 517 build --- README.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index 01a973df..e5e568da 100644 --- a/README.rst +++ b/README.rst @@ -24,9 +24,8 @@ Otherwise, read on. Prerequisites ============= -CyLP depends on Numpy (www.numpy.org) and Scipy (www.scipy.org). Please note that -Numpy does need to be installed prior to installing CyLP, -even though it is listed as a dependency in the `setup.py` file. +CyLP depends on `NumPy `_ and `Cython `. + Optional step: If you want to run the doctests (i.e. ``make doctest`` in the ``doc`` directory) you should also define:: From 3a9b970a9712fbbb56379a9d686fd5c73ebfdd1a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 22 Mar 2022 09:05:26 -0700 Subject: [PATCH 2/5] README: OS X -> macOS --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index e5e568da..e8f05164 100644 --- a/README.rst +++ b/README.rst @@ -38,11 +38,11 @@ or by building yourself from source using `coinbrew Date: Tue, 22 Mar 2022 09:05:41 -0700 Subject: [PATCH 3/5] README.rst: Update URL for Sphinx --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index e8f05164..470f237e 100644 --- a/README.rst +++ b/README.rst @@ -141,7 +141,7 @@ You may access CyLP's documentation: 1. *Online* : Please visit http://coin-or.github.io/CyLP/ 2. *Offline* : To install CyLP's documentation in your repository, you need - Sphinx (http://sphinx-doc.org/). You can generate the documentation by + Sphinx (https://www.sphinx-doc.org/). You can generate the documentation by going to cylp/doc and run ``make html`` or ``make latex`` and access the documentation under cylp/doc/build. You can also run ``make doctest`` to perform all the doctest. From 223c8b90100b33154241a52665ae991b4b9803f5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 22 Mar 2022 09:13:46 -0700 Subject: [PATCH 4/5] README.rst: Add link to CVXPY --- README.rst | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 470f237e..812d8d55 100644 --- a/README.rst +++ b/README.rst @@ -148,10 +148,17 @@ You may access CyLP's documentation: Who uses CyLP ============== -CyLP is being used in a wide range of practical and research fields. Some of the users include: -#. PyArt, The Python ARM Radar Toolkit, used by Atmospheric Radiation Measurement - (U.S. Department of energy). https://github.com/ARM-DOE/pyart +The following software packages make use of CyLP: +#. `CVXPY `_, a Python-embedded modeling language for + convex optimization problems, uses CyLP for interfacing to CBC, which is one + of the `supported mixed-integer solvers + `_. + +CyLP has been used in a wide range of practical and research fields. Some of the users include: + +#. `PyArt `_, The Python ARM Radar Toolkit, + used by Atmospheric Radiation Measurement (U.S. Department of energy). #. Meteorological Institute University of Bonn. #. Sherbrooke university hospital (Centre hospitalier universitaire de Sherbrooke): CyLP is used for nurse scheduling. #. Maisonneuve-Rosemont hospital (L'hôpital HMR): CyLP is used for physician scheduling with preferences. From 39fc43b75dff4988cf4ddccc6a8530bec4323521 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 22 Mar 2022 12:57:32 -0700 Subject: [PATCH 5/5] README.rst: Separate sections for binary wheel, conda, pip --- README.rst | 61 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 19 deletions(-) diff --git a/README.rst b/README.rst index 812d8d55..5d0c4eb5 100644 --- a/README.rst +++ b/README.rst @@ -21,33 +21,57 @@ https://hub.docker.com/repository/docker/coinor/cylp Otherwise, read on. -Prerequisites -============= +Prerequisites and installation +============================== + +On Windows: Installation as a binary wheel +--------------------------------------- + +On Windows, a binary wheel is available and it is not necessary to install Cbc. +Just do:: + + $ python -m pip install cylp + +On Linux/macOS with conda: Installation from source +--------------------------------------------------- CyLP depends on `NumPy `_ and `Cython `_. 1. To install Cbc in Linux, the easiest way is to use a package manager. Install `coinor-libcbc-dev` on Ubuntu/Debian - or `coin-or-Cbc-devel` on Fedora. Cbc is also available on Linux through conda with - - ``$ conda create -n cbc coin-or-cbc numpy pkg-config -c conda-forge`` + or `coin-or-Cbc-devel` on Fedora. #. On macOS, it is easiest to install Cbc with homebrew: ``$ brew install cbc pkg-config`` - Cbc is also available on macOS through conda with - - ``$ conda create -n cbc coin-or-cbc numpy pkg-config -c conda-forge`` - -#. On Windows, a binary wheel is available and it is not necessary to install Cbc. - You should no longer need to build Cbc from source on any platform unless for some reason, none of the above recipes applies to you. If you do need to build from source, please go to the `Cbc `_ project page and follow the instructions there. After building and installing, make sure to @@ -55,11 +79,7 @@ either set the `COIN_INSTALL_DIR` variable to point to the installation or set ` the directory where the `.pc` files are installed. You may also need to set either `LD_LIBRARY_PATH` (Linux) or `DYLD_LIBRARY_PATH` (macOS). -Installation -============ - -If you are building against the `coin-or-cbc` package installed by conda, be sure to conda install `pkg-config`, -which is needed to find the Cbc libraries installed by conda. Once Cbc is installed, simply do:: +Next, build and install CyLP:: $ python -m pip install cylp @@ -67,6 +87,9 @@ This will build CyLP in an isolated environment that provides the build prerequi and install it together with its runtime dependencies (`install-requires`), NumPy and `SciPy `. +Testing your installation +========================= + Optional step: If you want to run the doctests (i.e. ``make doctest`` in the ``doc`` directory) you should also define::