This repository has been archived by the owner on Apr 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 132
/
setup.py
executable file
·59 lines (47 loc) · 1.75 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env python
from setuptools import setup, find_packages
from setuptools.command.install_lib import install_lib as _install_lib
from distutils.command.build import build as _build
from distutils.cmd import Command
from djangobb_forum import get_version
class compile_translations(Command):
description = 'compile message catalogs to MO files via django compilemessages'
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import os
from django.core.management import execute_from_command_line, CommandError
curdir = os.getcwd()
forum_dir = os.path.realpath('djangobb_forum')
os.chdir(forum_dir)
try:
execute_from_command_line(['django-admin', 'compilemessages'])
except CommandError:
pass
finally:
os.chdir(curdir)
class build(_build):
sub_commands = [('compile_translations', None)] + _build.sub_commands
class install_lib(_install_lib):
def run(self):
self.run_command('compile_translations')
_install_lib.run(self)
setup(name='djangobb_forum',
version=get_version(),
description='DjangoBB is a quick and simple forum which uses the Django Framework.',
license='BSD',
url='http://djangobb.org/',
author='Alexey Afinogenov, Maranchuk Sergey',
author_email='Maranchuk Sergey <[email protected]>',
packages=find_packages(),
include_package_data=True,
setup_requires=['django>=1.8,<2.0'],
install_requires=open('requirements.txt').readlines(),
keywords='django forum bb',
test_suite='runtests.runtests',
cmdclass={'build': build, 'install_lib': install_lib,
'compile_translations': compile_translations}
)