X-Git-Url: https://pwan.org/git/?p=margebot.git;a=blobdiff_plain;f=setup.py;h=5d091a5409249e213639289e424217c075b896a1;hp=e7f4764cd74c7595f9b532488ee595f8cf916548;hb=HEAD;hpb=37a205f220a629d3a02dd1ce6a8dc75a33242de7 diff --git a/setup.py b/setup.py index e7f4764..5d091a5 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,37 @@ Setup.py """ # pragma pylint: disable=invalid-name +from distutils.errors import DistutilsSetupError from setuptools import setup +import setuptools.command.sdist +import setuptools.command.upload +import setuptools.command.install + + +# Errbot plugins aren't distributed as eggs so stub out the sdist, install and upload commands +class ErrbotSdistCommand(setuptools.command.sdist.sdist): + """ + No sdist command for now. + """ + def run(self): + raise DistutilsSetupError("No sdist for Errbot plugins.") + + +class ErrbotUploadCommand(setuptools.command.upload.upload): + """ + Don't try uploading Errbot plugins to pypi + """ + def run(self): + raise DistutilsSetupError("No uploading Errbot plugins to pypi.") + + +class ErrbotInstallCommand(setuptools.command.install.install): + """ + Short circuit the install command + """ + def run(self): + raise DistutilsSetupError("No install command - copy the ./plugin files to a 'Marge' directory under your Errbot's plugins directory.") + with open('requirements.txt') as f: install_required = f.read().splitlines() @@ -11,17 +41,26 @@ with open('test-requirements.txt') as f: tests_required = f.read().splitlines() setup( - name='Margebot', + name='Marge', version='1.0.0', - packages=['plugins', ], license='GPLv3', + description='A Errbot plugin for reminding you about outstanding Gitlab merge requests', long_description=open('README.md').read(), url='https://pwan.org/git/?p=margebot.git;a=summary', author='JudeN', author_email='margebot_spam@pwan.org', + include_package_data=True, install_requires=install_required, setup_requires=['pytest-runner'], tests_require=tests_required, + + zip_safe=False, + + cmdclass={ + 'install': ErrbotInstallCommand, + 'sdist': ErrbotSdistCommand, + 'upload': ErrbotUploadCommand, + } )