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

[SYNPY-1316] Moved install_requires back to setup.py #1002

Closed
wants to merge 1 commit into from
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
21 changes: 1 addition & 20 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,7 @@ zip_safe = False
include_package_data = True
packages = find:
python_requires = >=3.8
# on Linux specify a cryptography dependency that will not
# require a Rust compiler to compile from source (< 3.4).
# on Linux cryptography is a transitive dependency
# (keyring -> SecretStorage -> cryptography)
# SecretStorage doesn't pin a version so otherwise if cryptography
# is not already installed the dependency will resolve to the latest
# and will require Rust if a precompiled wheel cannot be used
# (e.g. old version of pip or no wheel available for an architecture).
# if a newer version of cryptography is already installed that is
# fine we don't want to trigger a downgrade, hence the conditional
# addition of the versioned dependency.
install_requires =
# "requests>=2.22.0,<2.30.0; python_version<'3.10'",
requests>=2.22.0,<3.0
urllib3>=1.26.18,<2
# "urllib3>=2; python_version>='3.10'",
keyring>=15,<23.5
keyrings.alt==3.1; sys_platform == "linux"
cryptography<3.4; sys_platform == "linux"
deprecated>=1.2.4,<2.0
#install_requires is defined in the setup.py
tests_require =
pytest>=6.0.0,<7.0
pytest-mock>=3.0,<4.0
Expand Down
32 changes: 31 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
from setuptools import setup

import platform
import json

# make sure not to overwrite existing .synapseConfig with our example one
Expand All @@ -15,4 +16,33 @@
with open("synapseclient/synapsePythonClient") as config:
__version__ = json.load(config)["latestVersion"]

setup(data_files=data_files, version=__version__)
install_requires = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this impact the pipenv file?

# "requests>=2.22.0,<2.30.0; python_version<'3.10'",
"requests>=2.22.0,<3.0",
"urllib3>=1.26.18,<2",
# "urllib3>=2; python_version>='3.10'",
"keyring>=15,<23.5",
"deprecated>=1.2.4,<2.0",
]

# on Linux specify a cryptography dependency that will not
# require a Rust compiler to compile from source (< 3.4).
# on Linux cryptography is a transitive dependency
# (keyring -> SecretStorage -> cryptography)
# SecretStorage doesn't pin a version so otherwise if cryptography
# is not already installed the dependency will resolve to the latest
# and will require Rust if a precompiled wheel cannot be used
# (e.g. old version of pip or no wheel available for an architecture).
# if a newer version of cryptography is already installed that is
# fine we don't want to trigger a downgrade, hence the conditional
# addition of the versioned dependency.
if platform.system() == "Linux":
install_requires.append("keyrings.alt==3.1")
try:
import cryptography # noqa

# already installed, don't need to install (or downgrade)
except ImportError:
install_requires.append("cryptography<3.4")

setup(data_files=data_files, version=__version__, install_requires=install_requires)
Loading