forked from jacobsvante/bgtunnel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
49 lines (42 loc) · 1.32 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
#!/usr/bin/env python
from __future__ import print_function
from setuptools import setup
import codecs
import subprocess as subp
import sys
appname = 'bgtunnel'
app = __import__(appname)
version = app.__version__
read = lambda filepath: codecs.open(filepath, 'r', 'utf-8').read()
if sys.argv[-1] == 'publish':
subp.check_output(('python', 'setup.py', 'sdist', 'upload'))
# Git tagging. Yes I'm lazy!
if version not in subp.check_output(('git', 'tag', '-l', version)):
subp.check_output(('git', 'tag', '-a', version,
'-m', 'Version {0}'.format(version)))
subp.check_output(('git', 'push', '--tags'))
sys.exit()
setup(
name=appname,
version=version,
description="Initiate SSH tunnels in the background",
long_description=app.__doc__,
py_modules=[appname],
author='Jacob Magnusson',
author_email='m@jacobian.se',
url='https://github.com/jmagnusson/bgtunnel',
license='BSD',
platforms=['unix', 'macos'],
entry_points={
'console_scripts': [
'bgtunnel = bgtunnel:main',
],
},
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: Unix',
'Programming Language :: Python',
],
)