-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARROW-54: [Python] Rename package to "pyarrow"
Also fixed rpath issues (at great cost) per ARROW-53 Author: Wes McKinney <wesm@apache.org> Closes #23 from wesm/ARROW-54 and squashes the following commits: b8ce0e8 [Wes McKinney] Update installation instructions cae9b39 [Wes McKinney] Fix rpath issues per ARROW-53 7554539 [Wes McKinney] Twiddle rpath stuff, remove empty arrow_test_util module 8cca41a [Wes McKinney] Fix Travis CI script for renamed package 1d37c93 [Wes McKinney] Opt in to building unit tests 60088d0 [Wes McKinney] Rename package to pyarrow e3d0caf [Wes McKinney] Note on other Python interpreters 80d3bac [Wes McKinney] Start installation document
- Loading branch information
Showing
34 changed files
with
300 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
## Building pyarrow (Apache Arrow Python library) | ||
|
||
First, clone the master git repository: | ||
|
||
```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][1] | ||
|
||
#### Python requirements | ||
|
||
You will need Python (CPython) 2.7, 3.4, or 3.5 installed. Earlier releases and | ||
are not being targeted. | ||
|
||
> 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: | ||
|
||
```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: | ||
|
||
```bash | ||
export ARROW_HOME=$HOME/local | ||
``` | ||
|
||
Now, we build Arrow: | ||
|
||
```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 | ||
``` | ||
|
||
#### Install `pyarrow` | ||
|
||
```bash | ||
cd arrow/python | ||
|
||
python setup.py install | ||
``` | ||
|
||
> 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. | ||
|
||
```python | ||
In [1]: import pyarrow | ||
|
||
In [2]: pyarrow.from_pylist([1,2,3]) | ||
Out[2]: | ||
<pyarrow.array.Int64Array object at 0x7f899f3e60e8> | ||
[ | ||
1, | ||
2, | ||
3 | ||
] | ||
``` | ||
|
||
[1]: https://cmake.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
# flake8: noqa | ||
|
||
from pyarrow.array import (Array, from_pylist, total_allocated_bytes, | ||
BooleanArray, NumericArray, | ||
Int8Array, UInt8Array, | ||
ListArray, StringArray) | ||
|
||
from pyarrow.error import ArrowException | ||
|
||
from pyarrow.scalar import (ArrayValue, Scalar, NA, NAType, | ||
BooleanValue, | ||
Int8Value, Int16Value, Int32Value, Int64Value, | ||
UInt8Value, UInt16Value, UInt32Value, UInt64Value, | ||
FloatValue, DoubleValue, ListValue, StringValue) | ||
|
||
from pyarrow.schema import (null, bool_, | ||
int8, int16, int32, int64, | ||
uint8, uint16, uint32, uint64, | ||
float_, double, string, | ||
list_, struct, field, | ||
DataType, Field, Schema) |
Oops, something went wrong.