old_contents: # Copyright 2020 The TensorFlow Quantum Authors. All Rights Reserved.
  #
  # 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
  #
  #     http://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.
  # ==============================================================================
  """Setup for pip package."""
  from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  
  from setuptools import Extension
  from setuptools import find_packages
  from setuptools import setup
  from setuptools.dist import Distribution
  from setuptools.command.install import install
  
  
  class InstallPlatlib(install):
      """Workaround so .so files in generated wheels
      can be seen by auditwheel."""
  
      def finalize_options(self):
          install.finalize_options(self)
          if self.distribution.has_ext_modules():
              self.install_lib = self.install_platlib
  
  
  REQUIRED_PACKAGES = ['cirq >= 0.7.0', 'tensorflow >= 2.1.0']
  
  
  class BinaryDistribution(Distribution):
      """This class is needed in order to create OS specific wheels."""
  
      def has_ext_modules(self):
          return True
  
  
  setup(
      name='tensorflow-quantum',
      version='0.2.0',
      description=
      'TensorFlow Quantum is a library for hybrid quantum-classical machine learning.',
      author='Google Inc.',
      author_email='no-reply@google.com',
      url='https://github.com/tensorflow/quantum/',
      packages=find_packages(),
      install_requires=REQUIRED_PACKAGES,
      # Add in any packaged data.
      include_package_data=True,
      #ext_modules=[Extension('_foo', ['stub.cc'])],
      zip_safe=False,
      distclass=BinaryDistribution,
      # PyPI package information.
      classifiers=[
          'Development Status :: 3 - Alpha',
          'Intended Audience :: Developers',
          'Intended Audience :: Education',
          'Intended Audience :: Science/Research',
          'Programming Language :: Python :: 3',
          'Programming Language :: Python :: 3.6',
          'Programming Language :: Python :: 3.7',
          'Topic :: Scientific/Engineering',
          'Topic :: Scientific/Engineering :: Artificial Intelligence',
          'Topic :: Scientific/Engineering :: Mathematics',
          'Topic :: Scientific/Engineering :: Physics',
      ],
      license='Apache 2.0',
      keywords='tensorflow machine learning quantum qml',
      cmdclass={'install': InstallPlatlib})
  
new_contents: # Copyright 2020 The TensorFlow Quantum Authors. All Rights Reserved.
  #
  # 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
  #
  #     http://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.
  # ==============================================================================
  """Setup for pip package."""
  from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  
  import sys
  
  from setuptools import Extension
  from setuptools import find_packages
  from setuptools import setup
  from setuptools.dist import Distribution
  from setuptools.command.install import install
  
  
  class InstallPlatlib(install):
      """Workaround so .so files in generated wheels
      can be seen by auditwheel."""
  
      def finalize_options(self):
          install.finalize_options(self)
          if self.distribution.has_ext_modules():
              self.install_lib = self.install_platlib
  
  
  REQUIRED_PACKAGES = ['cirq >= 0.7.0', 'tensorflow >= 2.1.0']
  
  
  class BinaryDistribution(Distribution):
      """This class is needed in order to create OS specific wheels."""
  
      def has_ext_modules(self):
          return True
  
  
  if 'nightly' in sys.argv:
      nightly = True
      sys.argv.remove('nightly')
  else:
      nightly = False
  
  if nightly:
      project_name = 'tfq-nightly'
  else:
      project_name = 'tensorflow-quantum'
  
  setup(
      name=project_name,
      version='0.2.0',
      description=
      'TensorFlow Quantum is a library for hybrid quantum-classical machine learning.',
      author='Google Inc.',
      author_email='no-reply@google.com',
      url='https://github.com/tensorflow/quantum/',
      packages=find_packages(),
      install_requires=REQUIRED_PACKAGES,
      # Add in any packaged data.
      include_package_data=True,
      #ext_modules=[Extension('_foo', ['stub.cc'])],
      zip_safe=False,
      distclass=BinaryDistribution,
      # PyPI package information.
      classifiers=[
          'Development Status :: 3 - Alpha',
          'Intended Audience :: Developers',
          'Intended Audience :: Education',
          'Intended Audience :: Science/Research',
          'Programming Language :: Python :: 3',
          'Programming Language :: Python :: 3.6',
          'Programming Language :: Python :: 3.7',
          'Topic :: Scientific/Engineering',
          'Topic :: Scientific/Engineering :: Artificial Intelligence',
          'Topic :: Scientific/Engineering :: Mathematics',
          'Topic :: Scientific/Engineering :: Physics',
      ],
      license='Apache 2.0',
      keywords='tensorflow machine learning quantum qml',
      cmdclass={'install': InstallPlatlib})
  
subject: Add nightly in setup.py (#113)