46 lines
1.3 KiB
Python
46 lines
1.3 KiB
Python
#! /usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
|
|
from setuptools import setup, find_packages
|
|
|
|
def get_version():
|
|
if os.path.exists('VERSION'):
|
|
version_file = open('VERSION', 'r')
|
|
version = version_file.read()
|
|
version_file.close()
|
|
return version
|
|
if os.path.exists('.git'):
|
|
p = subprocess.Popen(['git', 'describe', '--dirty', '--match=v*'], stdout=subprocess.PIPE)
|
|
result = p.communicate()[0]
|
|
if p.returncode == 0:
|
|
version = result.split()[0][1:]
|
|
version = version.replace('-', '.')
|
|
return version
|
|
return '0'
|
|
|
|
|
|
setup(
|
|
name='mail2redmine',
|
|
version=get_version(),
|
|
description='Converts incoming exim emails to tickets',
|
|
author='Serghei Mihai',
|
|
author_email='smihai@entrouvert.com',
|
|
packages=find_packages(),
|
|
include_package_data=True,
|
|
scripts=('mail2redmine.py', 'eo-redmine-mailfilter.sh'),
|
|
url='https://dev.entrouvert.org/',
|
|
classifiers=[
|
|
'Development Status :: 2 - Pre-Alpha',
|
|
'Intended Audience :: Developers',
|
|
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
|
|
'Operating System :: OS Independent',
|
|
'Programming Language :: Python',
|
|
'Programming Language :: Python :: 2',
|
|
],
|
|
install_requires=['python-redmine']
|
|
)
|