2012-02-23 21:16:33 +00:00
|
|
|
from setuptools import setup, Command
|
2010-11-25 14:33:37 +00:00
|
|
|
import sys
|
|
|
|
sys.path.insert(0, '.')
|
2010-11-27 13:27:26 +00:00
|
|
|
import injector
|
|
|
|
|
2012-11-19 04:19:52 +00:00
|
|
|
|
2012-02-23 21:16:33 +00:00
|
|
|
class PyTest(Command):
|
|
|
|
user_options = []
|
2012-11-19 04:19:52 +00:00
|
|
|
|
2012-02-23 21:16:33 +00:00
|
|
|
def initialize_options(self):
|
|
|
|
pass
|
2012-11-19 04:19:52 +00:00
|
|
|
|
2012-02-23 21:16:33 +00:00
|
|
|
def finalize_options(self):
|
|
|
|
pass
|
2012-11-19 04:19:52 +00:00
|
|
|
|
2012-02-23 21:16:33 +00:00
|
|
|
def run(self):
|
2013-08-10 14:47:52 +00:00
|
|
|
import subprocess
|
2012-02-23 21:16:33 +00:00
|
|
|
errno = subprocess.call([sys.executable, 'runtest.py'])
|
|
|
|
raise SystemExit(errno)
|
|
|
|
|
|
|
|
|
2010-11-27 13:27:26 +00:00
|
|
|
version = injector.__version__
|
|
|
|
version_tag = injector.__version_tag__
|
2013-08-10 14:47:52 +00:00
|
|
|
|
|
|
|
try:
|
|
|
|
import pypandoc
|
|
|
|
long_description = pypandoc.convert('README.md', 'rst')
|
|
|
|
except ImportError:
|
|
|
|
print('WARNING: Could not locate pandoc, using Markdown long_description.')
|
|
|
|
long_description = open('README.md').read()
|
|
|
|
|
2010-11-25 14:33:37 +00:00
|
|
|
description = long_description.splitlines()[0].strip()
|
|
|
|
|
|
|
|
|
|
|
|
setup(
|
|
|
|
name='injector',
|
|
|
|
url='http://github.com/alecthomas/injector',
|
|
|
|
download_url='http://pypi.python.org/pypi/injector',
|
|
|
|
version=version,
|
2010-11-27 13:27:26 +00:00
|
|
|
options=dict(egg_info=dict(tag_build=version_tag)),
|
2010-11-25 14:33:37 +00:00
|
|
|
description=description,
|
|
|
|
long_description=long_description,
|
|
|
|
license='BSD',
|
|
|
|
platforms=['any'],
|
2012-02-24 21:06:44 +00:00
|
|
|
py_modules=['injector'],
|
2010-11-25 14:33:37 +00:00
|
|
|
author='Alec Thomas',
|
|
|
|
author_email='alec@swapoff.org',
|
|
|
|
install_requires=[
|
|
|
|
'setuptools >= 0.6b1',
|
|
|
|
],
|
2012-02-23 21:16:33 +00:00
|
|
|
cmdclass={'test': PyTest},
|
2013-08-28 22:16:02 +00:00
|
|
|
keywords=[
|
|
|
|
'Dependency Injection', 'DI', 'Dependency Injection framework',
|
|
|
|
'Inversion of Control', 'IoC', 'Inversion of Control container',
|
|
|
|
],
|
|
|
|
)
|