8000 chore: add constraints file by busunkim96 · Pull Request #122 · googleapis/python-api-core · GitHub
[go: up one dir, main page]

Skip to content

chore: add constraints file #122

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

Merged
merged 9 commits into from
Jan 13, 2021
Merged
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
16 changes: 12 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@

from __future__ import absolute_import
import os
import pathlib
import shutil

# https://github.com/google/importlab/issues/25
import nox # pytype: disable=import-error

_MINIMAL_ASYNCIO_SUPPORT_PYTHON_VERSION = [3, 6]
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()

_MINIMAL_ASYNCIO_SUPPORT_PYTHON_VERSION = [3, 6]

def _greater_or_equal_than_36(version_string):
tokens = version_string.split(".")
Expand All @@ -40,9 +42,13 @@ def default(session):
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
constraints_path = str(
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
)

# Install all test dependencies, then install this package in-place.
session.install("mock", "pytest", "pytest-cov", "grpcio >= 1.0.2")
session.install("-e", ".")
session.install("-e", ".", "-c", constraints_path)

pytest_args = [
"python",
Expand Down Expand Up @@ -80,9 +86,11 @@ def unit(session):
@nox.session(python=["2.7", "3.6", "3.7", "3.8", "3.9"])
def unit_grpc_gcp(session):
"""Run the unit test suite with grpcio-gcp installed."""

constraints_path = str(
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
)
# Install grpcio-gcp
session.install("grpcio-gcp")
session.install("grpcio-gcp", "-c", const 10000 raints_path)

default(session)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"protobuf >= 3.12.0",
"google-auth >= 1.21.1, < 2.0dev",
"requests >= 2.18.0, < 3.0.0dev",
"setuptools >= 34.0.0",
"setuptools >= 40.3.0",
"six >= 1.13.0",
"pytz",
'futures >= 3.2.0; python_version < "3.2"',
Expand Down
Empty file added testing/constraints-2.7.txt
Empty file.
Empty file added testing/constraints-3.10.txt
Empty file.
Empty file added testing/constraints-3.11.txt
Empty file.
16 changes: 16 additions & 0 deletions testing/constraints-3.6.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This constraints file is used to check that lower bounds
# are correct in setup.py
# List *all* library dependencies and extras in this file.
# Pin the version to the lower bound.
#
# e.g., if setup.py has "foo >= 1.14.0, < 2.0.0dev",
# Then this file should have foo==1.14.0
googleapis-common-protos==1.6.0
protobuf==3.12.0
google-auth==1.21.1
requests==2.18.0
setuptools==40.3.0
six==1.13.0
grpcio==1.29.0
grpcio-gcp==0.2.2
grpcio-gcp==0.2.2
Empty file added testing/constraints-3.7.txt
Empty file.
Empty file added testing/constraints-3.8.txt
Empty file.
Empty file added testing/constraints-3.9.txt
Empty file.
0