Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
benchmark
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
benchmark
Commits
39c8d58a
Unverified
Commit
39c8d58a
authored
Jul 09, 2020
by
Chris Jones
Committed by
GitHub
Jul 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename python bindings package to `google_benchmark`. (#999)
A few people have complained that `benchmark` is too generic. Also, add Python 3.8.
parent
7f27afe8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
8 deletions
+9
-8
BUILD
bindings/python/google_benchmark/BUILD
+2
-2
__init__.py
bindings/python/google_benchmark/__init__.py
+0
-0
benchmark.cc
bindings/python/google_benchmark/benchmark.cc
+0
-0
example.py
bindings/python/google_benchmark/example.py
+3
-3
setup.py
setup.py
+4
-3
No files found.
bindings/python/benchmark/BUILD
→
bindings/python/
google_
benchmark/BUILD
View file @
39c8d58a
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",
],
)
bindings/python/benchmark/__init__.py
→
bindings/python/
google_
benchmark/__init__.py
View file @
39c8d58a
File moved
bindings/python/benchmark/benchmark.cc
→
bindings/python/
google_
benchmark/benchmark.cc
View file @
39c8d58a
File moved
bindings/python/benchmark/example.py
→
bindings/python/
google_
benchmark/example.py
View file @
39c8d58a
...
...
@@ -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
...
...
setup.py
View file @
39c8d58a
...
...
@@ -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'
,
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment