Adding (un-unit-tested) watchrepo support.
[margebot.git] / setup.py
1 """
2 Setup.py
3 """
4 # pragma pylint: disable=invalid-name
5 from distutils.errors import DistutilsSetupError
6 from distutils.filelist import FileList
7 import os
8 from setuptools import setup
9 import setuptools.command.sdist
10 import setuptools.command.upload
11 import setuptools.command.install
12
13 # Errbot plugins aren't distributed as eggs so stub out the sdist, install and upload commands
14
15 class ErrbotSdistCommand(setuptools.command.sdist.sdist):
16 """
17 No sdist command for now.
18 """
19 def run(self):
20 raise DistutilsSetupError("No sdist for Errbot plugins.")
21
22
23 class ErrbotUploadCommand(setuptools.command.upload.upload):
24 """
25 Don't try uploading Errbot plugins to pypi
26 """
27 def run(self):
28 raise DistutilsSetupError("No uploading Errbot plugins to pypi.")
29
30
31 class ErrbotInstallCommand(setuptools.command.install.install):
32 """
33 Short circuit the install command
34 """
35 def run(self):
36 raise DistutilsSetupError("No install command - copy the ./plugin files to a 'Marge' directory under your Errbot's plugins directory.")
37
38
39 with open('requirements.txt') as f:
40 install_required = f.read().splitlines()
41
42 with open('test-requirements.txt') as f:
43 tests_required = f.read().splitlines()
44
45 setup(
46 name='Marge',
47 version='1.0.0',
48 license='GPLv3',
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',
52 author='JudeN',
53 author_email='margebot_spam@pwan.org',
54
55 include_package_data=True,
56 install_requires=install_required,
57
58 setup_requires=['pytest-runner'],
59 tests_require=tests_required,
60
61 cmdclass={
62 'install' : ErrbotInstallCommand,
63 'sdist' : ErrbotSdistCommand,
64 'upload' : ErrbotUploadCommand,
65 }
66 )