Skip to content

Commit 64f0a91

Browse files
committed
Moving package requirements into requirements.txt files.
Using boilerplate code snippet in each setup.py to load the requirements.txt and adding the requirements.txt file to MANIFEST.in file.
1 parent 8426afa commit 64f0a91

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+135
-60
lines changed

bigquery/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
include README.rst
2+
include requirements.txt
23
graft google
34
graft unit_tests
45
global-exclude *.pyc

bigquery/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
google-cloud-core >= 0.20.0

bigquery/setup.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,12 @@
4949
}
5050

5151

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

5659
setup(
5760
name='google-cloud-bigquery',

bigtable/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
include README.rst
2+
include requirements.txt
23
graft google
34
graft unit_tests
45
global-exclude *.pyc

bigtable/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
google-cloud-core >= 0.20.0
2+
grpcio >= 1.0.0, < 2.0dev

bigtable/setup.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@
4949
}
5050

5151

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

5759
setup(
5860
name='google-cloud-bigtable',

core/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
include README.rst
2+
include requirements.txt
23
graft google
34
graft unit_tests
45
global-exclude *.pyc

core/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
httplib2 >= 0.9.1
2+
googleapis-common-protos >= 1.3.4
3+
oauth2client >= 3.0.0, < 4.0.0dev
4+
protobuf >= 3.0.0
5+
six

core/setup.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,12 @@
4949
}
5050

5151

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

6059
setup(
6160
name='google-cloud-core',

datastore/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
include README.rst
2+
include requirements.txt
23
graft google
34
graft unit_tests
45
global-exclude *.pyc

0 commit comments

Comments
 (0)