Revert "Merge pull request #17752 from grpc/license-symlinks"

This reverts commit 3f8e15e2a4, reversing
changes made to a8662121c7.
pull/17810/head
Richard Belleville 6 years ago
parent 9ed8734efb
commit dbad0522c3
  1. 1
      src/python/grpcio_channelz/LICENSE
  2. 3
      src/python/grpcio_channelz/channelz_commands.py
  3. 1
      src/python/grpcio_health_checking/LICENSE
  4. 3
      src/python/grpcio_health_checking/health_commands.py
  5. 1
      src/python/grpcio_reflection/LICENSE
  6. 3
      src/python/grpcio_reflection/reflection_commands.py
  7. 1
      src/python/grpcio_status/LICENSE
  8. 13
      src/python/grpcio_status/setup.py
  9. 39
      src/python/grpcio_status/status_commands.py
  10. 1
      src/python/grpcio_testing/LICENSE
  11. 12
      src/python/grpcio_testing/setup.py
  12. 39
      src/python/grpcio_testing/testing_commands.py
  13. 2
      tools/distrib/yapf_code.sh

@ -21,6 +21,7 @@ import setuptools
ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__))) ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
CHANNELZ_PROTO = os.path.join(ROOT_DIR, CHANNELZ_PROTO = os.path.join(ROOT_DIR,
'../../proto/grpc/channelz/channelz.proto') '../../proto/grpc/channelz/channelz.proto')
LICENSE = os.path.join(ROOT_DIR, '../../../LICENSE')
class Preprocess(setuptools.Command): class Preprocess(setuptools.Command):
@ -41,6 +42,8 @@ class Preprocess(setuptools.Command):
shutil.copyfile(CHANNELZ_PROTO, shutil.copyfile(CHANNELZ_PROTO,
os.path.join(ROOT_DIR, os.path.join(ROOT_DIR,
'grpc_channelz/v1/channelz.proto')) 'grpc_channelz/v1/channelz.proto'))
if os.path.isfile(LICENSE):
shutil.copyfile(LICENSE, os.path.join(ROOT_DIR, 'LICENSE'))
class BuildPackageProtos(setuptools.Command): class BuildPackageProtos(setuptools.Command):

@ -20,6 +20,7 @@ import setuptools
ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__))) ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
HEALTH_PROTO = os.path.join(ROOT_DIR, '../../proto/grpc/health/v1/health.proto') HEALTH_PROTO = os.path.join(ROOT_DIR, '../../proto/grpc/health/v1/health.proto')
LICENSE = os.path.join(ROOT_DIR, '../../../LICENSE')
class Preprocess(setuptools.Command): class Preprocess(setuptools.Command):
@ -40,6 +41,8 @@ class Preprocess(setuptools.Command):
shutil.copyfile(HEALTH_PROTO, shutil.copyfile(HEALTH_PROTO,
os.path.join(ROOT_DIR, os.path.join(ROOT_DIR,
'grpc_health/v1/health.proto')) 'grpc_health/v1/health.proto'))
if os.path.isfile(LICENSE):
shutil.copyfile(LICENSE, os.path.join(ROOT_DIR, 'LICENSE'))
class BuildPackageProtos(setuptools.Command): class BuildPackageProtos(setuptools.Command):

@ -21,6 +21,7 @@ import setuptools
ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__))) ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
REFLECTION_PROTO = os.path.join( REFLECTION_PROTO = os.path.join(
ROOT_DIR, '../../proto/grpc/reflection/v1alpha/reflection.proto') ROOT_DIR, '../../proto/grpc/reflection/v1alpha/reflection.proto')
LICENSE = os.path.join(ROOT_DIR, '../../../LICENSE')
class Preprocess(setuptools.Command): class Preprocess(setuptools.Command):
@ -42,6 +43,8 @@ class Preprocess(setuptools.Command):
REFLECTION_PROTO, REFLECTION_PROTO,
os.path.join(ROOT_DIR, os.path.join(ROOT_DIR,
'grpc_reflection/v1alpha/reflection.proto')) 'grpc_reflection/v1alpha/reflection.proto'))
if os.path.isfile(LICENSE):
shutil.copyfile(LICENSE, os.path.join(ROOT_DIR, 'LICENSE'))
class BuildPackageProtos(setuptools.Command): class BuildPackageProtos(setuptools.Command):

@ -63,11 +63,20 @@ INSTALL_REQUIRES = (
'googleapis-common-protos>=1.5.5', 'googleapis-common-protos>=1.5.5',
) )
COMMAND_CLASS = { try:
import status_commands as _status_commands
# we are in the build environment, otherwise the above import fails
COMMAND_CLASS = {
# Run preprocess from the repository *before* doing any packaging!
'preprocess': _status_commands.Preprocess,
'build_package_protos': _NoOpCommand,
}
except ImportError:
COMMAND_CLASS = {
# wire up commands to no-op not to break the external dependencies # wire up commands to no-op not to break the external dependencies
'preprocess': _NoOpCommand, 'preprocess': _NoOpCommand,
'build_package_protos': _NoOpCommand, 'build_package_protos': _NoOpCommand,
} }
setuptools.setup( setuptools.setup(
name='grpcio-status', name='grpcio-status',

@ -0,0 +1,39 @@
# Copyright 2018 The gRPC 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.
"""Provides distutils command classes for the GRPC Python setup process."""
import os
import shutil
import setuptools
ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
LICENSE = os.path.join(ROOT_DIR, '../../../LICENSE')
class Preprocess(setuptools.Command):
"""Command to copy LICENSE from root directory."""
description = ''
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
if os.path.isfile(LICENSE):
shutil.copyfile(LICENSE, os.path.join(ROOT_DIR, 'LICENSE'))

@ -50,10 +50,18 @@ INSTALL_REQUIRES = (
'grpcio>={version}'.format(version=grpc_version.VERSION), 'grpcio>={version}'.format(version=grpc_version.VERSION),
) )
COMMAND_CLASS = { try:
import testing_commands as _testing_commands
# we are in the build environment, otherwise the above import fails
COMMAND_CLASS = {
# Run preprocess from the repository *before* doing any packaging!
'preprocess': _testing_commands.Preprocess,
}
except ImportError:
COMMAND_CLASS = {
# wire up commands to no-op not to break the external dependencies # wire up commands to no-op not to break the external dependencies
'preprocess': _NoOpCommand, 'preprocess': _NoOpCommand,
} }
setuptools.setup( setuptools.setup(
name='grpcio-testing', name='grpcio-testing',

@ -0,0 +1,39 @@
# Copyright 2018 gRPC 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.
"""Provides distutils command classes for the GRPC Python setup process."""
import os
import shutil
import setuptools
ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__)))
LICENSE = os.path.join(ROOT_DIR, '../../../LICENSE')
class Preprocess(setuptools.Command):
"""Command to copy LICENSE from root directory."""
description = ''
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
if os.path.isfile(LICENSE):
shutil.copyfile(LICENSE, os.path.join(ROOT_DIR, 'LICENSE'))

@ -54,7 +54,7 @@ else
tempdir=$(mktemp -d) tempdir=$(mktemp -d)
cp -RT "${dir}" "${tempdir}" cp -RT "${dir}" "${tempdir}"
yapf "${tempdir}" yapf "${tempdir}"
diff -x 'LICENSE' -x '*.pyc' -ru "${dir}" "${tempdir}" || ok=no diff -x '*.pyc' -ru "${dir}" "${tempdir}" || ok=no
rm -rf "${tempdir}" rm -rf "${tempdir}"
done done
if [[ ${ok} == no ]]; then if [[ ${ok} == no ]]; then

Loading…
Cancel
Save