tweaked Makefile to use either setup or twine to upload stuff onto pypi
[nepi.git] / setup.py
1 #!/usr/bin/env python
2
3 from distutils.core import setup
4 import sys
5
6 PY2 = sys.version_info[0] == 2
7
8 with open('VERSION') as f:
9     version_tag = f.read().strip()
10 with open("COPYING") as f:
11     license = f.read()
12 with open("README") as f:
13     long_description = f.read()
14
15 data_files = [ ('/etc/nepi', [ 'VERSION', 'COPYING', 'README' ] ) ]
16
17 ### requirements - used by pip install
18 required_modules = [ ]
19    # we are now using six for a portable code
20 required_modules.append('six')
21    # ipaddr in py2 used to be a separate lib
22    # within recent py3, it is now in standard library but named ipaddress
23 if PY2:
24     required_modules.append('ipaddr')
25    # this is required regardless of the python version
26 required_modules.append('networkx')
27    # refrain from mentioning these ones that are not exactly crucial
28    # and that have additional, non-python, dependencies
29    # that can easily break the whole install
30 #required_modules.append('matplotlib')
31 #required_modules.append('pygraphviz')
32
33 setup(
34     name             = "nepi",
35     version          = version_tag,
36     description      = "Network Experiment Management Framework",
37     long_description = long_description,
38     license          = license,
39     author           = "Alina Quereilhac",
40     author_email     = "alina.quereilhac@inria.fr",
41     download_url     = "http://build.onelab.eu/nepi/nepi-{v}.tar.gz".format(v=version_tag),
42     url              = "http://nepi.inria.fr/",
43     platforms        = "Linux, OSX",
44     data_files       = data_files,
45     package_dir      = {"": "src"},
46     packages         = [
47         "nepi",
48         "nepi.execution",
49         "nepi.resources",
50         "nepi.resources.all",
51         "nepi.resources.linux",
52         "nepi.resources.linux.ccn",
53         "nepi.resources.linux.ns3",
54         "nepi.resources.linux.ns3.ccn",
55         "nepi.resources.linux.netns",
56         "nepi.resources.netns",
57         "nepi.resources.ns3",
58         "nepi.resources.ns3.classes",
59         "nepi.resources.omf",
60         "nepi.resources.planetlab",
61         "nepi.resources.planetlab.ns3",
62         "nepi.resources.planetlab.openvswitch",
63         "nepi.util",
64         "nepi.util.parsers",
65         "nepi.data",
66         "nepi.data.processing",
67         "nepi.data.processing.ccn",
68         "nepi.data.processing.ping"],
69     package_data     = {
70         "nepi.resources.planetlab" : [ "scripts/*.py" ],
71         "nepi.resources.linux" : [ "scripts/*.py" ],
72         "nepi.resources.linux.ns3" : [ "dependencies/*.tar.gz" ]
73     },
74     install_requires = required_modules,
75 )