File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed
Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change 3434import os
3535import sys
3636import time
37+ import textwrap
3738import warnings
3839import subprocess
3940
40- from setuptools import setup
41+ def normalizeWhitespace (s ):
42+ return ' ' .join (s .split ())
43+
44+ try :
45+ from setuptools import setup
46+ except ImportError :
47+ s = normalizeWhitespace ("""Limnoria requires the setuptools package to
48+ install. This package is pretty standard, and often installed alongside
49+ Python, but it is missing on your system.
50+ Try installing it with your package manager, it is usually called
51+ 'python3-setuptools'. If that does not work, try installing python3-pip
52+ instead, either with your package manager or by following these
53+ instructions: https://pip.pypa.io/en/stable/installation/ (replace
54+ 'python' with 'python3' in all the commands)""" )
55+ sys .stderr .write (os .linesep * 2 )
56+ sys .stderr .write (textwrap .fill (s ))
57+ sys .stderr .write (os .linesep * 2 )
58+ sys .exit (- 1 )
4159
4260warnings .filterwarnings ('always' , category = DeprecationWarning )
4361
100118plugins = [s for s in os .listdir ('plugins' ) if
101119 os .path .exists (os .path .join ('plugins' , s , 'plugin.py' ))]
102120
103- def normalizeWhitespace (s ):
104- return ' ' .join (s .split ())
105-
106121packages = ['supybot' ,
107122 'supybot.locales' ,
108123 'supybot.utils' ,
You can’t perform that action at this time.
0 commit comments