mirror of
https://github.com/apache/arrow.git
synced 2026-10-28 16:47:19 +08:00
Revise python/README.md. Move DEVELOPMENT.md to Sphinx docs. Other cleaning
Change-Id: I3fa58de325357048c1a5aaea74cfb366fa30d25d
This commit is contained in:
1 parent
2187c1cd8f
commit
50049dd390
3 files changed
+10
-111
No files matched your search
@@ -202,7 +202,7 @@ Now, we can build pyarrow:
|
||||
python setup.py build_ext --inplace
|
||||
|
||||
Running C++ unit tests with Python
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
----------------------------------
|
||||
|
||||
Getting ``python-test.exe`` to run is a bit tricky because your
|
||||
``%PYTHONPATH%`` must be configured given the active conda environment:
|
||||
|
||||
@@ -35,11 +35,11 @@ structures.
|
||||
:caption: Getting Started
|
||||
|
||||
install
|
||||
development
|
||||
pandas
|
||||
filesystems
|
||||
parquet
|
||||
api
|
||||
development
|
||||
getting_involved
|
||||
|
||||
.. toctree::
|
||||
|
||||
@@ -37,115 +37,14 @@ Install the latest version from PyPI:
|
||||
pip install pyarrow
|
||||
|
||||
.. note::
|
||||
Currently there are only binary artifcats available for Linux and MacOS.
|
||||
|
||||
Currently there are only binary artifacts available for Linux and MacOS.
|
||||
Otherwise this will only pull the python sources and assumes an existing
|
||||
installation of the C++ part of Arrow.
|
||||
To retrieve the binary artifacts, you'll need a recent ``pip`` version that
|
||||
supports features like the ``manylinux1`` tag.
|
||||
installation of the C++ part of Arrow. To retrieve the binary artifacts,
|
||||
you'll need a recent ``pip`` version that supports features like the
|
||||
``manylinux1`` tag.
|
||||
|
||||
Building from source
|
||||
--------------------
|
||||
Installing from source
|
||||
----------------------
|
||||
|
||||
First, clone the master git repository:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
git clone https://github.com/apache/arrow.git arrow
|
||||
|
||||
System requirements
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Building pyarrow requires:
|
||||
|
||||
* A C++11 compiler
|
||||
|
||||
* Linux: gcc >= 4.8 or clang >= 3.5
|
||||
* OS X: XCode 6.4 or higher preferred
|
||||
|
||||
* `CMake <https://cmake.org/>`_
|
||||
|
||||
Python requirements
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You will need Python (CPython) 2.7, 3.4, or 3.5 installed. Earlier releases and
|
||||
are not being targeted.
|
||||
|
||||
.. note::
|
||||
This library targets CPython only due to an emphasis on interoperability with
|
||||
pandas and NumPy, which are only available for CPython.
|
||||
|
||||
The build requires NumPy, Cython, and a few other Python dependencies:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pip install cython
|
||||
cd arrow/python
|
||||
pip install -r requirements.txt
|
||||
|
||||
Installing Arrow C++ library
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
First, you should choose an installation location for Arrow C++. In the future
|
||||
using the default system install location will work, but for now we are being
|
||||
explicit:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
export ARROW_HOME=$HOME/local
|
||||
|
||||
Now, we build Arrow:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd arrow/cpp
|
||||
|
||||
mkdir dev-build
|
||||
cd dev-build
|
||||
|
||||
cmake -DCMAKE_INSTALL_PREFIX=$ARROW_HOME ..
|
||||
|
||||
make
|
||||
|
||||
# Use sudo here if $ARROW_HOME requires it
|
||||
make install
|
||||
|
||||
To get the optional Parquet support, you should also build and install
|
||||
`parquet-cpp <https://github.com/apache/parquet-cpp/blob/master/README.md>`_.
|
||||
|
||||
Install `pyarrow`
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd arrow/python
|
||||
|
||||
# --with-parquet enables the Apache Parquet support in PyArrow
|
||||
# --with-jemalloc enables the jemalloc allocator support in PyArrow
|
||||
# --build-type=release disables debugging information and turns on
|
||||
# compiler optimizations for native code
|
||||
python setup.py build_ext --with-parquet --with-jemalloc --build-type=release install
|
||||
python setup.py install
|
||||
|
||||
.. warning::
|
||||
On XCode 6 and prior there are some known OS X `@rpath` issues. If you are
|
||||
unable to import pyarrow, upgrading XCode may be the solution.
|
||||
|
||||
.. note::
|
||||
In development installations, you will also need to set a correct
|
||||
``LD_LIBRARY_PATH``. This is most probably done with
|
||||
``export LD_LIBRARY_PATH=$ARROW_HOME/lib:$LD_LIBRARY_PATH``.
|
||||
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
In [1]: import pyarrow
|
||||
|
||||
In [2]: pyarrow.array([1,2,3])
|
||||
Out[2]:
|
||||
<pyarrow.array.Int64Array object at 0x7f899f3e60e8>
|
||||
[
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]
|
||||
See :ref:`development`.
|
||||
Reference in new issue
Block a user