-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsetup.py
81 lines (72 loc) · 3.65 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#! /usr/bin/env python
#from distutils.core import setup
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import os
import shlex
import subprocess as sub
from glob import glob
from muonic.__version__ import __version__,__source_location__
# build the documentation
#man_make = "make man -C docs"
#html_make = "make html -C docs"
#man_success = sub.Popen(shlex.split(man_make),stdout=sub.PIPE).communicate()
#html_success = sub.Popen(shlex.split(html_make),stdout=sub.PIPE).communicate()
datapath = (os.getenv('HOME') + os.sep + 'muonic_data')
setup(name='muonic',
version=__version__,
description='Software to work with QNet DAQ cards. This is a TRUNK version',
long_description='Software is able to manage DAQ comunications and shows e.g. a rate plot...',
author='Robert Franke,Achim Stoessl,Basho Kaminsky',
author_email="[email protected], [email protected]",
url=__source_location__,
download_url="pip install muonic",
# can only be used with setuptools
#install_requires=['numpy','scipy','pyserial','matplotlib','PyQt'],
license="GPL",
platforms=["Ubuntu 12.04"],
classifiers=[
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Intended Audience :: Education",
"Intended Audience :: Developers",
"Programming Language :: Python :: 2.7",
"Topic :: Scientific/Engineering :: Physics"
],
keywords=["QNET","QuarkNET","Fermilab","DESY","DAQ"],
packages=['muonic','muonic.analysis','muonic.gui','muonic.daq'],
scripts=['bin/muonic','bin/which_tty_daq'],
package_data={'muonic': ['daq/simdaq.txt'],'':['*.txt','*.rst']},
#package_data={'' : ['docs/*','README'], 'muonic': ['daq/simdaq.txt','daq/which_tty_daq']},
data_files=[(datapath,[])]#,(datapath,["muonic/docs/build/man/muonic.1"]),(os.path.join(datapath,"muonic/docs/html"),glob("muonic/docs/build/html/*html")),(os.path.join(datapath,"muonic/docs/html/_static"),glob("muonic/docs/build/html/_static/*")),(os.path.join(datapath,"muonic/docs/html/_modules"),glob("muonic/docs/build/html/_modules/*html")),(os.path.join(datapath,"muonic/docs/html/_sources"),glob("muonic/docs/build/html/_sources/*html")),(os.path.join(datapath,"muonic/docs/html/_modules/muonic/"), glob("muonic/docs/build/html/_modules/muonic/*html")),(os.path.join(datapath,"muonic/docs/html/_modules/muonic/gui"),glob("muonic/docs/build/html/_modules/muonic/*html")),(os.path.join(datapath,"muonic/docs/html/_modules/muonic/daq"),glob("muonic/docs/build/html/_modules/muonic/daq/*html")),(os.path.join(datapath,"muonic/docs/html/_modules/muonic/analysis"), glob("muonic/docs/build/html/_modules/muonic/analysis/*html"))]
)
# setting correct permissions of created muonic_data dir
#
#userid = os.stat(os.getenv("HOME"))[4]
#gid = os.stat(os.getenv("HOME"))[5]
#
## if muonic is installed with sudo, the ownership of the files
## has to be changed to the current user.
#if os.geteuid() == 0:
# cline = "chown -R " + str(gid) + ":" + str(userid) + " " + datapath
# print cline
#
# chown_success = sub.Popen(shlex.split(cline),stdout=sub.PIPE).communicate()
#
#print man_success[0]
#print html_success[0]
#if chown_success[1] is None:
# print "Successfully changed owner of %s to %s" %(datapath,str(userid))
# print "---------------------------"
#
#if man_success[1] is None:
# print "Built manpages succesfully"
# print "---------------------------"
#if html_success[1] is None:
# print "Buitl html docs succesfully"
# print "---------------------------"
#
#print "MUONIC succesfully installed!"