4 # pragma pylint: disable=invalid-name
5 from distutils
.errors
import DistutilsSetupError
6 from setuptools
import setup
7 import setuptools
.command
.sdist
8 import setuptools
.command
.upload
9 import setuptools
.command
.install
12 # Errbot plugins aren't distributed as eggs so stub out the sdist, install and upload commands
13 class ErrbotSdistCommand(setuptools
.command
.sdist
.sdist
):
15 No sdist command for now.
18 raise DistutilsSetupError("No sdist for Errbot plugins.")
21 class ErrbotUploadCommand(setuptools
.command
.upload
.upload
):
23 Don't try uploading Errbot plugins to pypi
26 raise DistutilsSetupError("No uploading Errbot plugins to pypi.")
29 class ErrbotInstallCommand(setuptools
.command
.install
.install
):
31 Short circuit the install command
34 raise DistutilsSetupError("No install command - copy the ./plugin files to a 'Marge' directory under your Errbot's plugins directory.")
37 with
open('requirements.txt') as f
:
38 install_required
= f
.read().splitlines()
40 with
open('test-requirements.txt') as f
:
41 tests_required
= f
.read().splitlines()
47 description
='A Errbot plugin for reminding you about outstanding Gitlab merge requests',
48 long_description
=open('README.md').read(),
49 url
='https://pwan.org/git/?p=margebot.git;a=summary',
51 author_email
='margebot_spam@pwan.org',
53 include_package_data
=True,
54 install_requires
=install_required
,
56 setup_requires
=['pytest-runner'],
57 tests_require
=tests_required
,
60 'install': ErrbotInstallCommand
,
61 'sdist': ErrbotSdistCommand
,
62 'upload': ErrbotUploadCommand
,