4 # pragma pylint: disable=invalid-name
5 from distutils
.errors
import DistutilsSetupError
6 from distutils
.filelist
import FileList
8 from setuptools
import setup
9 import setuptools
.command
.sdist
10 import setuptools
.command
.upload
11 import setuptools
.command
.install
13 # Errbot plugins aren't distributed as eggs so stub out the sdist, install and upload commands
15 class ErrbotSdistCommand(setuptools
.command
.sdist
.sdist
):
17 No sdist command for now.
20 raise DistutilsSetupError("No sdist for Errbot plugins.")
23 class ErrbotUploadCommand(setuptools
.command
.upload
.upload
):
25 Don't try uploading Errbot plugins to pypi
28 raise DistutilsSetupError("No uploading Errbot plugins to pypi.")
31 class ErrbotInstallCommand(setuptools
.command
.install
.install
):
33 Short circuit the install command
36 raise DistutilsSetupError("No install command - copy the ./plugin files to a 'Marge' directory under your Errbot's plugins directory.")
39 with
open('requirements.txt') as f
:
40 install_required
= f
.read().splitlines()
42 with
open('test-requirements.txt') as f
:
43 tests_required
= f
.read().splitlines()
49 description
='A Errbot plugin for reminding you about outstanding Gitlab merge requests',
50 long_description
=open('README.md').read(),
51 url
='https://pwan.org/git/?p=margebot.git;a=summary',
53 author_email
='margebot_spam@pwan.org',
55 include_package_data
=True,
56 install_requires
=install_required
,
58 setup_requires
=['pytest-runner'],
59 tests_require
=tests_required
,
62 'install' : ErrbotInstallCommand
,
63 'sdist' : ErrbotSdistCommand
,
64 'upload' : ErrbotUploadCommand
,