Skip to content

Simplify python package description #7187

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

Merged
merged 6 commits into from
Mar 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cirq-aqt/cirq_aqt/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

"""Define version number here, read it from setup.py automatically"""

__version__ = "1.5.0.dev"
__version__ = "1.5.0.dev0"
2 changes: 1 addition & 1 deletion cirq-aqt/cirq_aqt/_version_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@


def test_version():
assert cirq_aqt.__version__ == "1.5.0.dev"
assert cirq_aqt.__version__ == "1.5.0.dev0"
32 changes: 6 additions & 26 deletions cirq-aqt/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import io
import os
import runpy

from setuptools import find_packages, setup

# This reads the __version__ variable from cirq/_version.py
__version__ = ''
exec(open('cirq_aqt/_version.py').read())
# This reads the __version__ variable from cirq_aqt/_version.py
__version__ = runpy.run_path('cirq_aqt/_version.py')['__version__']
assert __version__, 'Version string cannot be empty'

name = 'cirq-aqt'

Expand All @@ -27,24 +27,7 @@
)

# README file as long_description.
long_description = io.open('README.md', encoding='utf-8').read()

# If CIRQ_PRE_RELEASE_VERSION is set then we update the version to this value.
# It is assumed that it ends with one of `.devN`, `.aN`, `.bN`, `.rcN` and hence
# it will be a pre-release version on PyPi. See
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#pre-release-versioning
# for more details.
if 'CIRQ_PRE_RELEASE_VERSION' in os.environ:
__version__ = os.environ['CIRQ_PRE_RELEASE_VERSION']
long_description = (
"<div align='center' width='50%'>\n\n"
"| ⚠️ WARNING |\n"
"|:----------:|\n"
"| **This is a development version of `cirq-aqt` and may be<br>"
"unstable. For the latest stable release of `cirq-aqt`,<br>"
"please visit** <https://pypi.org/project/cirq-aqt>.|\n"
"\n</div>\n\n" + long_description
)
long_description = open('README.md', encoding='utf-8').read()

# Read in requirements
requirements = open('requirements.txt').readlines()
Expand All @@ -55,9 +38,6 @@
'cirq_aqt.' + package for package in find_packages(where='cirq_aqt')
]

# Sanity check
assert __version__, 'Version string cannot be empty'

setup(
name=name,
version=__version__,
Expand Down
2 changes: 1 addition & 1 deletion cirq-core/cirq/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
'of cirq (e.g. "python -m pip install cirq==1.1.*")'
)

__version__ = "1.5.0.dev"
__version__ = "1.5.0.dev0"
2 changes: 1 addition & 1 deletion cirq-core/cirq/_version_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@


def test_version():
assert cirq.__version__ == "1.5.0.dev"
assert cirq.__version__ == "1.5.0.dev0"
30 changes: 5 additions & 25 deletions cirq-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import io
import os
import runpy

from setuptools import find_packages, setup

# This reads the __version__ variable from cirq/_version.py
__version__ = ''
exec(open('cirq/_version.py').read())
__version__ = runpy.run_path('cirq/_version.py')['__version__']
assert __version__, 'Version string cannot be empty'

name = 'cirq-core'

Expand All @@ -28,24 +28,7 @@
)

# README file as long_description.
long_description = io.open('README.md', encoding='utf-8').read()

# If CIRQ_PRE_RELEASE_VERSION is set then we update the version to this value.
# It is assumed that it ends with one of `.devN`, `.aN`, `.bN`, `.rcN` and hence
# it will be a pre-release version on PyPi. See
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#pre-release-versioning
# for more details.
if 'CIRQ_PRE_RELEASE_VERSION' in os.environ:
__version__ = os.environ['CIRQ_PRE_RELEASE_VERSION']
long_description = (
"<div align='center' width='50%'>\n\n"
"| ⚠️ WARNING |\n"
"|:----------:|\n"
"| **This is a development version of `cirq-core` and may be<br>"
"unstable. For the latest stable release of `cirq-core`,<br>"
"please visit** <https://pypi.org/project/cirq-core>.|\n"
"\n</div>\n\n" + long_description
)
long_description = open('README.md', encoding='utf-8').read()

# Read in requirements
requirements = open('requirements.txt').readlines()
Expand All @@ -58,9 +41,6 @@
'cirq.' + package for package in find_packages(where='cirq', exclude=['google', 'google.*'])
]

# Sanity check
assert __version__, 'Version string cannot be empty'

setup(
name=name,
version=__version__,
Expand Down
2 changes: 1 addition & 1 deletion cirq-google/cirq_google/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
'of cirq (e.g. "python -m pip install cirq==1.1.*")'
)

__version__ = "1.5.0.dev"
__version__ = "1.5.0.dev0"
2 changes: 1 addition & 1 deletion cirq-google/cirq_google/_version_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@


def test_version():
assert cirq_google.__version__ == "1.5.0.dev"
assert cirq_google.__version__ == "1.5.0.dev0"
29 changes: 4 additions & 25 deletions cirq-google/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import runpy

from setuptools import find_packages, setup

# This reads the __version__ variable from cirq_google/_version.py
__version__ = ''
exec(open('cirq_google/_version.py').read())
__version__ = runpy.run_path('cirq_google/_version.py')['__version__']
assert __version__, 'Version string cannot be empty'

name = 'cirq-google'

Expand All @@ -28,31 +29,9 @@
# README file as long_description.
long_description = open('README.md', encoding='utf-8').read()

# If CIRQ_PRE_RELEASE_VERSION is set then we update the version to this value.
# It is assumed that it ends with one of `.devN`, `.aN`, `.bN`, `.rcN` and hence
# it will be a pre-release version on PyPi. See
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#pre-release-versioning
# for more details.
if 'CIRQ_PRE_RELEASE_VERSION' in os.environ:
__version__ = os.environ['CIRQ_PRE_RELEASE_VERSION']
long_description = (
"<div align='center' width='50%'>\n\n"
"| ⚠️ WARNING |\n"
"|:----------:|\n"
"| **This is a development version of `cirq-google` and may be<br>"
"unstable. For the latest stable release of `cirq-google`,<br>"
"please visit** <https://pypi.org/project/cirq-google>.|\n"
"\n</div>\n\n" + long_description
)

# Read in requirements
requirements = open('requirements.txt').readlines()
requirements = [r.strip() for r in requirements]

# Sanity check
assert __version__, 'Version string cannot be empty'

# This is a pure metapackage that installs all our packages
requirements += [f'cirq-core=={__version__}']


Expand Down
2 changes: 1 addition & 1 deletion cirq-ionq/cirq_ionq/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

"""Define version number here, read it from setup.py automatically"""

__version__ = "1.5.0.dev"
__version__ = "1.5.0.dev0"
2 changes: 1 addition & 1 deletion cirq-ionq/cirq_ionq/_version_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@


def test_version():
assert cirq_ionq.__version__ == "1.5.0.dev"
assert cirq_ionq.__version__ == "1.5.0.dev0"
34 changes: 7 additions & 27 deletions cirq-ionq/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,50 +12,30 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import io
import os
import runpy

from setuptools import find_packages, setup

# This reads the __version__ variable from cirq/_version.py
__version__ = ''
exec(open('cirq_ionq/_version.py').read())
# This reads the __version__ variable from cirq_ionq/_version.py
__version__ = runpy.run_path('cirq_ionq/_version.py')['__version__']
assert __version__, 'Version string cannot be empty'

name = 'cirq-ionq'

description = 'A Cirq package to simulate and connect to IonQ quantum computers'

# README file as long_description.
long_description = io.open('README.md', encoding='utf-8').read()

# If CIRQ_PRE_RELEASE_VERSION is set then we update the version to this value.
# It is assumed that it ends with one of `.devN`, `.aN`, `.bN`, `.rcN` and hence
# it will be a pre-release version on PyPi. See
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#pre-release-versioning
# for more details.
if 'CIRQ_PRE_RELEASE_VERSION' in os.environ:
__version__ = os.environ['CIRQ_PRE_RELEASE_VERSION']
long_description = (
"<div align='center' width='50%'>\n\n"
"| ⚠️ WARNING |\n"
"|:----------:|\n"
"| **This is a development version of `cirq-ionq` and may be<br>"
"unstable. For the latest stable release of `cirq-ionq`,<br>"
"please visit** <https://pypi.org/project/cirq-ionq>.|\n"
"\n</div>\n\n" + long_description
)
long_description = open('README.md', encoding='utf-8').read()

# Read in requirements
requirements = open('requirements.txt').readlines()
requirements = [r.strip() for r in requirements]
requirements += [f'cirq-core=={__version__}']

cirq_packages = ['cirq_ionq'] + [
'cirq_ionq.' + package for package in find_packages(where='cirq_ionq')
]

# Sanity check
assert __version__, 'Version string cannot be empty'

requirements += [f'cirq-core=={__version__}']

setup(
name=name,
Expand Down
2 changes: 1 addition & 1 deletion cirq-pasqal/cirq_pasqal/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

"""Define version number here, read it from setup.py automatically"""

__version__ = "1.5.0.dev"
__version__ = "1.5.0.dev0"
2 changes: 1 addition & 1 deletion cirq-pasqal/cirq_pasqal/_version_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@


def test_version():
assert cirq_pasqal.__version__ == "1.5.0.dev"
assert cirq_pasqal.__version__ == "1.5.0.dev0"
32 changes: 6 additions & 26 deletions cirq-pasqal/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import io
import os
import runpy

from setuptools import find_packages, setup

# This reads the __version__ variable from cirq/_version.py
__version__ = ''
exec(open('cirq_pasqal/_version.py').read())
# This reads the __version__ variable from cirq_pasqal/_version.py
__version__ = runpy.run_path('cirq_pasqal/_version.py')['__version__']
assert __version__, 'Version string cannot be empty'

name = 'cirq-pasqal'

description = 'A Cirq package to simulate and connect to Pasqal quantum computers'

# README file as long_description.
long_description = io.open('README.md', encoding='utf-8').read()

# If CIRQ_PRE_RELEASE_VERSION is set then we update the version to this value.
# It is assumed that it ends with one of `.devN`, `.aN`, `.bN`, `.rcN` and hence
# it will be a pre-release version on PyPi. See
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#pre-release-versioning
# for more details.
if 'CIRQ_PRE_RELEASE_VERSION' in os.environ:
__version__ = os.environ['CIRQ_PRE_RELEASE_VERSION']
long_description = (
"<div align='center' width='50%'>\n\n"
"| ⚠️ WARNING |\n"
"|:----------:|\n"
"| **This is a development version of `cirq-pasqal` and may be<br>"
"unstable. For the latest stable release of `cirq-pasqal`,<br>"
"please visit** <https://pypi.org/project/cirq-pasqal>.|\n"
"\n</div>\n\n" + long_description
)
long_description = open('README.md', encoding='utf-8').read()

# Read in requirements
requirements = open('requirements.txt').readlines()
requirements = [r.strip() for r in requirements]
# Sanity check
assert __version__, 'Version string cannot be empty'

requirements += [f'cirq-core=={__version__}']

cirq_packages = ['cirq_pasqal'] + [
Expand Down
2 changes: 1 addition & 1 deletion cirq-rigetti/cirq_rigetti/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

"""Define version number here, read it from setup.py automatically"""

__version__ = "1.5.0.dev"
__version__ = "1.5.0.dev0"
2 changes: 1 addition & 1 deletion cirq-rigetti/cirq_rigetti/_version_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@


def test_version():
assert cirq_rigetti.__version__ == "1.5.0.dev"
assert cirq_rigetti.__version__ == "1.5.0.dev0"
24 changes: 6 additions & 18 deletions cirq-rigetti/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import io
import os
import runpy

from setuptools import find_packages, setup

# This reads the __version__ variable from cirq/_version.py
__version__ = ''
exec(open('cirq_rigetti/_version.py').read())
# This reads the __version__ variable from cirq_rigetti/_version.py
__version__ = runpy.run_path('cirq_rigetti/_version.py')['__version__']
assert __version__, 'Version string cannot be empty'

name = 'cirq-rigetti'

description = 'A Cirq package to simulate and connect to Rigetti quantum computers and Quil QVM'

# README file as long_description.
long_description = io.open('README.md', encoding='utf-8').read()

# If CIRQ_PRE_RELEASE_VERSION is set then we update the version to this value.
# It is assumed that it ends with one of `.devN`, `.aN`, `.bN`, `.rcN` and hence
# it will be a pre-release version on PyPi. See
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#pre-release-versioning
# for more details.
if 'CIRQ_PRE_RELEASE_VERSION' in os.environ:
__version__ = os.environ['CIRQ_PRE_RELEASE_VERSION']
long_description = open('README.md', encoding='utf-8').read()

# Read in requirements
requirements = open('requirements.txt').readlines()
requirements = [r.strip() for r in requirements]

# Sanity check
assert __version__, 'Version string cannot be empty'

requirements += [f'cirq-core=={__version__}']

cirq_packages = ['cirq_rigetti'] + [
Expand Down
2 changes: 1 addition & 1 deletion cirq-web/cirq_web/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "1.5.0.dev"
__version__ = "1.5.0.dev0"
2 changes: 1 addition & 1 deletion cirq-web/cirq_web/_version_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@


def test_version():
assert cirq_web.__version__ == "1.5.0.dev"
assert cirq_web.__version__ == "1.5.0.dev0"
Loading