File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed
Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change 141141 Timestamp ,
142142)
143143
144- # Import examples last, because they reference this top-level package.
145-
144+ # Import examples second-to-last, because they reference this top-level package.
146145from cirq import examples
146+
147+ # Import version last since it is a relative import.
148+ from ._version import __version__
Original file line number Diff line number Diff line change 1+ # Copyright 2018 Google LLC
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # https://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ """Define version number here and read it from setup.py automatically"""
16+ __version__ = "0.1"
Original file line number Diff line number Diff line change 1414
1515from setuptools import find_packages , setup
1616
17+ # This reads the __version__ variable from cirq/_version.py
18+ exec (open ('cirq/_version.py' ).read ())
19+
1720# Read in requirements.txt
1821requirements = open ('requirements.txt' ).readlines ()
1922requirements = [r .strip () for r in requirements ]
2023
2124setup (
2225 name = 'cirq' ,
23- version = '0.1' ,
26+ version = __version__ ,
2427 url = 'http://github.com/quantumlib/cirq' ,
2528 author = 'The Cirq Developers' ,
2629 install_requires = requirements ,
You can’t perform that action at this time.
0 commit comments