Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Branch 2.2 #19070
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
Uh oh!
There was an error while loading. Please reload this page.
Branch 2.2 #19070
Changes from 1 commit
4fcd52b3aad598cfd1bf041d8d21af1ff8b50dba30c4b16dc81f63c8a575532a0bf5c42fd6138d8328d8ddc199e5e9541a06c985cdbb068fd20c64600dee39ee9d597e936a961d1072483aeac9c59ad42b7a2a162405afcae65d303f82d65e0aa239b52a06d8896c4e9cbf39fe01f1f2022a4955ae1c657a21de9289dd17fafe283f99456b92837ae2b59ed430922defc799d739f7665f2408bd25e87d8dc51be126640a23b79e4cf6730a75fdc7d8287440d3cad66e3686c2ef59f9a3a607a2614fda6f4ab7b826a4e023b81a7024cba3b5bb3d90025cc800ae00d49f36c3ee7f35f5b9a4a8e1cc5dbd50c422796c628e7b560c97377cfa8478874ec8bbab6acd44811388fdd421d8ec3f93d079a4341b2f5eaa902cf1783f6812c714153c869af5b815a0820b0be4726003dea4d78e4e67739492f7c8fa6b7875580ecfd48a843bdae1a9824836be039c4652bc2c15220943d53212c342cc8309bdc83562651193dda682e02e063af4f89cb5504f676ee41fa585c879909be3653e6f1d3deeb38747f8ec0d4accd3c79b7fab070cf7fcdec7b50736e329beacf10fa88bf7f1e514a7e6b8b80f662e442ee883498529c04f198e3a06ef7a5bd625734b99c0e9b6749ba9d29808f1602673394b06a3088d296c04f1ad44ab5d8e3a4a970f68c17a04b920cf5118de67e3c6ba647d16e2628b08fd029a0be2a2c7b2185fddf46fd39eadb21b67770fd2a6e1081c4e53a4e576fd4cab128487d0b1c9a64f108c8d7855964332b3bfad9d40fd0cea05edf4edcd9fb399aa01cb6fc8939eba30cf0719bbfe3ba81cb43698e85ce60ef98fd83bdb0499ce551df061fd5a0a76f4c212ee86cd3c0308bce09949fed88dccdada403b962ca13de5ec339c91191b1bfd1a806b2ef09379031df6cd3524a9bac66fa6bde2062b9174543479e580567c60d7397f904467ee8d690f4911bcfa2af9aae8e841bc2f098aaec7a04def4f0eb0c43f9c84fa92a7ba1c119986609a9e87ffcad0233147446be3f6d56d23ca55eac909496406eb1c7b9807748bacd3d9c8e62f1accc8f5ede0d2a96975fdea6426c2a38a0f640e9526087f236b2f4a5853672b4bd790d4ef2f59bb7eb59529b2917fe66a6a9944d10c9dc14054ff50f86e1fb1b5f01f7c4867da8fbf9afab9a342cc2a49968de0848df14304d0b781a1f808cb06a9ae7c969876821182478eb1b5a7f10c683663098dcb606dc1File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
## Problem Description When pyspark is listed as a dependency of another package, installing the other package will cause an install failure in pyspark. When the other package is being installed, pyspark's setup_requires requirements are installed including pypandoc. Thus, the exception handling on setup.py:152 does not work because the pypandoc module is indeed available. However, the pypandoc.convert() function fails if pandoc itself is not installed (in our use cases it is not). This raises an OSError that is not handled, and setup fails. The following is a sample failure: ``` $ which pandoc $ pip freeze | grep pypandoc pypandoc==1.4 $ pip install pyspark Collecting pyspark Downloading pyspark-2.2.0.post0.tar.gz (188.3MB) 100% |████████████████████████████████| 188.3MB 16.8MB/s Complete output from command python setup.py egg_info: Maybe try: sudo apt-get install pandoc See http://johnmacfarlane.net/pandoc/installing.html for installation options --------------------------------------------------------------- Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-mfnizcwa/pyspark/setup.py", line 151, in <module> long_description = pypandoc.convert('README.md', 'rst') File "/home/tbeck/.virtualenvs/cem/lib/python3.5/site-packages/pypandoc/__init__.py", line 69, in convert outputfile=outputfile, filters=filters) File "/home/tbeck/.virtualenvs/cem/lib/python3.5/site-packages/pypandoc/__init__.py", line 260, in _convert_input _ensure_pandoc_path() File "/home/tbeck/.virtualenvs/cem/lib/python3.5/site-packages/pypandoc/__init__.py", line 544, in _ensure_pandoc_path raise OSError("No pandoc was found: either install pandoc and add it\n" OSError: No pandoc was found: either install pandoc and add it to your PATH or or call pypandoc.download_pandoc(...) or install pypandoc wheels with included pandoc. ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-mfnizcwa/pyspark/ ``` ## What changes were proposed in this pull request? This change simply adds an additional exception handler for the OSError that is raised. This allows pyspark to be installed client-side without requiring pandoc to be installed. ## How was this patch tested? I tested this by building a wheel package of pyspark with the change applied. Then, in a clean virtual environment with pypandoc installed but pandoc not available on the system, I installed pyspark from the wheel. Here is the output ``` $ pip freeze | grep pypandoc pypandoc==1.4 $ which pandoc $ pip install --no-cache-dir ../spark/python/dist/pyspark-2.3.0.dev0-py2.py3-none-any.whl Processing /home/tbeck/work/spark/python/dist/pyspark-2.3.0.dev0-py2.py3-none-any.whl Requirement already satisfied: py4j==0.10.6 in /home/tbeck/.virtualenvs/cem/lib/python3.5/site-packages (from pyspark==2.3.0.dev0) Installing collected packages: pyspark Successfully installed pyspark-2.3.0.dev0 ``` Author: Tucker Beck <[email protected]> Closes #18981 from dusktreader/dusktreader/fix-pandoc-dependency-issue-in-setup_py. (cherry picked from commit aad2125) Signed-off-by: hyukjinkwon <[email protected]>Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing