def _create_test_package(script, name='version_pkg', vcs='git'):
    script.scratch_path.join(name).mkdir()
    version_pkg_path = script.scratch_path / name
    version_pkg_path.join("%s.py" % name).write(textwrap.dedent("""
        def main():
            print('0.1')
    """))
    version_pkg_path.join("setup.py").write(textwrap.dedent("""
        from setuptools import setup, find_packages
        setup(
            name='{name}',
            version='0.1',
            packages=find_packages(),
            py_modules=['{name}'],
            entry_points=dict(console_scripts=['{name}={name}:main'])
        )
    """.format(name=name)))
    return _vcs_add(script, version_pkg_path, vcs)
dataset/ETHPy150Open pypa/pip/tests/lib/__init__.py/_create_test_package/original