cvxpy icon indicating copy to clipboard operation
cvxpy copied to clipboard

Draft: fix #2503 , turn `cvxpy` into meta-package that depends on `cvxpy-base`

Open enzbus opened this issue 1 year ago • 7 comments

Description

See discussion in #2503, improve compatibility between cvxpy and cvxpy-base dependents.

Type of change

  • [ X] New feature (backwards compatible)
  • [ ] New feature (breaking API changes)
  • [ ] Bug fix
  • [ ] Other (Documentation, CI, ...)

Contribution checklist

  • [ ] Add our license to new files.
  • [ ] Check that your code adheres to our coding style.
  • [ ] Write unittests.
  • [ ] Run the unittests and check that they’re passing.
  • [ ] Run the benchmarks to make sure your change doesn’t introduce a regression.

enzbus avatar Mar 08 '25 14:03 enzbus

@PTNobel all the CI seems to pass except for the benchmarks (I presume its because no solvers is being installed).

Also, could you explain the changes you made to the PR? I don't quite follow the CI meta-package logic.

Transurgeon avatar Jun 25 '25 18:06 Transurgeon

Also, could you explain the changes you made to the PR? I don't quite follow the CI meta-package logic.

Basically, for each step of the build process, we also do it in the meta-package directory. However, we only make a sdist for the meta package, since there's no code to be compiled

PTNobel avatar Jun 25 '25 20:06 PTNobel

I think this will change what gets installed when installing from git, it will only install cvxpy-base now. Not sure if that's an issue though.

jonathanberthias avatar Jun 27 '25 09:06 jonathanberthias

Thanks for the code review @jonathanberthias ! I'm starting to worry that this PR needs more testing on master before it gets released.

PTNobel avatar Jun 29 '25 19:06 PTNobel

Thanks for the code review @jonathanberthias ! I'm starting to worry that this PR needs more testing on master before it gets released.

Glad to help! Let me know if/how I can contribute to this feature, I think it's a great improvement for downstream libraries.

jonathanberthias avatar Jul 02 '25 18:07 jonathanberthias

Glad to help! Let me know if/how I can contribute to this feature, I think it's a great improvement for downstream libraries.

If you want to take it over, I know nothing about Python packaging and seem to be lost enough

But otherwise, any doc pointers on how to do dynamic versioning would be appreciated

PTNobel avatar Jul 02 '25 23:07 PTNobel

@PTNobel @jonathanberthias as per discussion in the issue #2503 one thing that would help a lot here is to switch CVXPY versioning from custom code to standard setuptools_scm, which I have strong suspicion does pretty much the same thing. There is also need to write a custom setuptools hook to write the dependencies in the meta-package, because we want a dependency cvxpy-base==X.Y.Z where X.Y.Z are resolved dynamically. Just pushed a commit for just the meta-package pyproject.

enzbus avatar Jul 03 '25 11:07 enzbus