aboutsummaryrefslogtreecommitdiff
path: root/pw_tokenizer
diff options
context:
space:
mode:
Diffstat (limited to 'pw_tokenizer')
-rw-r--r--pw_tokenizer/py/BUILD.gn9
-rw-r--r--pw_tokenizer/py/setup.py14
2 files changed, 17 insertions, 6 deletions
diff --git a/pw_tokenizer/py/BUILD.gn b/pw_tokenizer/py/BUILD.gn
index b2d19e925..a5ab5c9fb 100644
--- a/pw_tokenizer/py/BUILD.gn
+++ b/pw_tokenizer/py/BUILD.gn
@@ -1,4 +1,4 @@
-# Copyright 2020 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# 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
@@ -59,6 +59,13 @@ pw_python_package("py") {
pylintrc = "$dir_pigweed/.pylintrc"
}
+# This setup.py may be used to install pw_tokenizer without GN. It does not
+# include the pw_tokenizer.proto subpackage, since it contains a generated
+# protobuf module.
+pw_python_script("setup") {
+ sources = [ "setup.py" ]
+}
+
pw_proto_library("test_proto") {
sources = [ "detokenize_proto_test.proto" ]
deps = [ "..:proto" ]
diff --git a/pw_tokenizer/py/setup.py b/pw_tokenizer/py/setup.py
index 04680f107..eba125e61 100644
--- a/pw_tokenizer/py/setup.py
+++ b/pw_tokenizer/py/setup.py
@@ -1,4 +1,4 @@
-# Copyright 2020 The Pigweed Authors
+# Copyright 2021 The Pigweed Authors
#
# 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
@@ -11,7 +11,12 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
-"""The pw_tokenizer package."""
+"""The pw_tokenizer package.
+
+Installing pw_tokenizer with this setup.py does not include the
+pw_tokenizer.proto package, since it contains a generated protobuf module. To
+access pw_tokenizer.proto, install pw_tokenizer from GN.
+"""
import setuptools # type: ignore
@@ -20,10 +25,9 @@ setuptools.setup(
version='0.0.1',
author='Pigweed Authors',
author_email='pigweed-developers@googlegroups.com',
- description='Tools for decoding tokenized strings',
- packages=setuptools.find_packages(),
+ description='Tools for working with tokenized strings',
+ packages=['pw_tokenizer'],
package_data={'pw_tokenizer': ['py.typed']},
zip_safe=False,
- test_suite='setup.test_suite',
extra_requires=['serial'],
)