X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=setup.py;h=235743d58b07d4a8375ad70fe880096679be6563;hb=e3ce3d767b284574087f630fb2a98d861811ced5;hp=988b4bc03f28ef94e3029bab93caaedda458fe9f;hpb=e96e370df463518cf451a8f8df9f9a93d2b94730;p=nepi.git diff --git a/setup.py b/setup.py index 988b4bc0..235743d5 100755 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ from distutils.core import setup import sys +PY2 = sys.version_info[0] == 2 with open('VERSION') as f: version_tag = f.read().strip() @@ -11,6 +12,24 @@ with open("COPYING") as f: with open("README") as f: long_description = f.read() +data_files = [ ('/etc/nepi', [ 'VERSION', 'COPYING', 'README' ] ) ] + +### requirements - used by pip install +required_modules = [ ] + # we are now using six for a portable code +required_modules.append('six') + # ipaddr in py2 used to be a separate lib + # within recent py3, it is now in standard library but named ipaddress +if PY2: + required_modules.append('ipaddr') + # this is required regardless of the python version +required_modules.append('networkx') + # refrain from mentioning these ones that are not exactly crucial + # and that have additional, non-python, dependencies + # that can easily break the whole install +#required_modules.append('matplotlib') +#required_modules.append('pygraphviz') + setup( name = "nepi", version = version_tag, @@ -22,6 +41,7 @@ setup( download_url = "http://build.onelab.eu/nepi/nepi-{v}.tar.gz".format(v=version_tag), url = "http://nepi.inria.fr/", platforms = "Linux, OSX", + data_files = data_files, package_dir = {"": "src"}, packages = [ "nepi", @@ -50,5 +70,6 @@ setup( "nepi.resources.planetlab" : [ "scripts/*.py" ], "nepi.resources.linux" : [ "scripts/*.py" ], "nepi.resources.linux.ns3" : [ "dependencies/*.tar.gz" ] - } + }, + install_requires = required_modules, )