-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
72 lines (59 loc) · 2.22 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
# -*- coding: utf-8 -*-
"""
SQLAlchemy-Fixture-Factory
A fixture factory for SQLAlchemy to easily build test scenarios for unit or integration testing.
Build test scenarios organically and instantiate them with one line including all dependencies.
"""
from __future__ import absolute_import, print_function, unicode_literals, division
import sys
import os
import re
from setuptools import setup, find_packages
HERE = os.path.dirname(os.path.abspath(__file__))
def get_version():
filename = os.path.join(HERE, 'sqlalchemy_fixture_factory', '__init__.py')
with open(filename) as f:
contents = f.read()
pattern = r"^__version__ = '(.*?)'$"
return re.search(pattern, contents, re.MULTILINE).group(1)
needs_pytest = set(['ptr', 'pytest', 'test']).intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []
setup(
name='SQLAlchemy-Fixture-Factory',
version=get_version(),
url='https://github.com/mmmichl/sqlalchemy-fixture-factory',
license='MIT',
author='Michael Pickelbauer',
author_email='mmmichlPi' '@' 'gmail.com',
description='Test Fixture Factory for SQLAlchemy. Inspired by Ruby\'s factory_girl',
keywords='SQLAlchemy test fixtures database-testing scenario builder',
long_description=open('README.rst').read(),
packages=find_packages(exclude=['tests']),
zip_safe=False,
include_package_data=True,
platforms='any',
install_requires=[
'SQLAlchemy>=0.7',
],
setup_requires=[] + pytest_runner,
test_suite='tests',
tests_require=[
'pytest',
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Software Development :: Testing',
'Topic :: Database',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
)