mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Add error message in case setuptools is not installed.
This commit is contained in:
parent
37ba0ef7be
commit
cbd2b31d8f
23
setup.py
23
setup.py
@ -34,10 +34,28 @@
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import textwrap
|
||||
import warnings
|
||||
import subprocess
|
||||
|
||||
from setuptools import setup
|
||||
def normalizeWhitespace(s):
|
||||
return ' '.join(s.split())
|
||||
|
||||
try:
|
||||
from setuptools import setup
|
||||
except ImportError:
|
||||
s = normalizeWhitespace("""Limnoria requires the setuptools package to
|
||||
install. This package is pretty standard, and often installed alongside
|
||||
Python, but it is missing on your system.
|
||||
Try installing it with your package manager, it is usually called
|
||||
'python3-setuptools'. If that does not work, try installing python3-pip
|
||||
instead, either with your package manager or by following these
|
||||
instructions: https://pip.pypa.io/en/stable/installation/ (replace
|
||||
'python' with 'python3' in all the commands)""")
|
||||
sys.stderr.write(os.linesep*2)
|
||||
sys.stderr.write(textwrap.fill(s))
|
||||
sys.stderr.write(os.linesep*2)
|
||||
sys.exit(-1)
|
||||
|
||||
warnings.filterwarnings('always', category=DeprecationWarning)
|
||||
|
||||
@ -100,9 +118,6 @@ if sys.version_info < (3, 6, 0) \
|
||||
plugins = [s for s in os.listdir('plugins') if
|
||||
os.path.exists(os.path.join('plugins', s, 'plugin.py'))]
|
||||
|
||||
def normalizeWhitespace(s):
|
||||
return ' '.join(s.split())
|
||||
|
||||
packages = ['supybot',
|
||||
'supybot.locales',
|
||||
'supybot.utils',
|
||||
|
Loading…
Reference in New Issue
Block a user