diff --git a/bindings/python/benchmark/BUILD b/bindings/python/google_benchmark/BUILD similarity index 91% rename from bindings/python/benchmark/BUILD rename to bindings/python/google_benchmark/BUILD index 49f536e6..3c1561f4 100644 --- a/bindings/python/benchmark/BUILD +++ b/bindings/python/google_benchmark/BUILD @@ -1,7 +1,7 @@ load("//bindings/python:build_defs.bzl", "py_extension") py_library( - name = "benchmark", + name = "google_benchmark", srcs = ["__init__.py"], visibility = ["//visibility:public"], deps = [ @@ -32,7 +32,7 @@ py_test( srcs_version = "PY3", visibility = ["//visibility:public"], deps = [ - ":benchmark", + ":google_benchmark", ], ) diff --git a/bindings/python/benchmark/__init__.py b/bindings/python/google_benchmark/__init__.py similarity index 100% rename from bindings/python/benchmark/__init__.py rename to bindings/python/google_benchmark/__init__.py diff --git a/bindings/python/benchmark/benchmark.cc b/bindings/python/google_benchmark/benchmark.cc similarity index 100% rename from bindings/python/benchmark/benchmark.cc rename to bindings/python/google_benchmark/benchmark.cc diff --git a/bindings/python/benchmark/example.py b/bindings/python/google_benchmark/example.py similarity index 85% rename from bindings/python/benchmark/example.py rename to bindings/python/google_benchmark/example.py index 7c8e3064..e9684624 100644 --- a/bindings/python/benchmark/example.py +++ b/bindings/python/google_benchmark/example.py @@ -13,14 +13,14 @@ # limitations under the License. """Example of Python using C++ benchmark framework. -To run this example, you must first install the `benchmark` Python package. +To run this example, you must first install the `google_benchmark` Python package. -To install using `setup.py`, download and extract the `benchmark` source. +To install using `setup.py`, download and extract the `google_benchmark` source. In the extracted directory, execute: python setup.py install """ -import benchmark +import google_benchmark as benchmark @benchmark.register diff --git a/setup.py b/setup.py index f4c06334..a2b0b917 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ IS_WINDOWS = sys.platform.startswith('win') def _get_version(): """Parse the version string from __init__.py.""" - with open(os.path.join(here, 'bindings', 'python', 'benchmark', '__init__.py')) as f: + with open(os.path.join(here, 'bindings', 'python', 'google_benchmark', '__init__.py')) as f: try: version_line = next( line for line in f if line.startswith('__version__')) @@ -95,7 +95,7 @@ class BuildBazelExtension(build_ext.build_ext): setuptools.setup( - name='google-benchmark', + name='google_benchmark', version=_get_version(), url='https://github.com/google/benchmark', description='A library to benchmark code snippets.', @@ -106,7 +106,7 @@ setuptools.setup( packages=setuptools.find_packages('bindings/python'), install_requires=_parse_requirements('bindings/python/requirements.txt'), cmdclass=dict(build_ext=BuildBazelExtension), - ext_modules=[BazelExtension('benchmark._benchmark', '//bindings/python/benchmark:_benchmark')], + ext_modules=[BazelExtension('google_benchmark._benchmark', '//bindings/python/google_benchmark:_benchmark')], zip_safe=False, # PyPI package information. classifiers=[ @@ -116,6 +116,7 @@ setuptools.setup( 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'Topic :: Software Development :: Testing', 'Topic :: System :: Benchmark', ],