Skip to content

Commit

Permalink
Fill out setup.py, update README for installing from github.
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldmccarthy committed Jun 16, 2016
1 parent 3c5c5f5 commit 2707601
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 10 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,21 @@ in the file.
## Installation


1. Make sure you have [cython](http://cython.org/) installed.
1. Make sure you have [cython](http://cython.org/) installed.

2. Compile the python extension:

2. Install into your Python environment:
```sh
pip install git+https://github.com/pauldmccarthy/indexed_gzip.git
```


3. Or, if you don't want to install, compile the python extension:
```sh
python setup.py build_ext --inplace
```

3. Put the `indexed_gzip` directory on your `$PYTHONPATH`.
And put the `indexed_gzip` directory on your `$PYTHONPATH`.


## Usage
Expand Down
28 changes: 21 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,28 @@
from Cython.Build import cythonize


# TODO
# if Cython present:
# build indexed_gzip.pyx
#
# else:
# build pre-generated indexed_gzip.c
#
import indexed_gzip as igzip

setup(
name='indexed_gzip',
version=str(igzip.__version__),
author='Paul McCarthy',
author_email='[email protected]',
description='Fast random access of gzip files in Python',
url='https://github.com/pauldmccarthy/indexed_gzip',
license='zlib',

classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: zlib/libpng License',
'Programming Language :: C',
'Programming Language :: Cython',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: System :: Archiving :: Compression',
],

ext_modules=cythonize([
Extension('indexed_gzip',
['indexed_gzip.pyx', 'zran.c'],
Expand All @@ -26,6 +39,7 @@
include_dirs=['.'],
extra_compile_args=['-Wno-unused-function'])
]),

setup_requires=['pytest-runner'],
tests_require=['pytest', 'numpy'],
test_suite='tests',
Expand Down

0 comments on commit 2707601

Please sign in to comment.