-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
59 lines (51 loc) · 1.78 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
# setup.py
#
# Copyright 2019 Martin Abente Lahaye
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
import sys
from setuptools import setup
from setuptools.command.install import install
class CheckRequirementsAndInstall(install):
requirements = {
'PyGObject': 'gi',
'sugar3': 'sugar3',
}
def run(self):
for package, module in self.requirements.items():
try:
__import__(module)
except BaseException:
print('Package %s not found' % package)
sys.exit(1)
install.run(self)
setup(name='sugarapp',
version='1.13',
description='Port Sugar activities to other desktops',
url='https://github.com/tchx84/sugarapp',
author='Martín Abente Lahaye',
author_email='tch@sugarlabs.org',
license='GNU LGPL',
packages=['sugarapp'],
zip_safe=False,
scripts=[
'bin/sugarapp',
'utils/sugarapp-gen-appdata',
'utils/sugarapp-gen-desktop',
'utils/sugarapp-gen-mimetypes'],
cmdclass={
'install': CheckRequirementsAndInstall,
})