Mercurial > libervia-backend
comparison setup.py @ 237:aae816738314
distutils: added urwid-satext dependency, and gobject in preinstall_check
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 11 Jan 2011 19:15:23 +0100 |
parents | 7a2ef5fe4e8d |
children | 83d2bc0abf2a |
comparison
equal
deleted
inserted
replaced
236:7cf093e138b6 | 237:aae816738314 |
---|---|
109 """Check presence of problematic dependencies, and try to install them with package manager | 109 """Check presence of problematic dependencies, and try to install them with package manager |
110 This ugly stuff is necessary as distributions are not installed correctly with setuptools/distribute | 110 This ugly stuff is necessary as distributions are not installed correctly with setuptools/distribute |
111 Hope to remove this at some point""" | 111 Hope to remove this at some point""" |
112 | 112 |
113 #modules_tocheck=['twisted', 'twisted.words', 'twisted.web', 'wx', 'urwid'] | 113 #modules_tocheck=['twisted', 'twisted.words', 'twisted.web', 'wx', 'urwid'] |
114 modules_tocheck=['wx'] #XXX: wx is the only one to really difficult to install | 114 modules_tocheck=['wx','gobject'] #XXX: wx is the only one to be really difficult to install, python-gobject is not up-to-date in PyPi |
115 | 115 |
116 package = {'twisted':'python-twisted-core', | 116 package = {'twisted':'python-twisted-core', |
117 'twisted.words':'python-twisted-words', | 117 'twisted.words':'python-twisted-words', |
118 'twisted.web':'python-twisted-web', | 118 'twisted.web':'python-twisted-web', |
119 'wx':'python-wxgtk2.8', | 119 'wx':'python-wxgtk2.8', |
120 'urwid':'python-urwid', | 120 'urwid':'python-urwid', |
121 'gobject':'python-gobject', | |
121 'mercurial':'mercurial'} #this dict map dependencies to packages names for debian distributions | 122 'mercurial':'mercurial'} #this dict map dependencies to packages names for debian distributions |
122 | 123 |
123 sys.stdout.write ("Running pre-installation dependencies check\n") | 124 sys.stdout.write ("Running pre-installation dependencies check\n") |
124 | 125 |
125 #which modules are not installed ? | 126 #which modules are not installed ? |
143 not_installed.add(module_name) | 144 not_installed.add(module_name) |
144 else: | 145 else: |
145 not_installed=set(modules_toinstall) | 146 not_installed=set(modules_toinstall) |
146 | 147 |
147 if not_installed: | 148 if not_installed: |
148 #some packages can't be automatically installed, we sys.stdout.write their name for manual installation | 149 #some packages can't be automatically installed, we print their name for manual installation |
149 sys.stdout.write ("You should install the following dependencies with your distribution recommanded tool before installing %s:\n" % NAME) | 150 sys.stdout.write ("You should install the following dependencies with your distribution recommanded tool before installing %s:\n" % NAME) |
150 for module_name in not_installed: | 151 for module_name in not_installed: |
151 sys.stdout.write ("- %s (Debian name: %s)\n" % (module_name,package[module_name])) | 152 sys.stdout.write ("- %s (Debian name: %s)\n" % (module_name,package[module_name])) |
152 sys.exit(2) | 153 sys.exit(2) |
153 | 154 |
154 | 155 |
155 if sys.argv[1].lower() in ['egg_info','install']: | 156 if sys.argv[1].lower() in ['egg_info','install']: |
156 #we only check dependencies in egg_info or install is used | 157 #we only check dependencies if egg_info or install is used |
157 preinstall_check() | 158 preinstall_check() |
158 | 159 |
159 setup(name=NAME, | 160 setup(name=NAME, |
160 version='0.1.0', | 161 version='0.1.0', |
161 description=u'Salut à Toi multi-frontend XMPP client', | 162 description=u'Salut à Toi multi-frontend XMPP client', |
182 ('share/doc/%s' % NAME, ['CHANGELOG', 'COPYING', 'INSTALL', 'README', 'README4TRANSLATORS']), | 183 ('share/doc/%s' % NAME, ['CHANGELOG', 'COPYING', 'INSTALL', 'README', 'README4TRANSLATORS']), |
183 ('share/doc/%s/misc' % NAME, ['frontends/src/wix/images/split_card.sh']), | 184 ('share/doc/%s/misc' % NAME, ['frontends/src/wix/images/split_card.sh']), |
184 ], | 185 ], |
185 scripts=['frontends/src/jp/jp', 'frontends/src/primitivus/primitivus', 'frontends/src/wix/wix'], | 186 scripts=['frontends/src/jp/jp', 'frontends/src/primitivus/primitivus', 'frontends/src/wix/wix'], |
186 zip_safe=False, | 187 zip_safe=False, |
187 install_requires=['twisted', 'progressbar', 'urwid', 'beautifulsoup', 'mercurial'], | 188 dependency_links = ['http://ftp.goffi.org/urwid-satext/'], |
189 install_requires=['twisted', 'progressbar', 'urwid', 'beautifulsoup', 'mercurial', 'urwid-satext'], | |
188 cmdclass=dict(install=custom_install), | 190 cmdclass=dict(install=custom_install), |
189 ) #XXX: The Mercurial dependecy is just here to build the custom wokkel (with MUC branch), it must be removed | 191 ) #XXX: The Mercurial dependecy is just here to build the custom wokkel (with MUC branch), it must be removed |
190 # and replace by wokkel as soon as MUC branch is officially available in wokkel main branch. | 192 # and replace by wokkel as soon as MUC branch is officially available in wokkel main branch. |
191 # wxpython doesn't work, it's managed with preinstall_check | 193 # wxpython doesn't work, it's managed with preinstall_check |
192 | 194 |