Skip to content

Commit 38bdaeb

Browse files
authored
Merge pull request #21 from primitiv/feature/release-030
Release v0.3
2 parents fd9e518 + 4c135cf commit 38bdaeb

3 files changed

Lines changed: 42 additions & 22 deletions

File tree

README.md

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,65 @@
66
[![Build Status (develop)](https://img.shields.io/travis/primitiv/primitiv-python/develop.svg?label=build+%28develop%29)](https://travis-ci.org/primitiv/primitiv-python)
77
[![PyPI version](https://badge.fury.io/py/primitiv.svg)](https://pypi.python.org/pypi/primitiv)
88

9-
Python frontend of primitiv
10-
=================================
9+
Python Frontend of primitiv
10+
===========================
1111

12-
Dependency
13-
---------------------------------
12+
Dependencies
13+
------------
1414

15-
* C++ primitiv
1615
* Python 3 (3.5 or later)
1716
* NumPy (1.11.0 or later)
1817
* Cython (0.27 or later)
18+
* scikit-build (0.6.1 or later, only for building)
19+
* (optional) CUDA (7.5 or later)
20+
* (optional) OpenCL (1.2 or later) and OpenCL C++ binding v2
1921

20-
How to install?
21-
---------------------------------
22+
Getting Started
23+
---------------
2224

23-
1. Install [primitiv core library](http://github.com/primitiv/primitiv):
25+
### Automatic Install using `pip`
26+
27+
To install primitiv without CUDA and OpenCL, run the following commands:
2428

2529
```
26-
$ cmake .. [options]
27-
$ make
28-
$ sudo make install
30+
$ pip3 install numpy cython scikit-build [--user]
31+
$ pip3 install primitiv [--user]
2932
```
3033

31-
2. Install NumPy and Cython with Python 3
34+
To enable CUDA and/or OpenCL support, specify `--enable-cuda` or
35+
`--enable-opencl` with `--global-option` flag of `pip` like the following
36+
example:
3237

3338
```
34-
$ sudo apt install python3-numpy
35-
$ sudo pip3 install cython
39+
$ pip3 install primitiv --global-option --enable-cuda \
40+
--global-option --enable-opncl
3641
```
3742

38-
Currently, Cython 0.27 is not contained in Debian and Ubuntu repositories.
43+
### Compiling Step by Step
3944

40-
3. Run the following commands in python-primitiv directory:
45+
1. Install NumPy, Cython and scikit-build with Python 3
4146

4247
```
48+
$ sudo pip3 install numpy cython scikit-build
49+
```
50+
51+
2. Run the following commands in `primitiv-python` directory:
52+
53+
```
54+
$ git submodule update --init
4355
$ python3 ./setup.py build [--enable-cuda] [--enable-opencl]
44-
$ python3 ./setup.py test # (optional)
45-
$ sudo python3 ./setup.py install [--enable-cuda] [--enable-opencl]
56+
$ python3 ./setup.py test [--enable-cuda] [--enable-opencl] # (optional)
57+
$ python3 ./setup.py install [--user] [--enable-cuda] [--enable-opencl]
4658
```
4759

48-
You also can use `LIBRARY_PATH` and `CPLUS_INCLUDE_PATH` depending on your environment.
60+
To enable CUDA and/or OpenCL support, run setup script with `--enable-DEVICE` option.
61+
62+
primitiv-python repository contains the core library as a git submodule.
63+
Note that you have to update the working tree of the core library manually by
64+
`git submodule update` after you run `git pull` or `git checkout` commands.
65+
66+
Resources
67+
---------
4968

50-
To install CUDA and/or OpenCL support, run setup script with `--enable-DEVICE` option.
69+
* [C++ core library of primitiv](https://github.com/primitiv/primitiv)
70+
* [Examples](https://github.com/primitiv/primitiv-python/tree/develop/examples)

primitiv-core

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from Cython.Build import build_ext
1111

12-
VERSION = "0.2.0"
12+
VERSION = "0.3.0"
1313

1414
SUBMODULE_DIR = "primitiv-core"
1515
SUBMODULE_CMAKELIST = os.path.join(SUBMODULE_DIR, "CMakeLists.txt")

0 commit comments

Comments
 (0)