Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to share common setup.py data with sub-packages. #2439

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
# Packages
*.egg
*.egg-info
*/setup_base
dist
*/setup_base

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

build
eggs
parts
Expand Down
8 changes: 8 additions & 0 deletions bigquery/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
from setuptools import find_packages
from setuptools import setup

from shutil import copytree

try:
copytree('../setup_base', './setup_base')
except:
pass

from setup_base.base import SETUP_BASE

PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))

Expand Down
8 changes: 8 additions & 0 deletions bigtable/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
from setuptools import find_packages
from setuptools import setup

from shutil import copytree

try:
copytree('../setup_base', './setup_base')
except:
pass

from setup_base.base import SETUP_BASE

PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))

Expand Down
8 changes: 8 additions & 0 deletions core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
from setuptools import find_packages
from setuptools import setup

from shutil import copytree

try:
copytree('../setup_base', './setup_base')
except:
pass

from setup_base.base import SETUP_BASE

PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))

Expand Down
8 changes: 8 additions & 0 deletions datastore/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
from setuptools import find_packages
from setuptools import setup

from shutil import copytree

try:
copytree('../setup_base', './setup_base')
except:
pass

from setup_base.base import SETUP_BASE

PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))

Expand Down
8 changes: 8 additions & 0 deletions dns/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
from setuptools import find_packages
from setuptools import setup

from shutil import copytree

try:
copytree('../setup_base', './setup_base')
except:
pass

from setup_base.base import SETUP_BASE

PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))

Expand Down
8 changes: 8 additions & 0 deletions error_reporting/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
from setuptools import find_packages
from setuptools import setup

from shutil import copytree

try:
copytree('../setup_base', './setup_base')
except:
pass

from setup_base.base import SETUP_BASE

PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))

Expand Down
8 changes: 8 additions & 0 deletions language/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
from setuptools import find_packages
from setuptools import setup

from shutil import copytree

try:
copytree('../setup_base', './setup_base')
except:
pass

from setup_base.base import SETUP_BASE

PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))

Expand Down
8 changes: 8 additions & 0 deletions logging/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
from setuptools import find_packages
from setuptools import setup

from shutil import copytree

try:
copytree('../setup_base', './setup_base')
except:
pass

from setup_base.base import SETUP_BASE

PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))

Expand Down
8 changes: 8 additions & 0 deletions monitoring/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
from setuptools import find_packages
from setuptools import setup

from shutil import copytree

try:
copytree('../setup_base', './setup_base')
except:
pass

from setup_base.base import SETUP_BASE

PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))

Expand Down
8 changes: 8 additions & 0 deletions pubsub/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
from setuptools import find_packages
from setuptools import setup

from shutil import copytree

try:
copytree('../setup_base', './setup_base')
except:
pass

from setup_base.base import SETUP_BASE

PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))

Expand Down
8 changes: 8 additions & 0 deletions resource_manager/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
from setuptools import find_packages
from setuptools import setup

from shutil import copytree

try:
copytree('../setup_base', './setup_base')
except:
pass

from setup_base.base import SETUP_BASE

PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))

Expand Down
24 changes: 1 addition & 23 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,7 @@

# NOTE: This is duplicated throughout and we should try to
# consolidate.
SETUP_BASE = {
'author': 'Google Cloud Platform',
'author_email': 'jjg+google-cloud-python@google.com',
'scripts': [],
'url': 'https://github.com/GoogleCloudPlatform/google-cloud-python',
'license': 'Apache 2.0',
'platforms': 'Posix; MacOS X; Windows',
'include_package_data': True,
'zip_safe': False,
'classifiers': [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Internet',
],
}

from setup_base import SETUP_BASE

REQUIREMENTS = [
'google-cloud-bigquery >= 0.20.0',
Expand Down
Empty file added setup_base/__init__.py
Empty file.
22 changes: 22 additions & 0 deletions setup_base/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
SETUP_BASE = {
'author': 'Google Cloud Platform',
'author_email': 'jjg+google-cloud-python@google.com',
'scripts': [],
'url': 'https://github.com/GoogleCloudPlatform/google-cloud-python',
'license': 'Apache 2.0',
'platforms': 'Posix; MacOS X; Windows',
'include_package_data': True,
'zip_safe': False,
'classifiers': [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Internet',
],
}
1 change: 1 addition & 0 deletions storage/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.rst
graft google
include ../setup_base.py
graft unit_tests
global-exclude *.pyc
32 changes: 9 additions & 23 deletions storage/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
from setuptools import find_packages
from setuptools import setup

from shutil import copytree

try:
copytree('../setup_base', './setup_base')
except:
pass

from setup_base.base import SETUP_BASE

PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))

Expand All @@ -25,29 +33,7 @@

# NOTE: This is duplicated throughout and we should try to
# consolidate.

This comment was marked as spam.

This comment was marked as spam.

SETUP_BASE = {
'author': 'Google Cloud Platform',
'author_email': 'jjg+google-cloud-python@google.com',
'scripts': [],
'url': 'https://github.com/GoogleCloudPlatform/google-cloud-python',
'license': 'Apache 2.0',
'platforms': 'Posix; MacOS X; Windows',
'include_package_data': True,
'zip_safe': False,
'classifiers': [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Internet',
],
}

from setup_base.base import SETUP_BASE

REQUIREMENTS = [
'google-cloud-core >= 0.20.0',
Expand Down
8 changes: 8 additions & 0 deletions translate/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
from setuptools import find_packages
from setuptools import setup

from shutil import copytree

try:
copytree('../setup_base', './setup_base')
except:
pass

from setup_base.base import SETUP_BASE

PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))

Expand Down
8 changes: 8 additions & 0 deletions vision/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
from setuptools import find_packages
from setuptools import setup

from shutil import copytree

try:
copytree('../setup_base', './setup_base')
except:
pass

from setup_base.base import SETUP_BASE

PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))

Expand Down