Skip to content

Commit

Permalink
Adds a version file
Browse files Browse the repository at this point in the history
  • Loading branch information
babbush authored and dabacon committed Apr 17, 2018
1 parent b232b18 commit f2d55e9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
6 changes: 4 additions & 2 deletions cirq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
Timestamp,
)

# Import examples last, because they reference this top-level package.

# Import examples second-to-last, because they reference this top-level package.
from cirq import examples

# Import version last since it is a relative import.
from ._version import __version__
16 changes: 16 additions & 0 deletions cirq/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Define version number here and read it from setup.py automatically"""
__version__ = "0.1"
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@

from setuptools import find_packages, setup

# This reads the __version__ variable from cirq/_version.py
exec(open('cirq/_version.py').read())

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

setup(
name='cirq',
version='0.1',
version=__version__,
url='http://github.com/quantumlib/cirq',
author='The Cirq Developers',
install_requires=requirements,
Expand Down

0 comments on commit f2d55e9

Please sign in to comment.