2015-08-31 13:31:38 +00:00
|
|
|
"""`Dependency injector` setup script."""
|
2015-01-04 13:54:25 +00:00
|
|
|
|
2015-04-03 13:11:05 +00:00
|
|
|
import os
|
2015-10-23 12:20:25 +00:00
|
|
|
import re
|
|
|
|
|
2015-01-04 13:54:25 +00:00
|
|
|
from setuptools import setup
|
2015-04-03 13:11:05 +00:00
|
|
|
from setuptools import Command
|
2015-01-04 13:54:25 +00:00
|
|
|
|
2015-04-02 22:01:05 +00:00
|
|
|
|
2015-10-23 12:20:25 +00:00
|
|
|
# Getting description:
|
2015-04-02 21:31:26 +00:00
|
|
|
with open('README.rst') as readme_file:
|
|
|
|
description = readme_file.read()
|
2015-01-05 09:11:21 +00:00
|
|
|
|
2015-10-23 12:20:25 +00:00
|
|
|
# Getting requirements:
|
2015-01-04 13:54:25 +00:00
|
|
|
with open('requirements.txt') as version:
|
|
|
|
requirements = version.readlines()
|
|
|
|
|
2015-10-23 12:20:25 +00:00
|
|
|
# Getting version:
|
|
|
|
with open('dependency_injector/__init__.py') as init_file:
|
|
|
|
version = re.search('VERSION = \'(.*?)\'', init_file.read()).group(1)
|
2015-01-04 13:54:25 +00:00
|
|
|
|
|
|
|
|
2015-04-03 13:11:05 +00:00
|
|
|
class PublishCommand(Command):
|
|
|
|
"""Setuptools `publish` command."""
|
|
|
|
|
|
|
|
description = "Publish current distribution to PyPi and create tag"
|
2015-04-03 13:18:37 +00:00
|
|
|
user_options = []
|
2015-04-03 13:11:05 +00:00
|
|
|
|
|
|
|
def initialize_options(self):
|
|
|
|
"""Init options."""
|
|
|
|
|
|
|
|
def finalize_options(self):
|
|
|
|
"""Finalize options."""
|
|
|
|
|
|
|
|
def run(self):
|
|
|
|
"""Command execution."""
|
2015-04-03 13:18:37 +00:00
|
|
|
self.run_command('sdist')
|
|
|
|
self.run_command('upload')
|
2015-04-03 13:11:05 +00:00
|
|
|
os.system('git tag -a {0} -m \'version {0}\''.format(version))
|
|
|
|
os.system('git push --tags')
|
2015-07-24 17:23:42 +00:00
|
|
|
|
|
|
|
|
2015-08-31 13:31:38 +00:00
|
|
|
setup(name='dependency_injector',
|
2015-04-03 13:11:05 +00:00
|
|
|
version=version,
|
2016-02-04 20:47:45 +00:00
|
|
|
description='Python dependency injection framework',
|
2015-04-03 13:11:05 +00:00
|
|
|
long_description=description,
|
2016-01-11 08:53:35 +00:00
|
|
|
author='ETS Labs',
|
2015-04-03 13:11:05 +00:00
|
|
|
author_email='rmogilatov@gmail.com',
|
2016-03-17 00:02:17 +00:00
|
|
|
maintainer='Roman Mogilatov',
|
2015-04-03 13:11:05 +00:00
|
|
|
maintainer_email='rmogilatov@gmail.com',
|
2016-04-25 08:07:47 +00:00
|
|
|
url='https://github.com/ets-labs/python-dependency-injector',
|
|
|
|
bugtrack_url='https://github.com/ets-labs/python-dependency-injector' +
|
|
|
|
'/issues',
|
2016-03-17 00:02:17 +00:00
|
|
|
download_url='https://pypi.python.org/pypi/dependency_injector',
|
2015-04-03 13:11:05 +00:00
|
|
|
license='BSD New',
|
2016-04-03 14:27:53 +00:00
|
|
|
packages=['dependency_injector',
|
|
|
|
'dependency_injector.providers'],
|
2016-03-17 00:02:17 +00:00
|
|
|
platforms=['any'],
|
2015-04-03 13:11:05 +00:00
|
|
|
zip_safe=True,
|
|
|
|
install_requires=requirements,
|
|
|
|
cmdclass={
|
|
|
|
'publish': PublishCommand,
|
|
|
|
},
|
2015-04-03 13:21:42 +00:00
|
|
|
keywords=[
|
|
|
|
'DI',
|
2016-03-17 00:02:17 +00:00
|
|
|
'Dependency injection',
|
2015-04-03 13:21:42 +00:00
|
|
|
'IoC',
|
2016-03-17 00:02:17 +00:00
|
|
|
'Inversion of Control',
|
2015-04-03 13:21:42 +00:00
|
|
|
],
|
2015-04-03 13:11:05 +00:00
|
|
|
classifiers=[
|
2015-11-26 13:50:12 +00:00
|
|
|
'Development Status :: 5 - Production/Stable',
|
2015-04-03 13:11:05 +00:00
|
|
|
'Intended Audience :: Developers',
|
|
|
|
'License :: OSI Approved :: BSD 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.3',
|
|
|
|
'Programming Language :: Python :: 3.4',
|
2015-10-12 15:20:20 +00:00
|
|
|
'Programming Language :: Python :: 3.5',
|
2015-04-03 13:11:05 +00:00
|
|
|
'Programming Language :: Python :: Implementation :: CPython',
|
|
|
|
'Programming Language :: Python :: Implementation :: PyPy',
|
|
|
|
'Topic :: Software Development',
|
|
|
|
'Topic :: Software Development :: Libraries',
|
|
|
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
|
|
|
])
|