Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Build cvxpy-base (Issue 1478) #1485

Merged
merged 3 commits into from Sep 30, 2021
Merged

Conversation

phschiele
Copy link
Collaborator

Discussion: #1478

@SteveDiamond as discussed, this additional action publishes cvxpy-base on PyPi, i.e. without any solvers preinstalled.

I have done a test run on TestPyPI, which worked well.
It can be tried using:

# Dependency not available on TestPyPI
pip install scipy
pip install --index-url https://test.pypi.org/simple/ cvxpy-base

It would only run with the next tagged release, but one could upload the current 1.1.15 version by disabling the ${{env.DEPLOY == 'True'}} checks for one commit.

I have added a small section to the docs as well.

phschiele and others added 2 commits September 29, 2021 09:24
* add actions for building cvxpy-base

* Make sed work on MacOS

* Check python version

* Remove 'need'

* Fix

* use python3

* Test if conda sets up python

* Upload to test pypi

* Specify python version explicitly

* Different flag to upload to pypi

* Use python3 for twine call

* retry without default shell

* Add shell to additional envs

* setup python action

* fix

* Final changes
Comment on lines +146 to +149
sed -i.bak -e "s/name='cvxpy',/name='cvxpy-base',/g" setup.py
sed -i.bak '/osqp >= /d' setup.py
sed -i.bak '/ecos >= /d' setup.py
sed -i.bak '/scs >= /d' setup.py
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is basically the complete logic and the assumptions made about the contents of setup.py.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So basically are you removing the solvers from the dependencies?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Precisely 👍🏻 I thought it would be easier to maintain compared to having a second file.

CIBW_BUILD: "cp3${{env.PYTHON_SUBVERSION}}-*"
CIBW_SKIP: "*-win32 *-manylinux_i686"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_24
uses: joerick/cibuildwheel@v1.11.0
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small technical detail: the wheels do not allow hyphens, so the wheel file is automatically renamed to cvxpy_base*. This has no effect on the pip installation.

Copy link
Collaborator

@SteveDiamond SteveDiamond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SteveDiamond SteveDiamond requested review from akshayka and rileyjmurray and removed request for akshayka September 29, 2021 19:15
@SteveDiamond SteveDiamond merged commit 438767c into cvxpy:master Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants