django-discover-jenkins/setup.py

68 lines
2.2 KiB
Python
Raw Normal View History

#!/usr/bin/env python
# -*- coding: utf-8 -*-
2013-08-08 06:53:28 +00:00
from setuptools import setup, find_packages
import re
import os
import sys
LONG_DESCRIPTION = open('README.md').read()
def get_author_and_version(package):
"""
Return package author and version as listed in `init.py`.
"""
init_py = open(os.path.join(package, '__init__.py')).read()
author = re.search("__author__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
version = re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1)
return author, version
author, version = get_author_and_version('discover_jenkins')
if sys.argv[-1] == 'publish':
os.system("python setup.py sdist upload")
print("You probably want to also tag the version now:")
print(" git tag -a %s -m 'version %s'" % (version, version))
print(" git push --tags")
sys.exit()
setup(
2013-08-08 07:00:52 +00:00
name='django-discover-jenkins',
version=version,
description="A minimal fork of django-jenkins designed to work with the "
"discover runner, made with simplicity in mind",
long_description=LONG_DESCRIPTION,
2013-08-08 06:53:28 +00:00
url='https://github.com/lincolnloop/django-discover-jenkins',
license='BSD',
author=author,
author_email='brandon@lincolnloop.com',
packages=find_packages(exclude=['tests*']),
include_package_data=True,
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
"Framework :: Django",
2016-01-09 04:52:06 +00:00
"Framework :: Django :: 1.7",
"Framework :: Django :: 1.8",
"Framework :: Django :: 1.9",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: JavaScript",
2016-01-09 04:52:06 +00:00
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
2016-01-09 04:52:06 +00:00
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Python Modules",
],
keywords=['django', 'discover', 'runner', 'jenkins', 'hudson'],
)