Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,22 @@ Zen is a Python library that provides a high-speed, easy-to-use API for analysin

Official site: http://zen.networkdynamics.org/

## Installation

To install zenlib do the following:

- ``git clone`` the repository
- Install: distribute, cython>=0.14, numpy>=1.6.1
- ``cd`` to ``src/`` and run ``python setup.py install``

Here is an example of the installation process using [virtualenv](http://www.virtualenv.org/en/latest/index.html) for
convenience:

git clone https://github.com/networkdynamics/zenlib.git
virtualenv --distribute zenlibenv
(zenlibenv) pip install cython
(zenlibenv) pip install numpy
(zenlibenv) cd zenlib/src/
(zenlibenv) python setup.py install

License: BSD
39 changes: 21 additions & 18 deletions src/setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
from distutils.core import setup
#from setuptools import setup
try:
from setuptools import setup
except ImportError:
#This should not be the case though
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import os.path
Expand Down Expand Up @@ -28,15 +31,15 @@
Extension('zen.algorithms.centrality', ['zen/algorithms/centrality.pyx'], include_dirs=[numpy_include_dir]),
Extension('zen.layout.spring_layout', ['zen/layout/spring_layout.pyx'], include_dirs=[numpy_include_dir]),
Extension('zen.layout.random_layout', ['zen/layout/random_layout.pyx'], include_dirs=[numpy_include_dir]),
Extension('zen.layout.forceatlas_layout', ['zen/layout/forceatlas_layout.pyx'], include_dirs=[numpy_include_dir]),
Extension('zen.layout.fruchtermanreingold_layout', ['zen/layout/fruchtermanreingold_layout.pyx'], include_dirs=[numpy_include_dir]),
Extension('zen.layout.forceatlas_layout', ['zen/layout/forceatlas_layout.pyx'], include_dirs=[numpy_include_dir]),
Extension('zen.layout.fruchtermanreingold_layout', ['zen/layout/fruchtermanreingold_layout.pyx'], include_dirs=[numpy_include_dir]),
Extension('zen.algorithms.shortest_path', ['zen/algorithms/shortest_path.pyx'], include_dirs=[numpy_include_dir, fiboheap_include_dir]),
Extension('zen.algorithms.properties', ['zen/algorithms/properties.pyx'], include_dirs=[numpy_include_dir]),
Extension('zen.algorithms.modularity', ['zen/algorithms/modularity.pyx'], include_dirs=[numpy_include_dir]),
Extension('zen.algorithms.modularity', ['zen/algorithms/modularity.pyx'], include_dirs=[numpy_include_dir]),
Extension('zen.algorithms.spanning', ['zen/algorithms/spanning.pyx'], include_dirs=[numpy_include_dir, fiboheap_include_dir]),
Extension('zen.algorithms.matching', ['zen/algorithms/matching.pyx'], include_dirs=[numpy_include_dir]),
Extension('zen.generating.rgm', ['zen/generating/rgm.pyx'], include_dirs=[numpy_include_dir]),
Extension('zen.algorithms.community.label_propagation', ['zen/algorithms/community/label_propagation.pyx'], include_dirs=[numpy_include_dir])]
Extension('zen.algorithms.community.label_propagation', ['zen/algorithms/community/label_propagation.pyx'], include_dirs=[numpy_include_dir])]


setup(
Expand All @@ -57,20 +60,20 @@
'zen.layout' : ['*.pxd'],
'zen.tests' : ['*.pxd','*.scn','*.elist','*.helist','*.rdot', '*.memlist', '*.gml'],
'zen.util' : ['*.pxd'],
'zen.data' : ['*.scn','*.gml'] }#,
'zen.data' : ['*.scn','*.gml'] },

# # dependencies
# setup_requires = ['cython>=0.14'],
# install_requires = ['numpy>=1.6.1','matplotlib>=1.0.1'],
#
setup_requires = ['distribute','cython>=0.14'],
install_requires = ['numpy>=1.6.1','matplotlib>=1.0.1', 'networkx'],
#
# # testing suite
# test_suite = 'zen.test',
#
#
# # project metadata
# author = 'Derek Ruths',
# author_email = 'druths@networkdynamics.org',
# description = 'Zen is a high-performance, easy-to-use network library developed specifically for Python.',
# license = 'BSD',
# url = 'http://zen.networkdynamics.org',
# download_url = 'https://github.com/networkdynamics/zenlib'
author = 'Derek Ruths',
author_email = 'druths@networkdynamics.org',
description = 'Zen is a high-performance, easy-to-use network library developed specifically for Python.',
license = 'BSD',
url = 'http://zen.networkdynamics.org',
download_url = 'https://github.com/networkdynamics/zenlib'
)