pyspark-connect 4.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,31 @@
1
+ #
2
+ # Licensed to the Apache Software Foundation (ASF) under one or more
3
+ # contributor license agreements. See the NOTICE file distributed with
4
+ # this work for additional information regarding copyright ownership.
5
+ # The ASF licenses this file to You under the Apache License, Version 2.0
6
+ # (the "License"); you may not use this file except in compliance with
7
+ # the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Reference: https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html
18
+
19
+ recursive-include pyspark *.pyi py.typed *.json
20
+ recursive-include deps/jars *.jar
21
+ graft deps/bin
22
+ recursive-include deps/sbin spark-config.sh spark-daemon.sh start-history-server.sh stop-history-server.sh
23
+ recursive-include deps/data *.data *.txt
24
+ recursive-include deps/licenses *.txt
25
+ recursive-include deps/examples *.py
26
+ recursive-include lib *.zip
27
+ include README.md
28
+
29
+ # Note that these commands are processed in the order they appear, so keep
30
+ # this exclude at the end.
31
+ global-exclude *.py[cod] __pycache__ .DS_Store
@@ -0,0 +1,71 @@
1
+ Metadata-Version: 2.2
2
+ Name: pyspark-connect
3
+ Version: 4.0.0
4
+ Summary: Apache Spark Python API with Spark Connect by default
5
+ Home-page: https://github.com/apache/spark/tree/master/python
6
+ Author: Spark Developers
7
+ Author-email: dev@spark.apache.org
8
+ License: http://www.apache.org/licenses/LICENSE-2.0
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Programming Language :: Python :: 3.9
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: Implementation :: CPython
17
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
18
+ Classifier: Typing :: Typed
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ Requires-Dist: pyspark==4.0.0
22
+ Requires-Dist: pandas>=2.0.0
23
+ Requires-Dist: pyarrow>=11.0.0
24
+ Requires-Dist: grpcio>=1.67.0
25
+ Requires-Dist: grpcio-status>=1.67.0
26
+ Requires-Dist: googleapis-common-protos>=1.65.0
27
+ Requires-Dist: numpy>=1.21
28
+ Dynamic: author
29
+ Dynamic: author-email
30
+ Dynamic: classifier
31
+ Dynamic: description
32
+ Dynamic: description-content-type
33
+ Dynamic: home-page
34
+ Dynamic: license
35
+ Dynamic: requires-dist
36
+ Dynamic: requires-python
37
+ Dynamic: summary
38
+
39
+ # Apache Spark
40
+
41
+ Spark is a unified analytics engine for large-scale data processing. It provides
42
+ high-level APIs in Scala, Java, Python, and R, and an optimized engine that
43
+ supports general computation graphs for data analysis. It also supports a
44
+ rich set of higher-level tools including Spark SQL for SQL and DataFrames,
45
+ pandas API on Spark for pandas workloads, MLlib for machine learning, GraphX for graph processing,
46
+ and Structured Streaming for stream processing.
47
+
48
+ <https://spark.apache.org/>
49
+
50
+ ## Online Documentation
51
+
52
+ You can find the latest Spark documentation, including a programming
53
+ guide, on the [project web page](https://spark.apache.org/documentation.html)
54
+
55
+
56
+ ## Python Packaging
57
+
58
+ This README file only contains basic information related to pip installed PySpark.
59
+ This packaging is currently experimental and may change in future versions (although we will do our best to keep compatibility).
60
+ Using PySpark requires the Spark JARs, and if you are building this from source please see the builder instructions at
61
+ ["Building Spark"](https://spark.apache.org/docs/latest/building-spark.html).
62
+
63
+ The Python packaging for Spark is not intended to replace all of the other use cases. This Python packaged version of Spark is suitable for interacting with an existing cluster (be it Spark standalone, YARN) - but does not contain the tools required to set up your own standalone Spark cluster. You can download the full version of Spark from the [Apache Spark downloads page](https://spark.apache.org/downloads.html).
64
+
65
+
66
+ **NOTE:** If you are using this with a Spark standalone cluster you must ensure that the version (including minor version) matches or you may experience odd errors.
67
+
68
+ ## Python Requirements
69
+
70
+ At its core PySpark depends on Py4J, but some additional sub-packages have their own extra requirements for some features (including numpy, pandas, and pyarrow).
71
+ See also [Dependencies](https://spark.apache.org/docs/latest/api/python/getting_started/install.html#dependencies) for production, and [dev/requirements.txt](https://github.com/apache/spark/blob/master/dev/requirements.txt) for development.
@@ -0,0 +1,33 @@
1
+ # Apache Spark
2
+
3
+ Spark is a unified analytics engine for large-scale data processing. It provides
4
+ high-level APIs in Scala, Java, Python, and R, and an optimized engine that
5
+ supports general computation graphs for data analysis. It also supports a
6
+ rich set of higher-level tools including Spark SQL for SQL and DataFrames,
7
+ pandas API on Spark for pandas workloads, MLlib for machine learning, GraphX for graph processing,
8
+ and Structured Streaming for stream processing.
9
+
10
+ <https://spark.apache.org/>
11
+
12
+ ## Online Documentation
13
+
14
+ You can find the latest Spark documentation, including a programming
15
+ guide, on the [project web page](https://spark.apache.org/documentation.html)
16
+
17
+
18
+ ## Python Packaging
19
+
20
+ This README file only contains basic information related to pip installed PySpark.
21
+ This packaging is currently experimental and may change in future versions (although we will do our best to keep compatibility).
22
+ Using PySpark requires the Spark JARs, and if you are building this from source please see the builder instructions at
23
+ ["Building Spark"](https://spark.apache.org/docs/latest/building-spark.html).
24
+
25
+ The Python packaging for Spark is not intended to replace all of the other use cases. This Python packaged version of Spark is suitable for interacting with an existing cluster (be it Spark standalone, YARN) - but does not contain the tools required to set up your own standalone Spark cluster. You can download the full version of Spark from the [Apache Spark downloads page](https://spark.apache.org/downloads.html).
26
+
27
+
28
+ **NOTE:** If you are using this with a Spark standalone cluster you must ensure that the version (including minor version) matches or you may experience odd errors.
29
+
30
+ ## Python Requirements
31
+
32
+ At its core PySpark depends on Py4J, but some additional sub-packages have their own extra requirements for some features (including numpy, pandas, and pyarrow).
33
+ See also [Dependencies](https://spark.apache.org/docs/latest/api/python/getting_started/install.html#dependencies) for production, and [dev/requirements.txt](https://github.com/apache/spark/blob/master/dev/requirements.txt) for development.
@@ -0,0 +1,26 @@
1
+ #
2
+ # Licensed to the Apache Software Foundation (ASF) under one or more
3
+ # contributor license agreements. See the NOTICE file distributed with
4
+ # this work for additional information regarding copyright ownership.
5
+ # The ASF licenses this file to You under the Apache License, Version 2.0
6
+ # (the "License"); you may not use this file except in compliance with
7
+ # the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ """
19
+ A marker package to make Spark Connect default.
20
+ """
21
+
22
+ from pyspark_connect.version import __version__
23
+
24
+ __all__ = [
25
+ "__version__",
26
+ ]
@@ -0,0 +1 @@
1
+ __version__: str = '4.0.0'
@@ -0,0 +1,71 @@
1
+ Metadata-Version: 2.2
2
+ Name: pyspark-connect
3
+ Version: 4.0.0
4
+ Summary: Apache Spark Python API with Spark Connect by default
5
+ Home-page: https://github.com/apache/spark/tree/master/python
6
+ Author: Spark Developers
7
+ Author-email: dev@spark.apache.org
8
+ License: http://www.apache.org/licenses/LICENSE-2.0
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Programming Language :: Python :: 3.9
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: Implementation :: CPython
17
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
18
+ Classifier: Typing :: Typed
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ Requires-Dist: pyspark==4.0.0
22
+ Requires-Dist: pandas>=2.0.0
23
+ Requires-Dist: pyarrow>=11.0.0
24
+ Requires-Dist: grpcio>=1.67.0
25
+ Requires-Dist: grpcio-status>=1.67.0
26
+ Requires-Dist: googleapis-common-protos>=1.65.0
27
+ Requires-Dist: numpy>=1.21
28
+ Dynamic: author
29
+ Dynamic: author-email
30
+ Dynamic: classifier
31
+ Dynamic: description
32
+ Dynamic: description-content-type
33
+ Dynamic: home-page
34
+ Dynamic: license
35
+ Dynamic: requires-dist
36
+ Dynamic: requires-python
37
+ Dynamic: summary
38
+
39
+ # Apache Spark
40
+
41
+ Spark is a unified analytics engine for large-scale data processing. It provides
42
+ high-level APIs in Scala, Java, Python, and R, and an optimized engine that
43
+ supports general computation graphs for data analysis. It also supports a
44
+ rich set of higher-level tools including Spark SQL for SQL and DataFrames,
45
+ pandas API on Spark for pandas workloads, MLlib for machine learning, GraphX for graph processing,
46
+ and Structured Streaming for stream processing.
47
+
48
+ <https://spark.apache.org/>
49
+
50
+ ## Online Documentation
51
+
52
+ You can find the latest Spark documentation, including a programming
53
+ guide, on the [project web page](https://spark.apache.org/documentation.html)
54
+
55
+
56
+ ## Python Packaging
57
+
58
+ This README file only contains basic information related to pip installed PySpark.
59
+ This packaging is currently experimental and may change in future versions (although we will do our best to keep compatibility).
60
+ Using PySpark requires the Spark JARs, and if you are building this from source please see the builder instructions at
61
+ ["Building Spark"](https://spark.apache.org/docs/latest/building-spark.html).
62
+
63
+ The Python packaging for Spark is not intended to replace all of the other use cases. This Python packaged version of Spark is suitable for interacting with an existing cluster (be it Spark standalone, YARN) - but does not contain the tools required to set up your own standalone Spark cluster. You can download the full version of Spark from the [Apache Spark downloads page](https://spark.apache.org/downloads.html).
64
+
65
+
66
+ **NOTE:** If you are using this with a Spark standalone cluster you must ensure that the version (including minor version) matches or you may experience odd errors.
67
+
68
+ ## Python Requirements
69
+
70
+ At its core PySpark depends on Py4J, but some additional sub-packages have their own extra requirements for some features (including numpy, pandas, and pyarrow).
71
+ See also [Dependencies](https://spark.apache.org/docs/latest/api/python/getting_started/install.html#dependencies) for production, and [dev/requirements.txt](https://github.com/apache/spark/blob/master/dev/requirements.txt) for development.
@@ -0,0 +1,11 @@
1
+ MANIFEST.in
2
+ README.md
3
+ setup.cfg
4
+ setup.py
5
+ pyspark_connect/__init__.py
6
+ pyspark_connect/version.py
7
+ pyspark_connect.egg-info/PKG-INFO
8
+ pyspark_connect.egg-info/SOURCES.txt
9
+ pyspark_connect.egg-info/dependency_links.txt
10
+ pyspark_connect.egg-info/requires.txt
11
+ pyspark_connect.egg-info/top_level.txt
@@ -0,0 +1,7 @@
1
+ pyspark==4.0.0
2
+ pandas>=2.0.0
3
+ pyarrow>=11.0.0
4
+ grpcio>=1.67.0
5
+ grpcio-status>=1.67.0
6
+ googleapis-common-protos>=1.65.0
7
+ numpy>=1.21
@@ -0,0 +1 @@
1
+ pyspark_connect
@@ -0,0 +1,10 @@
1
+ [bdist_wheel]
2
+ universal = 1
3
+
4
+ [metadata]
5
+ description_file = README.md
6
+
7
+ [egg_info]
8
+ tag_build =
9
+ tag_date = 0
10
+
@@ -0,0 +1,145 @@
1
+ #!/usr/bin/env python3
2
+
3
+ #
4
+ # Licensed to the Apache Software Foundation (ASF) under one or more
5
+ # contributor license agreements. See the NOTICE file distributed with
6
+ # this work for additional information regarding copyright ownership.
7
+ # The ASF licenses this file to You under the Apache License, Version 2.0
8
+ # (the "License"); you may not use this file except in compliance with
9
+ # the License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+
19
+ # cd python
20
+ # python packaging/connect/setup.py sdist
21
+
22
+ # cd python/packaging/connect
23
+ # python setup.py sdist
24
+
25
+ import sys
26
+ from setuptools import setup
27
+ import os
28
+ from shutil import copyfile, copytree, move, rmtree
29
+ import glob
30
+ from pathlib import Path
31
+
32
+ if (
33
+ # When we package, the parent directory 'connect' dir
34
+ # (as we pip install -e python/packaging/connect)
35
+ os.getcwd() == str(Path(__file__).parent.absolute())
36
+ and str(Path(__file__).parent.name) == "connect"
37
+ ):
38
+ # For:
39
+ # - pip install -e python/packaging/connect
40
+ # It moves the current working directory to 'connect'
41
+ # - cd python/packaging/connect; python setup.py sdist
42
+ #
43
+ # For:
44
+ # - python packaging/connect/setup.py sdist, it does not
45
+ # execute this branch.
46
+ #
47
+ # Move to spark/python
48
+ os.chdir(Path(__file__).parent.parent.parent.absolute())
49
+
50
+ # Check and see if we are under the spark path in which case we need to build the symlink farm.
51
+ # This is important because we only want to build the symlink farm while under Spark otherwise we
52
+ # want to use the symlink farm. And if the symlink farm exists under while under Spark (e.g. a
53
+ # partially built sdist) we should error and have the user sort it out.
54
+ in_spark = os.path.isfile("../core/src/main/scala/org/apache/spark/SparkContext.scala") or (
55
+ os.path.isfile("../RELEASE") and len(glob.glob("../jars/spark*core*.jar")) == 1
56
+ )
57
+
58
+ try:
59
+ if in_spark:
60
+ # !!HACK ALTERT!!
61
+ # 1. `setup.py` has to be located with the same directory with the package.
62
+ # Therefore, we copy the current file, and place it at `spark/python` directory.
63
+ # After that, we remove it in the end.
64
+ # 2. Here it renames `pyspark` and `lib` to `pyspark.back` and `lib.back` so MANIFEST.in
65
+ # does not pick `pyspark` and `py4j` up. We rename it back in the end.
66
+ move("pyspark", "pyspark.back")
67
+ move("lib", "lib.back")
68
+ copyfile("packaging/connect/setup.py", "setup.py")
69
+ copyfile("packaging/connect/setup.cfg", "setup.cfg")
70
+ copytree("packaging/connect/pyspark_connect", "pyspark_connect")
71
+ copyfile("pyspark.back/version.py", "pyspark_connect/version.py")
72
+
73
+ try:
74
+ exec(open("pyspark_connect/version.py").read())
75
+ except IOError:
76
+ print(
77
+ "Failed to load PySpark Connect version file for packaging. "
78
+ "You must be in Spark's python dir.",
79
+ file=sys.stderr,
80
+ )
81
+ sys.exit(-1)
82
+ VERSION = __version__ # noqa
83
+
84
+ # If you are changing the versions here, please also change ./python/pyspark/sql/pandas/utils.py
85
+ # For Arrow, you should also check ./pom.xml and ensure there are no breaking changes in the
86
+ # binary format protocol with the Java version, see ARROW_HOME/format/* for specifications.
87
+ # Also don't forget to update python/docs/source/getting_started/install.rst,
88
+ # python/packaging/classic/setup.py, and python/packaging/client/setup.py
89
+ _minimum_pandas_version = "2.0.0"
90
+ _minimum_numpy_version = "1.21"
91
+ _minimum_pyarrow_version = "11.0.0"
92
+ _minimum_grpc_version = "1.67.0"
93
+ _minimum_googleapis_common_protos_version = "1.65.0"
94
+
95
+ with open("README.md") as f:
96
+ long_description = f.read()
97
+
98
+ connect_packages = [
99
+ "pyspark_connect",
100
+ ]
101
+
102
+ setup(
103
+ name="pyspark-connect",
104
+ version=VERSION,
105
+ description="Apache Spark Python API with Spark Connect by default",
106
+ long_description=long_description,
107
+ long_description_content_type="text/markdown",
108
+ author="Spark Developers",
109
+ author_email="dev@spark.apache.org",
110
+ url="https://github.com/apache/spark/tree/master/python",
111
+ packages=connect_packages,
112
+ include_package_data=True,
113
+ license="http://www.apache.org/licenses/LICENSE-2.0",
114
+ # Don't forget to update python/docs/source/getting_started/install.rst
115
+ # if you're updating the versions or dependencies.
116
+ install_requires=[
117
+ "pyspark==%s" % VERSION,
118
+ "pandas>=%s" % _minimum_pandas_version,
119
+ "pyarrow>=%s" % _minimum_pyarrow_version,
120
+ "grpcio>=%s" % _minimum_grpc_version,
121
+ "grpcio-status>=%s" % _minimum_grpc_version,
122
+ "googleapis-common-protos>=%s" % _minimum_googleapis_common_protos_version,
123
+ "numpy>=%s" % _minimum_numpy_version,
124
+ ],
125
+ python_requires=">=3.9",
126
+ classifiers=[
127
+ "Development Status :: 5 - Production/Stable",
128
+ "License :: OSI Approved :: Apache Software License",
129
+ "Programming Language :: Python :: 3.9",
130
+ "Programming Language :: Python :: 3.10",
131
+ "Programming Language :: Python :: 3.11",
132
+ "Programming Language :: Python :: 3.12",
133
+ "Programming Language :: Python :: 3.13",
134
+ "Programming Language :: Python :: Implementation :: CPython",
135
+ "Programming Language :: Python :: Implementation :: PyPy",
136
+ "Typing :: Typed",
137
+ ],
138
+ )
139
+ finally:
140
+ if in_spark:
141
+ move("pyspark.back", "pyspark")
142
+ move("lib.back", "lib")
143
+ os.remove("setup.py")
144
+ os.remove("setup.cfg")
145
+ rmtree("pyspark_connect")