quantumlib / Cirq

A Python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
Apache License 2.0
4.24k stars 1.01k forks source link

Update produce-package.sh script #6623

Open pavoljuhas opened 4 months ago

pavoljuhas commented 4 months ago

Description of the issue

The release script "dev_tools/packaging/produce-package.sh dist" uses setup.py to build wheels resulting in the following warnings

SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!

TODO

Switch to up-to-date wheel builder. Consider making the wheels reproducible and timestamped.

Cirq version

1.4.0.dev at ab8697909c0d253570c129006d3842a671dcd678

NoureldinYosri commented 4 months ago

I faced this issue before... using pip install . should work unless the setup.py file has dependencies not in the default environment in which case they will need to added to the pyproject.toml file as

[build-system]
requires = ["setuptools", "wheel", ...etc]
pavoljuhas commented 4 months ago

The issue here is that the packaging script calls setup.py here - https://github.com/quantumlib/Cirq/blob/ab8697909c0d253570c129006d3842a671dcd678/dev_tools/packaging/produce-package.sh#L69 which is a deprecated way of building wheels that needs to be replaced.