forked from sopel-irc/sopel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·45 lines (40 loc) · 1.6 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
#!/usr/bin/env python
#coding: utf8
from __future__ import unicode_literals
from distutils.core import setup
from willie import __version__
import tempfile
import os
import shutil
def do_setup():
try:
# This special screwing is to make willie.py get installed to PATH as
# willie, not willie.py. Don't remove it, or you'll break it.
tmp_dir = tempfile.mkdtemp()
tmp_main_script = os.path.join(tmp_dir, 'willie')
shutil.copy('willie.py', tmp_main_script)
setup(
name='willie',
version=__version__,
description='Simple and extendible IRC bot',
author='Edward Powell',
author_email='[email protected]',
url='http://willie.dftba.net/',
long_description="""Willie is a simple, lightweight, open source, easy-to-use IRC Utility bot, written in Python. It's designed to be easy to use, easy to run, and easy to make new features for. """,
# Distutils is shit, and doesn't check if it's a list of basestring
# but instead requires str.
packages=[b'willie', b'willie.modules'],
scripts=[tmp_main_script],
license='Eiffel Forum License, version 2',
platforms='Linux x86, x86-64',
requires=[b'feedparser', b'pytz', b'lxml', b'praw', b'enchant',
b'pygeoip']
)
finally:
try:
shutil.rmtree(tmp_dir)
except OSError, e:
if e.errno != 2: # The directory is already gone, so ignore it
raise
if __name__ == "__main__":
do_setup()