Skip to content

Commit

Permalink
Moving package requirements into requirements.txt files.
Browse files Browse the repository at this point in the history
Using boilerplate code snippet in each setup.py to load
the requirements.txt and adding the requirements.txt file to
MANIFEST.in file.
  • Loading branch information
dhermes committed Oct 4, 2016
1 parent 83c197c commit 61c9f63
Show file tree
Hide file tree
Showing 45 changed files with 135 additions and 60 deletions.
1 change: 1 addition & 0 deletions bigquery/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.rst
include requirements.txt
graft google
graft unit_tests
global-exclude *.pyc
1 change: 1 addition & 0 deletions bigquery/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google-cloud-core >= 0.20.0
9 changes: 6 additions & 3 deletions bigquery/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@
}


REQUIREMENTS = [
'google-cloud-core >= 0.20.0',
]
# NOTE: This assumes that no comments or other extra text
# is in the requirements.txt file.
with open(os.path.join(PACKAGE_ROOT, 'requirements.txt')) as file_obj:
REQUIREMENTS = file_obj.read()
REQUIREMENTS = REQUIREMENTS.strip().split('\n')


setup(
name='google-cloud-bigquery',
Expand Down
1 change: 1 addition & 0 deletions bigtable/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.rst
include requirements.txt
graft google
graft unit_tests
global-exclude *.pyc
2 changes: 2 additions & 0 deletions bigtable/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
google-cloud-core >= 0.20.0
grpcio >= 1.0.0, < 2.0dev
10 changes: 6 additions & 4 deletions bigtable/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@
}


REQUIREMENTS = [
'google-cloud-core >= 0.20.0',
'grpcio >= 1.0.0, < 2.0dev',
]
# NOTE: This assumes that no comments or other extra text
# is in the requirements.txt file.
with open(os.path.join(PACKAGE_ROOT, 'requirements.txt')) as file_obj:
REQUIREMENTS = file_obj.read()
REQUIREMENTS = REQUIREMENTS.strip().split('\n')


setup(
name='google-cloud-bigtable',
Expand Down
1 change: 1 addition & 0 deletions core/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.rst
include requirements.txt
graft google
graft unit_tests
global-exclude *.pyc
5 changes: 5 additions & 0 deletions core/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
httplib2 >= 0.9.1
googleapis-common-protos >= 1.3.4
oauth2client >= 3.0.0, < 4.0.0dev
protobuf >= 3.0.0
six
13 changes: 6 additions & 7 deletions core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@
}


REQUIREMENTS = [
'httplib2 >= 0.9.1',
'googleapis-common-protos >= 1.3.4',
'oauth2client >= 3.0.0, < 4.0.0dev',
'protobuf >= 3.0.0',
'six',
]
# NOTE: This assumes that no comments or other extra text
# is in the requirements.txt file.
with open(os.path.join(PACKAGE_ROOT, 'requirements.txt')) as file_obj:
REQUIREMENTS = file_obj.read()
REQUIREMENTS = REQUIREMENTS.strip().split('\n')


setup(
name='google-cloud-core',
Expand Down
1 change: 1 addition & 0 deletions datastore/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.rst
include requirements.txt
graft google
graft unit_tests
global-exclude *.pyc
2 changes: 2 additions & 0 deletions datastore/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
google-cloud-core >= 0.20.0
grpcio >= 1.0.0, < 2.0dev
10 changes: 6 additions & 4 deletions datastore/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@
}


REQUIREMENTS = [
'google-cloud-core >= 0.20.0',
'grpcio >= 1.0.0, < 2.0dev',
]
# NOTE: This assumes that no comments or other extra text
# is in the requirements.txt file.
with open(os.path.join(PACKAGE_ROOT, 'requirements.txt')) as file_obj:
REQUIREMENTS = file_obj.read()
REQUIREMENTS = REQUIREMENTS.strip().split('\n')


setup(
name='google-cloud-datastore',
Expand Down
1 change: 1 addition & 0 deletions dns/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.rst
include requirements.txt
graft google
graft unit_tests
global-exclude *.pyc
1 change: 1 addition & 0 deletions dns/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google-cloud-core >= 0.20.0
9 changes: 6 additions & 3 deletions dns/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@
}


REQUIREMENTS = [
'google-cloud-core >= 0.20.0',
]
# NOTE: This assumes that no comments or other extra text
# is in the requirements.txt file.
with open(os.path.join(PACKAGE_ROOT, 'requirements.txt')) as file_obj:
REQUIREMENTS = file_obj.read()
REQUIREMENTS = REQUIREMENTS.strip().split('\n')


setup(
name='google-cloud-dns',
Expand Down
1 change: 1 addition & 0 deletions error_reporting/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.rst
include requirements.txt
graft google
graft unit_tests
global-exclude *.pyc
2 changes: 2 additions & 0 deletions error_reporting/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
google-cloud-core >= 0.20.0
google-cloud-logging >= 0.20.0
10 changes: 6 additions & 4 deletions error_reporting/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@
}


REQUIREMENTS = [
'google-cloud-core >= 0.20.0',
'google-cloud-logging >= 0.20.0',
]
# NOTE: This assumes that no comments or other extra text
# is in the requirements.txt file.
with open(os.path.join(PACKAGE_ROOT, 'requirements.txt')) as file_obj:
REQUIREMENTS = file_obj.read()
REQUIREMENTS = REQUIREMENTS.strip().split('\n')


setup(
name='google-cloud-error-reporting',
Expand Down
1 change: 1 addition & 0 deletions language/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.rst
include requirements.txt
graft google
graft unit_tests
global-exclude *.pyc
1 change: 1 addition & 0 deletions language/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google-cloud-core >= 0.20.0
9 changes: 6 additions & 3 deletions language/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@
}


REQUIREMENTS = [
'google-cloud-core >= 0.20.0',
]
# NOTE: This assumes that no comments or other extra text
# is in the requirements.txt file.
with open(os.path.join(PACKAGE_ROOT, 'requirements.txt')) as file_obj:
REQUIREMENTS = file_obj.read()
REQUIREMENTS = REQUIREMENTS.strip().split('\n')


setup(
name='google-cloud-language',
Expand Down
1 change: 1 addition & 0 deletions logging/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.rst
include requirements.txt
graft google
graft unit_tests
global-exclude *.pyc
5 changes: 5 additions & 0 deletions logging/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
google-cloud-core >= 0.20.0
grpcio >= 1.0.0, < 2.0dev
google-gax >= 0.14.1, < 0.15dev
gapic-google-logging-v2 >= 0.10.1, < 0.11dev
grpc-google-logging-v2 >= 0.10.1, < 0.11dev
13 changes: 6 additions & 7 deletions logging/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@
}


REQUIREMENTS = [
'google-cloud-core >= 0.20.0',
'grpcio >= 1.0.0, < 2.0dev',
'google-gax >= 0.14.1, < 0.15dev',
'gapic-google-logging-v2 >= 0.10.1, < 0.11dev',
'grpc-google-logging-v2 >= 0.10.1, < 0.11dev',
]
# NOTE: This assumes that no comments or other extra text
# is in the requirements.txt file.
with open(os.path.join(PACKAGE_ROOT, 'requirements.txt')) as file_obj:
REQUIREMENTS = file_obj.read()
REQUIREMENTS = REQUIREMENTS.strip().split('\n')


setup(
name='google-cloud-logging',
Expand Down
1 change: 1 addition & 0 deletions monitoring/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.rst
include requirements.txt
graft google
graft unit_tests
global-exclude *.pyc
1 change: 1 addition & 0 deletions monitoring/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google-cloud-core >= 0.20.0
9 changes: 6 additions & 3 deletions monitoring/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@
}


REQUIREMENTS = [
'google-cloud-core >= 0.20.0',
]
# NOTE: This assumes that no comments or other extra text
# is in the requirements.txt file.
with open(os.path.join(PACKAGE_ROOT, 'requirements.txt')) as file_obj:
REQUIREMENTS = file_obj.read()
REQUIREMENTS = REQUIREMENTS.strip().split('\n')


setup(
name='google-cloud-monitoring',
Expand Down
1 change: 1 addition & 0 deletions pubsub/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.rst
include requirements.txt
graft google
graft unit_tests
global-exclude *.pyc
5 changes: 5 additions & 0 deletions pubsub/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
google-cloud-core >= 0.20.0
grpcio >= 1.0.0, < 2.0dev
google-gax >= 0.14.1, < 0.15dev
gapic-google-pubsub-v1 >= 0.10.1, < 0.11dev
grpc-google-pubsub-v1 >= 0.10.1, < 0.11dev
13 changes: 6 additions & 7 deletions pubsub/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@
}


REQUIREMENTS = [
'google-cloud-core >= 0.20.0',
'grpcio >= 1.0.0, < 2.0dev',
'google-gax >= 0.14.1, < 0.15dev',
'gapic-google-pubsub-v1 >= 0.10.1, < 0.11dev',
'grpc-google-pubsub-v1 >= 0.10.1, < 0.11dev',
]
# NOTE: This assumes that no comments or other extra text
# is in the requirements.txt file.
with open(os.path.join(PACKAGE_ROOT, 'requirements.txt')) as file_obj:
REQUIREMENTS = file_obj.read()
REQUIREMENTS = REQUIREMENTS.strip().split('\n')


setup(
name='google-cloud-pubsub',
Expand Down
1 change: 1 addition & 0 deletions resource_manager/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.rst
include requirements.txt
graft google
graft unit_tests
global-exclude *.pyc
1 change: 1 addition & 0 deletions resource_manager/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google-cloud-core >= 0.20.0
9 changes: 6 additions & 3 deletions resource_manager/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@
}


REQUIREMENTS = [
'google-cloud-core >= 0.20.0',
]
# NOTE: This assumes that no comments or other extra text
# is in the requirements.txt file.
with open(os.path.join(PACKAGE_ROOT, 'requirements.txt')) as file_obj:
REQUIREMENTS = file_obj.read()
REQUIREMENTS = REQUIREMENTS.strip().split('\n')


setup(
name='google-cloud-resource-manager',
Expand Down
1 change: 1 addition & 0 deletions speech/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.rst
include requirements.txt
graft google
graft unit_tests
global-exclude *.pyc
1 change: 1 addition & 0 deletions speech/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google-cloud-core >= 0.20.0
9 changes: 6 additions & 3 deletions speech/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@
}


REQUIREMENTS = [
'google-cloud-core >= 0.20.0',
]
# NOTE: This assumes that no comments or other extra text
# is in the requirements.txt file.
with open(os.path.join(PACKAGE_ROOT, 'requirements.txt')) as file_obj:
REQUIREMENTS = file_obj.read()
REQUIREMENTS = REQUIREMENTS.strip().split('\n')


setup(
name='google-cloud-speech',
Expand Down
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
include requirements.txt
graft google
graft unit_tests
global-exclude *.pyc
1 change: 1 addition & 0 deletions storage/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google-cloud-core >= 0.20.0
9 changes: 6 additions & 3 deletions storage/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@
}


REQUIREMENTS = [
'google-cloud-core >= 0.20.0',
]
# NOTE: This assumes that no comments or other extra text
# is in the requirements.txt file.
with open(os.path.join(PACKAGE_ROOT, 'requirements.txt')) as file_obj:
REQUIREMENTS = file_obj.read()
REQUIREMENTS = REQUIREMENTS.strip().split('\n')


setup(
name='google-cloud-storage',
Expand Down
1 change: 1 addition & 0 deletions translate/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.rst
include requirements.txt
graft google
graft unit_tests
global-exclude *.pyc
1 change: 1 addition & 0 deletions translate/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google-cloud-core >= 0.20.0
9 changes: 6 additions & 3 deletions translate/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@
}


REQUIREMENTS = [
'google-cloud-core >= 0.20.0',
]
# NOTE: This assumes that no comments or other extra text
# is in the requirements.txt file.
with open(os.path.join(PACKAGE_ROOT, 'requirements.txt')) as file_obj:
REQUIREMENTS = file_obj.read()
REQUIREMENTS = REQUIREMENTS.strip().split('\n')


setup(
name='google-cloud-translate',
Expand Down
1 change: 1 addition & 0 deletions vision/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.rst
include requirements.txt
graft google
graft unit_tests
global-exclude *.pyc
1 change: 1 addition & 0 deletions vision/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google-cloud-core >= 0.20.0
9 changes: 6 additions & 3 deletions vision/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@
}


REQUIREMENTS = [
'google-cloud-core >= 0.20.0',
]
# NOTE: This assumes that no comments or other extra text
# is in the requirements.txt file.
with open(os.path.join(PACKAGE_ROOT, 'requirements.txt')) as file_obj:
REQUIREMENTS = file_obj.read()
REQUIREMENTS = REQUIREMENTS.strip().split('\n')


setup(
name='google-cloud-vision',
Expand Down

0 comments on commit 61c9f63

Please sign in to comment.