|
11 | 11 | SRC_DIR = os.path.join(THIS_DIR, "src") |
12 | 12 | SNOWPARK_SRC_DIR = os.path.join(SRC_DIR, "snowflake", "snowpark") |
13 | 13 | CONNECTOR_DEPENDENCY_VERSION = ">=3.2.0, <4.0.0" |
| 14 | +INSTALL_REQ_LIST = [ |
| 15 | + "setuptools>=40.6.0", |
| 16 | + "wheel", |
| 17 | + f"snowflake-connector-python{CONNECTOR_DEPENDENCY_VERSION}", |
| 18 | + "pyyaml", |
| 19 | +] |
| 20 | +CLOUDPICKLE_REQ_LIST = ["cloudpickle>=1.6.0,<=2.0.0"] |
14 | 21 | REQUIRED_PYTHON_VERSION = ">=3.8, <3.11" |
| 22 | + |
15 | 23 | if os.getenv("SNOWFLAKE_IS_PYTHON_RUNTIME_TEST", False): |
| 24 | + # this allows us to update the cloudpickle dependency by env var when building package privately |
| 25 | + # without re-releasing package just to update the dependency, example if we want to lower cloudpickle dep to 2.1.0: |
| 26 | + # SNOWFLAKE_IS_PYTHON_RUNTIME_TEST=1 CLOUDPICKLE_PYTHON_311_DEPENDENCY="cloudpickle==2.1.0;python_version~='3.11'" pip install . |
| 27 | + CLOUDPICKLE_PYTHON_311_DEPENDENCY = os.getenv( |
| 28 | + "CLOUDPICKLE_PYTHON_311_DEPENDENCY", |
| 29 | + "cloudpickle==2.2.1;python_version~='3.11'", |
| 30 | + ) |
16 | 31 | REQUIRED_PYTHON_VERSION = ">=3.8" |
| 32 | + CLOUDPICKLE_REQ_LIST = [ |
| 33 | + "cloudpickle>=1.6.0,<=2.0.0;python_version<'3.11'", |
| 34 | + CLOUDPICKLE_PYTHON_311_DEPENDENCY, |
| 35 | + ] |
| 36 | + |
| 37 | +INSTALL_REQ_LIST.extend(CLOUDPICKLE_REQ_LIST) |
17 | 38 |
|
18 | 39 | # read the version |
19 | 40 | VERSION = () |
|
46 | 67 | "Changelog": "https://github.com/snowflakedb/snowpark-python/blob/main/CHANGELOG.md", |
47 | 68 | }, |
48 | 69 | python_requires=REQUIRED_PYTHON_VERSION, |
49 | | - install_requires=[ |
50 | | - "setuptools>=40.6.0", |
51 | | - "wheel", |
52 | | - "cloudpickle>=1.6.0,<=2.0.0", |
53 | | - f"snowflake-connector-python{CONNECTOR_DEPENDENCY_VERSION}", |
54 | | - "pyyaml", |
55 | | - ], |
| 70 | + install_requires=INSTALL_REQ_LIST, |
56 | 71 | namespace_packages=["snowflake"], |
57 | 72 | # When a new package (directory) is added, we should also add it here |
58 | 73 | packages=[ |
|
0 commit comments