def test_explode(): actual = explode("dev_tools/requirements/test_data/a.req.txt") assert actual == [ 'a_dependency==0.2.3', '# this one has spaces in front and at the end accidentally', '# a comment', 'b', '# c is included', '# this one has no new line at the end', 'c', ], actual
# for more details. if 'CIRQ_PRE_RELEASE_VERSION' in os.environ: __version__ = os.environ['CIRQ_PRE_RELEASE_VERSION'] long_description = ( "**This is a development version of Cirq and may be " "unstable.**\n\n**For the latest stable release of Cirq " "see**\n`here <https://pypi.org/project/cirq>`__.\n\n" + long_description ) # Sanity check assert __version__, 'Version string cannot be empty' # This is a pure metapackage that installs all our packages requirements = [f'{p}=={__version__}' for p in ['cirq-core', 'cirq-google']] dev_requirements = explode('dev_tools/requirements/deps/dev-tools.txt') dev_requirements = [r.strip() for r in dev_requirements] setup( name=name, version=__version__, url='http://github.com/quantumlib/cirq', author='The Cirq Developers', author_email='*****@*****.**', python_requires=('>=3.6.0'), install_requires=requirements, extras_require={ 'dev_env': dev_requirements, }, license='Apache 2', description=description,
def test_validate_requirement_files(req): """Test that all req files are using valid requirements.""" assert len(explode(req)) > 0