This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
setup.py
67 lines (57 loc) · 2.68 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from glob import glob
import os
import sys
from setuptools import setup, Extension
from Cython.Build import cythonize
if sys.argv[-1] == 'setup.py':
print('To install, run \'python setup.py install\'')
print()
if sys.version_info[:2] < (2, 7):
print(
'networkx-metis requires Python version 2.7 or later' +
' ({}.{} detected).'.format(*sys.version_info[:2]))
sys.exit(-1)
libraries = [
('gklib', {'sources': glob('src/GKlib/*.c') + glob('src/GKlib/*.cc'),
'depends': glob('src/GKlib/*.h'),
'include_dirs': ['src/GKlib']}),
('metis', {'sources': glob('src/libmetis/*.c') + glob('src/libmetis/*.cc'),
'depends': glob('src/libmetis/*.h'),
'include_dirs': ['src/GKlib', 'src/libmetis']})]
ext_modules = cythonize(
[Extension('nxmetis._metis', ['nxmetis/_metis.pyx'],
include_dirs=['src/GKlib', 'src/libmetis'],
libraries=['metis', 'gklib'])])
install_requires = ['networkx', 'decorator', 'six']
if sys.version_info[:2] < (3, 4):
install_requires.append('enum34')
if __name__ == "__main__":
setup(
name = 'networkx-metis',
version = '1.0',
maintainer = 'NetworkX Developers',
maintainer_email = '[email protected]',
description = 'NetworkX Addon to allow graph partitioning with METIS',
keywords = ['Networks', 'Graph Theory', 'Mathematics',
'network', 'graph', 'math', 'graph partitioning'],
classifiers = ['Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',],
packages = ['nxmetis', 'nxmetis.tests'],
libraries = libraries,
ext_modules = ext_modules,
install_requires = install_requires,
test_suite = 'nose.collector',
tests_require = ['nose>=0.10.1']
)