forked from MetricsGrimoire/CVSAnalY
-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
executable file
·69 lines (56 loc) · 2.12 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
#!/usr/bin/python
# Copyright (C) 2006 Alvaro Navarro Clemente
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# Authors : Alvaro Navarro <[email protected]>
"""
Installer
@author: Alvaro Navarro
@organization: Grupo de Sistemas y Comunicaciones, Universidad Rey Juan Carlos
@copyright: Universidad Rey Juan Carlos (Madrid, Spain)
@license: GNU GPL version 2 or any later version
@contact: [email protected]
"""
import commands
import os
import sys
from distutils.core import setup
from pycvsanaly2.FindProgram import find_program
def generate_changelog ():
from subprocess import Popen, PIPE
from tempfile import mkstemp
fd, filename = mkstemp (dir=os.getcwd ())
print "Creating ChangeLog"
cmd = ["git", "log", "-M", "-C", "--name-status", "--date=short", "--no-color"]
pipe = Popen (cmd, stdout=PIPE).stdout
buff = pipe.read (1024)
while buff:
os.write (fd, buff)
buff = pipe.read (1024)
os.close (fd)
os.rename (filename, "ChangeLog")
if sys.argv[1] == 'sdist':
generate_changelog ()
from pycvsanaly2._config import *
setup(name = PACKAGE,
version = VERSION,
author = AUTHOR,
author_email = AUTHOR_EMAIL,
description = DESCRIPTION,
url = "http://projects.libresoft.es/projects/cvsanaly/wiki/",
packages = ['pycvsanaly2', 'pycvsanaly2.extensions'],
data_files = [('share/man/man1',['help/cvsanaly2.1'])],
scripts = ["cvsanaly2"])