From 0994559fc04584b8157b89555e5e14b21bcd769d Mon Sep 17 00:00:00 2001 From: Yang Song Date: Fri, 12 Apr 2019 15:19:34 -0700 Subject: [PATCH] Set up Python packaging for PyPI release. (#197) * Set up Python packaging for PyPI release. * Remove namespace packages for */v1. * Remove redundant dependency. * Use Python style version and update commands. * Add PyPI badge to README. --- README.md | 3 ++ RELEASING.md | 54 +++++++++++++++---- gen-python/README.rst | 23 ++++++++ gen-python/opencensus/__init__.py | 16 ++++++ gen-python/opencensus/proto/__init__.py | 16 ++++++ gen-python/opencensus/proto/agent/__init__.py | 16 ++++++ .../opencensus/proto/agent/common/__init__.py | 16 ++++++ .../proto/agent/common/v1/__init__.py | 14 +++++ .../proto/agent/metrics/__init__.py | 16 ++++++ .../proto/agent/metrics/v1/__init__.py | 14 +++++ .../opencensus/proto/agent/trace/__init__.py | 16 ++++++ .../proto/agent/trace/v1/__init__.py | 14 +++++ .../opencensus/proto/metrics/__init__.py | 16 ++++++ .../opencensus/proto/metrics/v1/__init__.py | 14 +++++ .../opencensus/proto/resource/__init__.py | 16 ++++++ .../opencensus/proto/resource/v1/__init__.py | 14 +++++ gen-python/opencensus/proto/stats/__init__.py | 16 ++++++ .../opencensus/proto/stats/v1/__init__.py | 14 +++++ gen-python/opencensus/proto/trace/__init__.py | 16 ++++++ .../opencensus/proto/trace/v1/__init__.py | 14 +++++ gen-python/setup.cfg | 2 + gen-python/setup.py | 50 +++++++++++++++++ gen-python/version.py | 15 ++++++ 23 files changed, 394 insertions(+), 11 deletions(-) create mode 100644 gen-python/README.rst create mode 100644 gen-python/opencensus/__init__.py create mode 100644 gen-python/opencensus/proto/__init__.py create mode 100644 gen-python/opencensus/proto/agent/__init__.py create mode 100644 gen-python/opencensus/proto/agent/common/__init__.py create mode 100644 gen-python/opencensus/proto/agent/common/v1/__init__.py create mode 100644 gen-python/opencensus/proto/agent/metrics/__init__.py create mode 100644 gen-python/opencensus/proto/agent/metrics/v1/__init__.py create mode 100644 gen-python/opencensus/proto/agent/trace/__init__.py create mode 100644 gen-python/opencensus/proto/agent/trace/v1/__init__.py create mode 100644 gen-python/opencensus/proto/metrics/__init__.py create mode 100644 gen-python/opencensus/proto/metrics/v1/__init__.py create mode 100644 gen-python/opencensus/proto/resource/__init__.py create mode 100644 gen-python/opencensus/proto/resource/v1/__init__.py create mode 100644 gen-python/opencensus/proto/stats/__init__.py create mode 100644 gen-python/opencensus/proto/stats/v1/__init__.py create mode 100644 gen-python/opencensus/proto/trace/__init__.py create mode 100644 gen-python/opencensus/proto/trace/v1/__init__.py create mode 100644 gen-python/setup.cfg create mode 100644 gen-python/setup.py create mode 100644 gen-python/version.py diff --git a/README.md b/README.md index 208477b..17ed810 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ OpenCensus Proto - Language Independent Interface Types For OpenCensus [![Maven Central][maven-image]][maven-url] [![Javadocs][javadoc-image]][javadoc-url] [![GoDoc][godoc-image]][godoc-url] +[![PyPI][pypi-image]][pypi-url] Census provides a framework to define and collect stats against metrics and to break those stats down across user-defined dimensions. @@ -53,6 +54,8 @@ compile 'io.opencensus:opencensus-proto:0.2.0' [javadoc-url]: https://www.javadoc.io/doc/io.opencensus/opencensus-proto [godoc-image]: https://godoc.org/github.com/census-instrumentation/opencensus-proto?status.svg [godoc-url]: https://godoc.org/github.com/census-instrumentation/opencensus-proto +[pypi-image]: https://badge.fury.io/py/opencensus-proto.svg +[pypi-url]: https://pypi.org/project/opencensus-proto/ ### Add the dependencies to Bazel project diff --git a/RELEASING.md b/RELEASING.md index 2c60ac2..bea1b21 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -61,7 +61,6 @@ Then run the following commands to re-generate the gen-python files: ```bash $ git checkout -b update-gen-python # Assume you're under opencensus-proto/ -$ rm -rf gen-python $ cd src $ ./mkpygen.sh $ git add -A @@ -84,10 +83,8 @@ token](https://help.github.com/articles/creating-a-personal-access-token-for-the ```bash $ MAJOR=0 MINOR=4 PATCH=0 # Set appropriately for new release - $ VERSION_FILES=( - build.gradle - pom.xml - ) + $ JAVA_VERSION_FILES=(build.gradle) + $ PYTHON_VERSION_FILES=(gen-python/version.py) $ git checkout -b v$MAJOR.$MINOR.x master $ git push upstream v$MAJOR.$MINOR.x ``` @@ -117,9 +114,11 @@ token](https://help.github.com/articles/creating-a-personal-access-token-for-the ```bash $ git checkout -b bump-version master - # Change version to next minor (and keep -SNAPSHOT) + # Change version to next minor (and keep -SNAPSHOT and .dev0) $ sed -i 's/[0-9]\+\.[0-9]\+\.[0-9]\+\(.*CURRENT_OPENCENSUS_PROTO_VERSION\)/'$MAJOR.$((MINOR+1)).0'\1/' \ - "${VERSION_FILES[@]}" + "${JAVA_VERSION_FILES[@]}" + $ sed -i 's/[0-9]\+\.[0-9]\+\(.*CURRENT_OPENCENSUS_PROTO_VERSION\)/'$MAJOR.$((MINOR+1))'\1/' \ + "${PYTHON_VERSION_FILES[@]}" $ ./gradlew build $ git commit -a -m "Start $MAJOR.$((MINOR+1)).0 development cycle" ``` @@ -139,8 +138,9 @@ token](https://help.github.com/articles/creating-a-personal-access-token-for-the ```bash $ git checkout -b release v$MAJOR.$MINOR.x - # Change version to remove -SNAPSHOT - $ sed -i 's/-SNAPSHOT\(.*CURRENT_OPENCENSUS_PROTO_VERSION\)/\1/' "${VERSION_FILES[@]}" + # Change version to remove -SNAPSHOT and .dev0 + $ sed -i 's/-SNAPSHOT\(.*CURRENT_OPENCENSUS_PROTO_VERSION\)/\1/' "${JAVA_VERSION_FILES[@]}" + $ sed -i 's/dev0\(.*CURRENT_OPENCENSUS_PROTO_VERSION\)/'0'\1/' "${PYTHON_VERSION_FILES[@]}" $ ./gradlew build $ git commit -a -m "Bump version to $MAJOR.$MINOR.$PATCH" $ git tag -a v$MAJOR.$MINOR.$PATCH -m "Version $MAJOR.$MINOR.$PATCH" @@ -150,9 +150,11 @@ token](https://help.github.com/articles/creating-a-personal-access-token-for-the `0.4.1-SNAPSHOT`). Commit the result: ```bash - # Change version to next patch and add -SNAPSHOT + # Change version to next patch and add -SNAPSHOT and .dev1 $ sed -i 's/[0-9]\+\.[0-9]\+\.[0-9]\+\(.*CURRENT_OPENCENSUS_PROTO_VERSION\)/'$MAJOR.$MINOR.$((PATCH+1))-SNAPSHOT'\1/' \ - "${VERSION_FILES[@]}" + "${JAVA_VERSION_FILES[@]}" + $ sed -i 's/[0-9]\+\.[0-9]\+\.[0-9]\+\(.*CURRENT_OPENCENSUS_PROTO_VERSION\)/'$MAJOR.$MINOR.dev$((PATCH+1))'\1/' \ + "${PYTHON_VERSION_FILES[@]}" $ ./gradlew build $ git commit -a -m "Bump version to $MAJOR.$MINOR.$((PATCH+1))-SNAPSHOT" ``` @@ -217,6 +219,36 @@ Central (the staging repository will be destroyed in the process). You can see the complete process for releasing to Maven Central on the [OSSRH site](http://central.sonatype.org/pages/releasing-the-deployment.html). +## Push Python package to PyPI + +We follow the same package distribution process outlined at +[Python Packaging User Guide](https://packaging.python.org/tutorials/packaging-projects/). + +### Prerequisites + +If you haven't already, install the latest versions of setuptools, wheel and twine: +```bash +$ python3 -m pip install --user --upgrade setuptools wheel twine +``` + +### Branch + +Before building/deploying, be sure to switch to the appropriate tag. The tag +must reference a commit that has been pushed to the main repository, i.e., has +gone through code review. For the current release use: + +```bash +$ git checkout -b v$MAJOR.$MINOR.$PATCH tags/v$MAJOR.$MINOR.$PATCH +``` + +### Generate and upload the distribution archives + +```bash +$ cd gen-python +$ python3 setup.py sdist bdist_wheel +$ python3 -m twine upload dist/* +``` + ## Announcement Once deployment is done, go to Github [release diff --git a/gen-python/README.rst b/gen-python/README.rst new file mode 100644 index 0000000..e618dc0 --- /dev/null +++ b/gen-python/README.rst @@ -0,0 +1,23 @@ +OpenCensus Proto +============================================================================ + +|pypi| + +.. |pypi| image:: https://badge.fury.io/py/opencensus-proto.svg + :target: https://pypi.org/project/opencensus-proto/ + +Python library generated from OpenCensus cross-language protos. + +Installation +------------ + +:: + + pip install opencensus-proto + +Usage +----- + +.. code:: python + + # TBD diff --git a/gen-python/opencensus/__init__.py b/gen-python/opencensus/__init__.py new file mode 100644 index 0000000..f7a9ab3 --- /dev/null +++ b/gen-python/opencensus/__init__.py @@ -0,0 +1,16 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) + diff --git a/gen-python/opencensus/proto/__init__.py b/gen-python/opencensus/proto/__init__.py new file mode 100644 index 0000000..f7a9ab3 --- /dev/null +++ b/gen-python/opencensus/proto/__init__.py @@ -0,0 +1,16 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) + diff --git a/gen-python/opencensus/proto/agent/__init__.py b/gen-python/opencensus/proto/agent/__init__.py new file mode 100644 index 0000000..f7a9ab3 --- /dev/null +++ b/gen-python/opencensus/proto/agent/__init__.py @@ -0,0 +1,16 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) + diff --git a/gen-python/opencensus/proto/agent/common/__init__.py b/gen-python/opencensus/proto/agent/common/__init__.py new file mode 100644 index 0000000..f7a9ab3 --- /dev/null +++ b/gen-python/opencensus/proto/agent/common/__init__.py @@ -0,0 +1,16 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) + diff --git a/gen-python/opencensus/proto/agent/common/v1/__init__.py b/gen-python/opencensus/proto/agent/common/v1/__init__.py new file mode 100644 index 0000000..d6b15ec --- /dev/null +++ b/gen-python/opencensus/proto/agent/common/v1/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/gen-python/opencensus/proto/agent/metrics/__init__.py b/gen-python/opencensus/proto/agent/metrics/__init__.py new file mode 100644 index 0000000..f7a9ab3 --- /dev/null +++ b/gen-python/opencensus/proto/agent/metrics/__init__.py @@ -0,0 +1,16 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) + diff --git a/gen-python/opencensus/proto/agent/metrics/v1/__init__.py b/gen-python/opencensus/proto/agent/metrics/v1/__init__.py new file mode 100644 index 0000000..d6b15ec --- /dev/null +++ b/gen-python/opencensus/proto/agent/metrics/v1/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/gen-python/opencensus/proto/agent/trace/__init__.py b/gen-python/opencensus/proto/agent/trace/__init__.py new file mode 100644 index 0000000..f7a9ab3 --- /dev/null +++ b/gen-python/opencensus/proto/agent/trace/__init__.py @@ -0,0 +1,16 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) + diff --git a/gen-python/opencensus/proto/agent/trace/v1/__init__.py b/gen-python/opencensus/proto/agent/trace/v1/__init__.py new file mode 100644 index 0000000..d6b15ec --- /dev/null +++ b/gen-python/opencensus/proto/agent/trace/v1/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/gen-python/opencensus/proto/metrics/__init__.py b/gen-python/opencensus/proto/metrics/__init__.py new file mode 100644 index 0000000..f7a9ab3 --- /dev/null +++ b/gen-python/opencensus/proto/metrics/__init__.py @@ -0,0 +1,16 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) + diff --git a/gen-python/opencensus/proto/metrics/v1/__init__.py b/gen-python/opencensus/proto/metrics/v1/__init__.py new file mode 100644 index 0000000..d6b15ec --- /dev/null +++ b/gen-python/opencensus/proto/metrics/v1/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/gen-python/opencensus/proto/resource/__init__.py b/gen-python/opencensus/proto/resource/__init__.py new file mode 100644 index 0000000..f7a9ab3 --- /dev/null +++ b/gen-python/opencensus/proto/resource/__init__.py @@ -0,0 +1,16 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) + diff --git a/gen-python/opencensus/proto/resource/v1/__init__.py b/gen-python/opencensus/proto/resource/v1/__init__.py new file mode 100644 index 0000000..d6b15ec --- /dev/null +++ b/gen-python/opencensus/proto/resource/v1/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/gen-python/opencensus/proto/stats/__init__.py b/gen-python/opencensus/proto/stats/__init__.py new file mode 100644 index 0000000..f7a9ab3 --- /dev/null +++ b/gen-python/opencensus/proto/stats/__init__.py @@ -0,0 +1,16 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) + diff --git a/gen-python/opencensus/proto/stats/v1/__init__.py b/gen-python/opencensus/proto/stats/v1/__init__.py new file mode 100644 index 0000000..d6b15ec --- /dev/null +++ b/gen-python/opencensus/proto/stats/v1/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/gen-python/opencensus/proto/trace/__init__.py b/gen-python/opencensus/proto/trace/__init__.py new file mode 100644 index 0000000..f7a9ab3 --- /dev/null +++ b/gen-python/opencensus/proto/trace/__init__.py @@ -0,0 +1,16 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +__path__ = __import__('pkgutil').extend_path(__path__, __name__) + diff --git a/gen-python/opencensus/proto/trace/v1/__init__.py b/gen-python/opencensus/proto/trace/v1/__init__.py new file mode 100644 index 0000000..d6b15ec --- /dev/null +++ b/gen-python/opencensus/proto/trace/v1/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/gen-python/setup.cfg b/gen-python/setup.cfg new file mode 100644 index 0000000..2a9acf1 --- /dev/null +++ b/gen-python/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal = 1 diff --git a/gen-python/setup.py b/gen-python/setup.py new file mode 100644 index 0000000..23ae085 --- /dev/null +++ b/gen-python/setup.py @@ -0,0 +1,50 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from setuptools import find_packages +from setuptools import setup +from version import __version__ + +setup( + name='opencensus-proto', + version=__version__, # noqa + author='OpenCensus Authors', + author_email='census-developers@googlegroups.com', + classifiers=[ + 'Intended Audience :: Developers', + 'Development Status :: 3 - Alpha', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Apache Software License', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + ], + description='OpenCensus Proto', + include_package_data=True, + long_description=open('README.rst').read(), + install_requires=[ + 'grpcio >= 1.0.0, < 2.0.0', + ], + extras_require={}, + license='Apache-2.0', + packages=find_packages(), + namespace_packages=[], + url='https://github.com/census-instrumentation/opencensus-proto/tree/master/gen-python', + zip_safe=False, +) diff --git a/gen-python/version.py b/gen-python/version.py new file mode 100644 index 0000000..319325b --- /dev/null +++ b/gen-python/version.py @@ -0,0 +1,15 @@ +# Copyright 2019, OpenCensus 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 the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +__version__ = '0.3.dev0' # CURRENT_OPENCENSUS_PROTO_VERSION