-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
executable file
·73 lines (63 loc) · 2.1 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
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Pardus Desktop Services
# Copyright (C) 2011, TUBITAK/UEKAE
# 2011 - Gökmen Göksel <gokmen:pardus.org.tr>
# 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.
# Python Libs
import os
import shutil
# DistUtils
from distutils.core import setup
from distutils.cmd import Command
from distutils.command.build import build
from distutils.command.clean import clean
from distutils.command.sdist import sdist
from distutils.sysconfig import get_python_lib
PROJECT = 'pds'
def plp():
return os.path.join(get_python_lib(), PROJECT)
class Clean(clean):
def run(self):
print 'Cleaning ...'
os.system('find -name *.pyc|xargs rm -rf')
for dirs in ('build', 'dist'):
if os.path.exists(dirs):
print ' removing: ', dirs
shutil.rmtree(dirs)
clean.run(self)
class Dist(sdist):
def run(self):
os.system('python setup.py build')
sdist.run(self)
class Uninstall(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
print 'Uninstalling ...'
project_dir = plp()
if os.path.exists(project_dir):
print ' removing: ', project_dir
shutil.rmtree(project_dir)
setup(name=PROJECT,
version='1.2.6',
description='Pds: Pardus Desktop Services',
long_description='Pds is a Python Library that helps developers for '\
'creating desktop environment independet UI applications',
license='GNU GPL2',
author='Gökmen Göksel',
author_email='gokmen@pardus.org.tr',
url='http://developer.pardus.org.tr',
packages=[PROJECT, 'pds.tests', 'pds.ui'],
data_files = [(plp(), ['AUTHORS', 'README', 'COPYING', 'HELP', 'ChangeLog'])],
cmdclass = {
'uninstall':Uninstall,
'clean' :Clean,
}
)