forked from openlabs/magento_integration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
79 lines (67 loc) · 2.11 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
Magento Integration module setup
:copyright: (c) 2010-2013 by Openlabs Technologies & Consulting (P) LTD
:license: AGPLv3, see LICENSE for more details
'''
import os
import sys
import unittest
from setuptools import setup, Command
class TravisTest(Command):
"""
Run the tests on Travis CI.
Travis CI offers database settings which are different
"""
description = "Run tests on Travis CI"
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
from openerp.tools import config
config.options['db_user'] = 'postgres'
config.options['db_host'] = 'localhost'
config.options['db_port'] = 5432
parent_folder, current_folder = os.path.dirname(
os.path.abspath(__file__)
).rsplit('/', 1)
config.options['addons_path'] += ',' + parent_folder
from tests import suite
test_result = unittest.TextTestRunner(verbosity=3).run(suite())
if test_result.wasSuccessful():
sys.exit(0)
sys.exit(-1)
setup(
name='magento_integration',
version='0.1',
url='https://github.com/openlabs/magento-integration/',
license='GNU Affero General Public License v3',
author='Openlabs Technologies & Consulting (P) Limited',
author_email='[email protected]',
description='OpenERP Magento Integration',
packages=[],
zip_safe=False,
platforms='any',
install_requires=[
'itsbroken',
'magento',
'pycountry',
],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
],
test_suite='tests',
cmdclass={
'test_on_travis': TravisTest,
}
)