Skip to content
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
4 changes: 2 additions & 2 deletions dev/create-release/spark-rm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Includes:
# * Java 8
# * Ivy
# * Python/PyPandoc (2.7.15/3.6.7)
# * Python (2.7.15/3.6.7)
# * R-base/R-base-dev (3.6.1)
# * Ruby 2.3 build utilities

Expand All @@ -34,7 +34,7 @@ ENV DEBCONF_NONINTERACTIVE_SEEN true
ARG APT_INSTALL="apt-get install --no-install-recommends -y"

ARG BASE_PIP_PKGS="setuptools wheel"
ARG PIP_PKGS="pyopenssl pypandoc numpy sphinx"
ARG PIP_PKGS="pyopenssl numpy sphinx"

# Install extra needed repos and refresh.
# - CRAN repo
Expand Down
1 change: 0 additions & 1 deletion dev/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ flake8==3.5.0
jira==1.0.3
PyGithub==1.26.0
Unidecode==0.04.19
pypandoc==1.3.3
sphinx
2 changes: 1 addition & 1 deletion dev/run-pip-tests
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ for python in "${PYTHON_EXECS[@]}"; do
fi
# Upgrade pip & friends if using virtual env
if [ ! -n "$USE_CONDA" ]; then
pip install --upgrade pip pypandoc wheel numpy
pip install --upgrade pip wheel numpy
fi

echo "Creating pip installable source dist"
Expand Down
22 changes: 18 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,30 @@ installed. Also install the following libraries:

```sh
$ sudo gem install jekyll jekyll-redirect-from rouge
# Following is needed only for generating API docs
$ sudo pip install sphinx pypandoc mkdocs numpy
$ sudo Rscript -e 'install.packages(c("knitr", "devtools", "testthat", "rmarkdown"), repos="https://cloud.r-project.org/")'
$ sudo Rscript -e 'devtools::install_version("roxygen2", version = "5.0.1", repos="https://cloud.r-project.org/")'
```

Note: If you are on a system with both Ruby 1.9 and Ruby 2.0 you may need to replace gem with gem2.0.

### R Documentation

If you'd like to generate R documentation, you'll need to [install Pandoc](https://pandoc.org/installing.html)
and install these libraries:

```sh
$ sudo Rscript -e 'install.packages(c("knitr", "devtools", "testthat", "rmarkdown"), repos="https://cloud.r-project.org/")'
$ sudo Rscript -e 'devtools::install_version("roxygen2", version = "5.0.1", repos="https://cloud.r-project.org/")'
```

Note: Other versions of roxygen2 might work in SparkR documentation generation but `RoxygenNote` field in `$SPARK_HOME/R/pkg/DESCRIPTION` is 5.0.1, which is updated if the version is mismatched.

### API Documentation

To generate API docs for any language, you'll need to install these libraries:

```sh
$ sudo pip install sphinx mkdocs numpy
```

## Generating the Documentation HTML

We include the Spark documentation as part of the source (as opposed to using a hosted wiki, such as
Expand Down
13 changes: 3 additions & 10 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,21 +153,15 @@ def _supports_symlinks():
# will search for SPARK_HOME with Python.
scripts.append("pyspark/find_spark_home.py")

# Parse the README markdown file into rst for PyPI
long_description = "!!!!! missing pandoc do not upload to PyPI !!!!"
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except ImportError:
print("Could not import pypandoc - required to package PySpark", file=sys.stderr)
except OSError:
print("Could not convert - pandoc is not installed", file=sys.stderr)
with open('README.md') as f:
long_description = f.read()

setup(
name='pyspark',
version=VERSION,
description='Apache Spark Python API',
long_description=long_description,
long_description_content_type="text/markdown",
author='Spark Developers',
author_email='dev@spark.apache.org',
url='https://github.com/apache/spark/tree/master/python',
Expand Down Expand Up @@ -213,7 +207,6 @@ def _supports_symlinks():
scripts=scripts,
license='http://www.apache.org/licenses/LICENSE-2.0',
install_requires=['py4j==0.10.8.1'],
setup_requires=['pypandoc'],
extras_require={
'ml': ['numpy>=1.7'],
'mllib': ['numpy>=1.7'],
Expand Down