Qiskit / qiskit-aer

Aer is a high performance simulator for quantum circuits that includes noise models
https://qiskit.github.io/qiskit-aer/
Apache License 2.0
464 stars 354 forks source link

Migrate from scikit-build to scikit-build-core #2139

Open mtreinish opened 1 month ago

mtreinish commented 1 month ago

What is the expected behavior?

The next generation of scikit-build is scikit-build-core: https://github.com/scikit-build/scikit-build-core and it looks like it'd be much easier to maintain for managing our builds of python packages. We should investigate moving qiskit-aer over to use scikit-build-core instead of scikit-build.

There is a migration guide in the documentation here: https://scikit-build-core.readthedocs.io/en/latest/migration_guide.html

CC @wshanks

doichanj commented 2 weeks ago

I have started migrating, but I found difficulty, Aer uses environment variable to define package name for qiskit-aer or qiskit-aer-gpu in setup.py https://github.com/Qiskit/qiskit-aer/blob/5e40517f311d1ff20eb070f3f01c1a5315748399/setup.py#L12 I have no idea how to define multiple package name in pyproject.toml, because tool.setuptools.dynamic does not allow name

wshanks commented 2 weeks ago

Hmm, you mention tool.setuptools.dynamic but the topic is about migrating to scikit-build-core. Can you use the regex plugin? I have not tested if it works or not for making a dynamic name:

https://scikit-build-core.readthedocs.io/en/latest/configuration.html#dynamic-metadata